Skip to content

Commit

Permalink
TypeScript attacks
Browse files Browse the repository at this point in the history
  • Loading branch information
gsproston-scottlogic committed Aug 8, 2023
1 parent ce810cc commit d37e400
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/Attacks.js → frontend/src/Attacks.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const ATTACKS = [
import { ATTACK_TYPES, AttackInfo } from "./models/attack";

const ATTACKS: AttackInfo[] = [
{
id: ATTACK_TYPES.JAILBREAK_PROMPT,
name: "jailbreak prompt",
id: "JAILBREAK_PROMPT",
info: "using prompt injection, get the chat bot in a state where it no longer follows its original instructions.",
},
];
Expand Down
12 changes: 12 additions & 0 deletions frontend/src/models/attack.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
enum ATTACK_TYPES {
JAILBREAK_PROMPT = "JAILBREAK_PROMPT",
}

interface AttackInfo {
id: ATTACK_TYPES;
name: string;
info: string;
}

export { ATTACK_TYPES };
export type { AttackInfo };

0 comments on commit d37e400

Please sign in to comment.