feat(AI Red Team Ethical Use Agreement):

This commit is contained in:
Alexander Myasoedov
2024-11-25 23:43:45 +02:00
parent ab10244818
commit e7cf291433
2 changed files with 79 additions and 0 deletions
+62
View File
@@ -68,6 +68,68 @@
</div>
</header>
<div id="consent-modal" v-if="showConsentModal"
class="fixed inset-0 bg-black bg-opacity-75 flex justify-center items-center z-50">
<div
class="bg-dark-card text-dark-text p-8 rounded-xl shadow-2xl max-w-xl w-full">
<h2 class="text-2xl font-bold mb-6 text-center">AI Red Team Ethical
Use Agreement</h2>
<div class="space-y-6">
<p class="text-sm leading-relaxed">
This AI red team tool is designed for security research,
vulnerability assessment,
and responsible testing purposes. By accessing this tool, you
explicitly agree to
the following ethical guidelines:
</p>
<ul class="list-disc list-inside text-sm space-y-3">
<li>
<strong>Consent and Authorization:</strong> You will only use
this tool on systems
for which you have explicit, documented permission from the
system owners.
</li>
<li>
<strong>Responsible Disclosure:</strong> Any vulnerabilities
discovered must be
reported responsibly to the appropriate parties, prioritizing
system and user safety.
</li>
<li>
<strong>No Malicious Intent:</strong> You will not use this tool
to cause harm,
disrupt services, or compromise the integrity of any system or
data.
</li>
<li>
<strong>Legal Compliance:</strong> All testing and research must
comply with
applicable local, national, and international laws and
regulations.
</li>
</ul>
<p class="text-xs text-gray-400 italic">
Violation of these terms may result in immediate termination of
access and
potential legal consequences.
</p>
</div>
<div class="flex justify-center space-x-4 mt-8">
<button
@click="declineConsent"
class="bg-dark-accent-red text-white rounded-lg px-6 py-3 font-medium hover:bg-opacity-80 transition-colors">
Decline
</button>
<button
@click="acceptConsent"
class="bg-dark-accent-green text-dark-bg rounded-lg px-6 py-3 font-medium hover:bg-opacity-80 transition-colors">
I Agree and Understand
</button>
</div>
</div>
</div>
<main class="max-w-6xl mx-auto space-y-8">
<!-- Config Selection -->
+17
View File
@@ -88,6 +88,7 @@ var app = new Vue({
selectedConfig: 0,
showModules: false,
showLogs: false,
showConsentModal: true,
statusDotClass: 'bg-gray-500', // Default status dot class
statusText: 'Verified', // Default status text
statusClass: 'bg-green-500 text-dark-bg', // Default status class
@@ -103,6 +104,13 @@ var app = new Vue({
],
dataConfig: [],
},
created() {
// Check if consent is already given in local storage
const consentGiven = localStorage.getItem('consentGiven');
if (consentGiven === 'true') {
this.showConsentModal = false; // Don't show the modal if consent was given
}
},
mounted: function () {
console.log('Vue app mounted');
this.adjustHeight({ target: document.getElementById('llm-spec') });
@@ -118,6 +126,15 @@ var app = new Vue({
}
},
methods: {
acceptConsent() {
this.showConsentModal = false; // Close the modal
localStorage.setItem('consentGiven', 'true'); // Save consent to local storage
},
declineConsent() {
this.showConsentModal = false; // Close the modal
localStorage.setItem('consentGiven', 'false'); // Save decline to local storage
window.location.href = 'https://www.google.com'; // Redirect to Google
},
updateStatusDot(ok) {
if (ok) {
this.statusDotClass = 'bg-green-500'; // Green when expanded