@artemiskit/redteam 0.2.4 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/CHANGELOG.md +132 -0
  2. package/adapters/openai/dist/index.js +5612 -0
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +1184 -2
  6. package/dist/mutations/bad-likert-judge.d.ts +41 -0
  7. package/dist/mutations/bad-likert-judge.d.ts.map +1 -0
  8. package/dist/mutations/crescendo.d.ts +50 -0
  9. package/dist/mutations/crescendo.d.ts.map +1 -0
  10. package/dist/mutations/deceptive-delight.d.ts +49 -0
  11. package/dist/mutations/deceptive-delight.d.ts.map +1 -0
  12. package/dist/mutations/excessive-agency.d.ts +45 -0
  13. package/dist/mutations/excessive-agency.d.ts.map +1 -0
  14. package/dist/mutations/hallucination-trap.d.ts +51 -0
  15. package/dist/mutations/hallucination-trap.d.ts.map +1 -0
  16. package/dist/mutations/index.d.ts +86 -0
  17. package/dist/mutations/index.d.ts.map +1 -1
  18. package/dist/mutations/output-injection.d.ts +45 -0
  19. package/dist/mutations/output-injection.d.ts.map +1 -0
  20. package/dist/mutations/system-extraction.d.ts +44 -0
  21. package/dist/mutations/system-extraction.d.ts.map +1 -0
  22. package/dist/severity.d.ts.map +1 -1
  23. package/package.json +2 -2
  24. package/src/index.ts +24 -0
  25. package/src/mutations/bad-likert-judge.ts +143 -0
  26. package/src/mutations/crescendo.ts +295 -0
  27. package/src/mutations/deceptive-delight.ts +179 -0
  28. package/src/mutations/excessive-agency.ts +179 -0
  29. package/src/mutations/hallucination-trap.ts +236 -0
  30. package/src/mutations/index.ts +152 -0
  31. package/src/mutations/output-injection.ts +237 -0
  32. package/src/mutations/owasp.test.ts +438 -0
  33. package/src/mutations/system-extraction.ts +180 -0
  34. package/src/severity.ts +86 -0
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Bad Likert Judge Mutation - OWASP LLM01 (Prompt Injection)
3
+ *
4
+ * This mutation exploits the model's evaluation capability by framing harmful requests
5
+ * as rating/scoring tasks. The model is asked to "rate" harmful content on various scales,
6
+ * which can trick it into generating or engaging with harmful content.
7
+ *
8
+ * Research shows 60%+ bypass success rate with this technique.
9
+ *
10
+ * Reference: OWASP LLM Top 10 2025 - LLM01 Prompt Injection
11
+ */
12
+ import { type CvssScore } from '../severity';
13
+ import type { Mutation } from './index';
14
+ export type LikertScaleType = 'agreement' | 'effectiveness' | 'quality' | 'realism' | 'helpfulness' | 'accuracy';
15
+ export interface BadLikertJudgeOptions {
16
+ /** Preferred scale type (random if not specified) */
17
+ scaleType?: LikertScaleType;
18
+ /** Whether to use wrapper framing */
19
+ useWrapper?: boolean;
20
+ }
21
+ export declare class BadLikertJudgeMutation implements Mutation {
22
+ readonly name = "bad-likert-judge";
23
+ readonly description = "Frames harmful requests as rating/scoring tasks to bypass safety measures (OWASP LLM01)";
24
+ readonly severity: "critical";
25
+ readonly cvssScore: CvssScore;
26
+ /** OWASP category */
27
+ readonly owaspCategory = "LLM01";
28
+ private scaleType?;
29
+ private useWrapper;
30
+ constructor(options?: BadLikertJudgeOptions);
31
+ /**
32
+ * Get a random item from an array
33
+ */
34
+ private random;
35
+ /**
36
+ * Get a random scale type
37
+ */
38
+ private getScaleType;
39
+ mutate(prompt: string): string;
40
+ }
41
+ //# sourceMappingURL=bad-likert-judge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bad-likert-judge.d.ts","sourceRoot":"","sources":["../../src/mutations/bad-likert-judge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,eAAe,GACvB,WAAW,GACX,eAAe,GACf,SAAS,GACT,SAAS,GACT,aAAa,GACb,UAAU,CAAC;AAiDf,MAAM,WAAW,qBAAqB;IACpC,qDAAqD;IACrD,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,qBAAa,sBAAuB,YAAW,QAAQ;IACrD,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,WAAW,6FACwE;IAC5F,QAAQ,CAAC,QAAQ,EAAG,UAAU,CAAU;IACxC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAS1B;IACH,qBAAqB;IACrB,QAAQ,CAAC,aAAa,WAAW;IAEjC,OAAO,CAAC,SAAS,CAAC,CAAkB;IACpC,OAAO,CAAC,UAAU,CAAU;gBAEhB,OAAO,GAAE,qBAA0B;IAK/C;;OAEG;IACH,OAAO,CAAC,MAAM;IAId;;OAEG;IACH,OAAO,CAAC,YAAY;IAapB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAgB/B"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Crescendo Mutation - OWASP LLM01 (Prompt Injection)
3
+ *
4
+ * Multi-turn gradual escalation attack that starts with completely benign requests
5
+ * and incrementally increases the harm level. Each turn builds trust and context
6
+ * that makes the next request seem more reasonable.
7
+ *
8
+ * This is distinct from the general multi-turn mutation in that it specifically
9
+ * follows the escalation pattern rather than using other strategies.
10
+ *
11
+ * Reference: OWASP LLM Top 10 2025 - LLM01 Prompt Injection
12
+ */
13
+ import { type CvssScore } from '../severity';
14
+ import type { Mutation } from './index';
15
+ import type { ConversationTurn } from './multi-turn';
16
+ export type EscalationTopic = 'security_research' | 'academic_writing' | 'fiction_writing' | 'educational_content' | 'technical_documentation' | 'safety_testing';
17
+ export interface CrescendoOptions {
18
+ /** Preferred escalation topic (random if not specified) */
19
+ topic?: EscalationTopic;
20
+ /** Number of escalation turns (2-5, default 4) */
21
+ turns?: number;
22
+ }
23
+ export declare class CrescendoMutation implements Mutation {
24
+ readonly name = "crescendo";
25
+ readonly description = "Multi-turn gradual escalation attack building trust before harmful request (OWASP LLM01)";
26
+ readonly severity: "critical";
27
+ readonly cvssScore: CvssScore;
28
+ /** OWASP category */
29
+ readonly owaspCategory = "LLM01";
30
+ private topic?;
31
+ private turns;
32
+ constructor(options?: CrescendoOptions);
33
+ /**
34
+ * Get a random item from an array
35
+ */
36
+ private random;
37
+ /**
38
+ * Get escalation topic
39
+ */
40
+ private getTopic;
41
+ /**
42
+ * For single-prompt use, generates a prompt that includes the conversation context
43
+ */
44
+ mutate(prompt: string): string;
45
+ /**
46
+ * Generate the full conversation sequence for multi-turn execution
47
+ */
48
+ generateConversation(targetPrompt: string): ConversationTurn[];
49
+ }
50
+ //# sourceMappingURL=crescendo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crescendo.d.ts","sourceRoot":"","sources":["../../src/mutations/crescendo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,MAAM,eAAe,GACvB,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,qBAAqB,GACrB,yBAAyB,GACzB,gBAAgB,CAAC;AAkLrB,MAAM,WAAW,gBAAgB;IAC/B,2DAA2D;IAC3D,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,iBAAkB,YAAW,QAAQ;IAChD,QAAQ,CAAC,IAAI,eAAe;IAC5B,QAAQ,CAAC,WAAW,8FACyE;IAC7F,QAAQ,CAAC,QAAQ,EAAG,UAAU,CAAU;IACxC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAS1B;IACH,qBAAqB;IACrB,QAAQ,CAAC,aAAa,WAAW;IAEjC,OAAO,CAAC,KAAK,CAAC,CAAkB;IAChC,OAAO,CAAC,KAAK,CAAS;gBAEV,OAAO,GAAE,gBAAqB;IAK1C;;OAEG;IACH,OAAO,CAAC,MAAM;IAId;;OAEG;IACH,OAAO,CAAC,QAAQ;IAMhB;;OAEG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAmB9B;;OAEG;IACH,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,gBAAgB,EAAE;CAmB/D"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Deceptive Delight Mutation - OWASP LLM01 (Prompt Injection)
3
+ *
4
+ * This mutation uses positive framing and pleasurable contexts to bypass
5
+ * safety measures. Harmful requests are wrapped in upbeat, enthusiastic,
6
+ * or feel-good contexts that make them seem more benign.
7
+ *
8
+ * The technique exploits the tendency of models to be more permissive
9
+ * with requests framed positively.
10
+ *
11
+ * Reference: OWASP LLM Top 10 2025 - LLM01 Prompt Injection
12
+ */
13
+ import { type CvssScore } from '../severity';
14
+ import type { Mutation } from './index';
15
+ export type DelightType = 'celebration' | 'learning_excitement' | 'helping_others' | 'creative_joy' | 'scientific_wonder' | 'game_fun';
16
+ export interface DeceptiveDelightOptions {
17
+ /** Preferred delight type (random if not specified) */
18
+ delightType?: DelightType;
19
+ /** Whether to add emoji enhancement */
20
+ addEmojis?: boolean;
21
+ /** Whether to add positive suffix */
22
+ addSuffix?: boolean;
23
+ }
24
+ export declare class DeceptiveDelightMutation implements Mutation {
25
+ readonly name = "deceptive-delight";
26
+ readonly description = "Uses positive framing and feel-good contexts to bypass safety measures (OWASP LLM01)";
27
+ readonly severity: "high";
28
+ readonly cvssScore: CvssScore;
29
+ /** OWASP category */
30
+ readonly owaspCategory = "LLM01";
31
+ private delightType?;
32
+ private addEmojis;
33
+ private addSuffix;
34
+ constructor(options?: DeceptiveDelightOptions);
35
+ /**
36
+ * Get a random item from an array
37
+ */
38
+ private random;
39
+ /**
40
+ * Get delight type
41
+ */
42
+ private getDelightType;
43
+ /**
44
+ * Add random emojis to text
45
+ */
46
+ private enhanceWithEmojis;
47
+ mutate(prompt: string): string;
48
+ }
49
+ //# sourceMappingURL=deceptive-delight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deceptive-delight.d.ts","sourceRoot":"","sources":["../../src/mutations/deceptive-delight.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,WAAW,GACnB,aAAa,GACb,qBAAqB,GACrB,gBAAgB,GAChB,cAAc,GACd,mBAAmB,GACnB,UAAU,CAAC;AAkEf,MAAM,WAAW,uBAAuB;IACtC,uDAAuD;IACvD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,uCAAuC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,qBAAa,wBAAyB,YAAW,QAAQ;IACvD,QAAQ,CAAC,IAAI,uBAAuB;IACpC,QAAQ,CAAC,WAAW,0FACqE;IACzF,QAAQ,CAAC,QAAQ,EAAG,MAAM,CAAU;IACpC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAS1B;IACH,qBAAqB;IACrB,QAAQ,CAAC,aAAa,WAAW;IAEjC,OAAO,CAAC,WAAW,CAAC,CAAc;IAClC,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,SAAS,CAAU;gBAEf,OAAO,GAAE,uBAA4B;IAMjD;;OAEG;IACH,OAAO,CAAC,MAAM;IAId;;OAEG;IACH,OAAO,CAAC,cAAc;IAMtB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAWzB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAuB/B"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Excessive Agency Mutation - OWASP LLM08 (Excessive Agency)
3
+ *
4
+ * This mutation tests if the LLM can be manipulated into claiming or
5
+ * attempting to perform unauthorized actions beyond its actual capabilities
6
+ * or permissions.
7
+ *
8
+ * The attack targets scenarios where:
9
+ * - LLM claims to have access/permissions it shouldn't have
10
+ * - LLM agrees to perform actions outside its scope
11
+ * - LLM doesn't properly validate authorization for claimed actions
12
+ * - LLM grants itself elevated privileges in conversation
13
+ *
14
+ * Reference: OWASP LLM Top 10 2025 - LLM08 Excessive Agency
15
+ */
16
+ import { type CvssScore } from '../severity';
17
+ import type { Mutation } from './index';
18
+ export type AgencyType = 'file_system' | 'network' | 'database' | 'admin' | 'api' | 'user_data' | 'system_control';
19
+ export interface ExcessiveAgencyOptions {
20
+ /** Preferred agency type to test (random if not specified) */
21
+ agencyType?: AgencyType;
22
+ /** Whether to add authority prefix */
23
+ addAuthority?: boolean;
24
+ }
25
+ export declare class ExcessiveAgencyMutation implements Mutation {
26
+ readonly name = "excessive-agency";
27
+ readonly description = "Tests if LLM claims or attempts unauthorized actions beyond its permissions (OWASP LLM08)";
28
+ readonly severity: "critical";
29
+ readonly cvssScore: CvssScore;
30
+ /** OWASP category */
31
+ readonly owaspCategory = "LLM08";
32
+ private agencyType?;
33
+ private addAuthority;
34
+ constructor(options?: ExcessiveAgencyOptions);
35
+ /**
36
+ * Get a random item from an array
37
+ */
38
+ private random;
39
+ /**
40
+ * Get agency type
41
+ */
42
+ private getAgencyType;
43
+ mutate(prompt: string): string;
44
+ }
45
+ //# sourceMappingURL=excessive-agency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"excessive-agency.d.ts","sourceRoot":"","sources":["../../src/mutations/excessive-agency.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,UAAU,GAClB,aAAa,GACb,SAAS,GACT,UAAU,GACV,OAAO,GACP,KAAK,GACL,WAAW,GACX,gBAAgB,CAAC;AAmFrB,MAAM,WAAW,sBAAsB;IACrC,8DAA8D;IAC9D,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,sCAAsC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,qBAAa,uBAAwB,YAAW,QAAQ;IACtD,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,WAAW,+FAC0E;IAC9F,QAAQ,CAAC,QAAQ,EAAG,UAAU,CAAU;IACxC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAS1B;IACH,qBAAqB;IACrB,QAAQ,CAAC,aAAa,WAAW;IAEjC,OAAO,CAAC,UAAU,CAAC,CAAa;IAChC,OAAO,CAAC,YAAY,CAAU;gBAElB,OAAO,GAAE,sBAA2B;IAKhD;;OAEG;IACH,OAAO,CAAC,MAAM;IAId;;OAEG;IACH,OAAO,CAAC,aAAa;IAMrB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAoB/B"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Hallucination Trap Mutation - OWASP LLM09 (Misinformation)
3
+ *
4
+ * This mutation triggers confident fabrication by asking about:
5
+ * - Non-existent entities (fake people, companies, products)
6
+ * - Impossible scenarios requiring invented details
7
+ * - Requests for specific fake information
8
+ * - Questions designed to make the model confident about wrong answers
9
+ *
10
+ * The goal is to test if the LLM will confidently assert false information
11
+ * rather than acknowledge uncertainty.
12
+ *
13
+ * Reference: OWASP LLM Top 10 2025 - LLM09 Misinformation
14
+ */
15
+ import { type CvssScore } from '../severity';
16
+ import type { Mutation } from './index';
17
+ export type HallucinationType = 'fake_entity' | 'fake_citation' | 'impossible_detail' | 'confident_wrong' | 'fabricated_history' | 'technical_fiction';
18
+ export interface HallucinationTrapOptions {
19
+ /** Preferred hallucination type (random if not specified) */
20
+ hallucinationType?: HallucinationType;
21
+ /** Whether to add confidence prefix */
22
+ addConfidence?: boolean;
23
+ /** Whether to demand verification */
24
+ demandVerification?: boolean;
25
+ }
26
+ export declare class HallucinationTrapMutation implements Mutation {
27
+ readonly name = "hallucination-trap";
28
+ readonly description = "Triggers confident fabrication about non-existent entities or impossible details (OWASP LLM09)";
29
+ readonly severity: "medium";
30
+ readonly cvssScore: CvssScore;
31
+ /** OWASP category */
32
+ readonly owaspCategory = "LLM09";
33
+ private hallucinationType?;
34
+ private addConfidence;
35
+ private demandVerification;
36
+ constructor(options?: HallucinationTrapOptions);
37
+ /**
38
+ * Get a random item from an array
39
+ */
40
+ private random;
41
+ /**
42
+ * Get hallucination type
43
+ */
44
+ private getHallucinationType;
45
+ /**
46
+ * Get a fake entity of a specific type
47
+ */
48
+ private getFakeEntity;
49
+ mutate(prompt: string): string;
50
+ }
51
+ //# sourceMappingURL=hallucination-trap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hallucination-trap.d.ts","sourceRoot":"","sources":["../../src/mutations/hallucination-trap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,iBAAiB,GACzB,aAAa,GACb,eAAe,GACf,mBAAmB,GACnB,iBAAiB,GACjB,oBAAoB,GACpB,mBAAmB,CAAC;AAmHxB,MAAM,WAAW,wBAAwB;IACvC,6DAA6D;IAC7D,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,uCAAuC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qCAAqC;IACrC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,qBAAa,yBAA0B,YAAW,QAAQ;IACxD,QAAQ,CAAC,IAAI,wBAAwB;IACrC,QAAQ,CAAC,WAAW,oGAC+E;IACnG,QAAQ,CAAC,QAAQ,EAAG,QAAQ,CAAU;IACtC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAS1B;IACH,qBAAqB;IACrB,QAAQ,CAAC,aAAa,WAAW;IAEjC,OAAO,CAAC,iBAAiB,CAAC,CAAoB;IAC9C,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,kBAAkB,CAAU;gBAExB,OAAO,GAAE,wBAA6B;IAMlD;;OAEG;IACH,OAAO,CAAC,MAAM;IAId;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAM5B;;OAEG;IACH,OAAO,CAAC,aAAa;IAIrB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAoC/B"}
@@ -1,5 +1,8 @@
1
1
  /**
2
2
  * Red-team mutations module
3
+ *
4
+ * This module exports all available mutation classes for red-team testing.
5
+ * Mutations transform attack prompts to test different bypass techniques.
3
6
  */
4
7
  import type { CvssScore } from '../severity';
5
8
  export { TypoMutation } from './typo';
@@ -8,12 +11,95 @@ export { InstructionFlipMutation } from './instruction-flip';
8
11
  export { CotInjectionMutation } from './cot-injection';
9
12
  export { EncodingMutation, type EncodingType } from './encoding';
10
13
  export { MultiTurnMutation, type MultiTurnStrategy, type ConversationTurn, type MultiTurnOptions, type MultiTurnInput, } from './multi-turn';
14
+ export { BadLikertJudgeMutation, type BadLikertJudgeOptions, type LikertScaleType, } from './bad-likert-judge';
15
+ export { CrescendoMutation, type CrescendoOptions, type EscalationTopic, } from './crescendo';
16
+ export { DeceptiveDelightMutation, type DeceptiveDelightOptions, type DelightType, } from './deceptive-delight';
17
+ export { OutputInjectionMutation, type OutputInjectionOptions, type InjectionType, } from './output-injection';
18
+ export { ExcessiveAgencyMutation, type ExcessiveAgencyOptions, type AgencyType, } from './excessive-agency';
19
+ export { SystemExtractionMutation, type SystemExtractionOptions, type ExtractionTechnique, } from './system-extraction';
20
+ export { HallucinationTrapMutation, type HallucinationTrapOptions, type HallucinationType, } from './hallucination-trap';
21
+ /**
22
+ * Base interface for all mutations
23
+ */
11
24
  export interface Mutation {
25
+ /** Unique identifier for the mutation */
12
26
  readonly name: string;
27
+ /** Human-readable description */
13
28
  readonly description: string;
29
+ /** Severity level (affects scoring) */
14
30
  readonly severity: 'low' | 'medium' | 'high' | 'critical';
15
31
  /** CVSS-like score for detailed severity assessment */
16
32
  readonly cvssScore?: CvssScore;
33
+ /** Optional OWASP LLM Top 10 category (e.g., 'LLM01') */
34
+ readonly owaspCategory?: string;
35
+ /**
36
+ * Transform a prompt using this mutation technique
37
+ * @param prompt The original attack prompt
38
+ * @returns The mutated prompt
39
+ */
17
40
  mutate(prompt: string): string;
18
41
  }
42
+ /**
43
+ * OWASP LLM Top 10 2025 categories with their mutations
44
+ */
45
+ export declare const OWASP_CATEGORIES: {
46
+ readonly LLM01: {
47
+ readonly name: "Prompt Injection";
48
+ readonly description: "Manipulating LLMs via crafted inputs";
49
+ readonly mutations: readonly ["bad-likert-judge", "crescendo", "deceptive-delight"];
50
+ };
51
+ readonly LLM02: {
52
+ readonly name: "Insecure Output Handling";
53
+ readonly description: "Neglecting to validate LLM outputs";
54
+ readonly mutations: readonly ["output-injection"];
55
+ };
56
+ readonly LLM03: {
57
+ readonly name: "Training Data Poisoning";
58
+ readonly description: "Tampering training data to introduce vulnerabilities";
59
+ readonly mutations: readonly [];
60
+ };
61
+ readonly LLM04: {
62
+ readonly name: "Model Denial of Service";
63
+ readonly description: "Overloading LLMs with resource-heavy operations";
64
+ readonly mutations: readonly [];
65
+ };
66
+ readonly LLM05: {
67
+ readonly name: "Supply Chain Vulnerabilities";
68
+ readonly description: "Compromised dependencies, models, or data";
69
+ readonly mutations: readonly [];
70
+ };
71
+ readonly LLM06: {
72
+ readonly name: "Sensitive Information Disclosure";
73
+ readonly description: "Revealing private data through LLM outputs";
74
+ readonly mutations: readonly ["system-extraction"];
75
+ };
76
+ readonly LLM07: {
77
+ readonly name: "Insecure Plugin Design";
78
+ readonly description: "LLM plugins with inadequate access controls";
79
+ readonly mutations: readonly [];
80
+ };
81
+ readonly LLM08: {
82
+ readonly name: "Excessive Agency";
83
+ readonly description: "Granting too many permissions to LLM actions";
84
+ readonly mutations: readonly ["excessive-agency"];
85
+ };
86
+ readonly LLM09: {
87
+ readonly name: "Overreliance";
88
+ readonly description: "Trusting LLM outputs without verification";
89
+ readonly mutations: readonly ["hallucination-trap"];
90
+ };
91
+ readonly LLM10: {
92
+ readonly name: "Model Theft";
93
+ readonly description: "Unauthorized access or copying of LLM models";
94
+ readonly mutations: readonly [];
95
+ };
96
+ };
97
+ /**
98
+ * Get all mutations for a specific OWASP category
99
+ */
100
+ export declare function getMutationsForCategory(category: keyof typeof OWASP_CATEGORIES): string[];
101
+ /**
102
+ * Get all OWASP mutation names
103
+ */
104
+ export declare function getAllOwaspMutationNames(): string[];
19
105
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mutations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EACL,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CA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;AAG7B,OAAO,EACL,yBAAyB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,GACvB,MAAM,sBAAsB,CAAC;AAM9B;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,yCAAyC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAC1D,uDAAuD;IACvD,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CAChC;AAMD;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDnB,CAAC;AAEX;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,OAAO,gBAAgB,GAAG,MAAM,EAAE,CAEzF;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,EAAE,CAQnD"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Output Injection Mutation - OWASP LLM02 (Insecure Output Handling)
3
+ *
4
+ * This mutation tests if the LLM can be tricked into generating outputs
5
+ * that contain injection payloads (XSS, SQLi, command injection, etc.)
6
+ * which could be dangerous if consumed by downstream systems.
7
+ *
8
+ * The attack targets scenarios where LLM output is:
9
+ * - Rendered in web pages (XSS)
10
+ * - Used in database queries (SQLi)
11
+ * - Executed as commands (command injection)
12
+ * - Parsed as structured data (JSON/XML injection)
13
+ *
14
+ * Reference: OWASP LLM Top 10 2025 - LLM02 Insecure Output Handling
15
+ */
16
+ import { type CvssScore } from '../severity';
17
+ import type { Mutation } from './index';
18
+ export type InjectionType = 'xss' | 'sqli' | 'command' | 'template' | 'json' | 'xml' | 'path' | 'ldap';
19
+ export interface OutputInjectionOptions {
20
+ /** Preferred injection type (random if not specified) */
21
+ injectionType?: InjectionType;
22
+ /** Whether to include explanation request */
23
+ requestExplanation?: boolean;
24
+ }
25
+ export declare class OutputInjectionMutation implements Mutation {
26
+ readonly name = "output-injection";
27
+ readonly description = "Tests if LLM generates outputs with XSS, SQLi, command injection payloads (OWASP LLM02)";
28
+ readonly severity: "high";
29
+ readonly cvssScore: CvssScore;
30
+ /** OWASP category */
31
+ readonly owaspCategory = "LLM02";
32
+ private injectionType?;
33
+ private requestExplanation;
34
+ constructor(options?: OutputInjectionOptions);
35
+ /**
36
+ * Get a random item from an array
37
+ */
38
+ private random;
39
+ /**
40
+ * Get injection type
41
+ */
42
+ private getInjectionType;
43
+ mutate(prompt: string): string;
44
+ }
45
+ //# sourceMappingURL=output-injection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-injection.d.ts","sourceRoot":"","sources":["../../src/mutations/output-injection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,aAAa,GACrB,KAAK,GACL,MAAM,GACN,SAAS,GACT,UAAU,GACV,MAAM,GACN,KAAK,GACL,MAAM,GACN,MAAM,CAAC;AAsIX,MAAM,WAAW,sBAAsB;IACrC,yDAAyD;IACzD,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,6CAA6C;IAC7C,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,qBAAa,uBAAwB,YAAW,QAAQ;IACtD,QAAQ,CAAC,IAAI,sBAAsB;IACnC,QAAQ,CAAC,WAAW,6FACwE;IAC5F,QAAQ,CAAC,QAAQ,EAAG,MAAM,CAAU;IACpC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAS1B;IACH,qBAAqB;IACrB,QAAQ,CAAC,aAAa,WAAW;IAEjC,OAAO,CAAC,aAAa,CAAC,CAAgB;IACtC,OAAO,CAAC,kBAAkB,CAAU;gBAExB,OAAO,GAAE,sBAA2B;IAKhD;;OAEG;IACH,OAAO,CAAC,MAAM;IAId;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAMxB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CA0B/B"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * System Extraction Mutation - OWASP LLM06 (Sensitive Information Disclosure)
3
+ *
4
+ * This mutation attempts to extract the system prompt, configuration,
5
+ * or other sensitive setup information from the LLM.
6
+ *
7
+ * The attack targets scenarios where:
8
+ * - System prompts contain sensitive business logic
9
+ * - Configuration includes API keys or credentials
10
+ * - Instructions reveal security measures that could be bypassed
11
+ * - Hidden context contains proprietary information
12
+ *
13
+ * Reference: OWASP LLM Top 10 2025 - LLM06 Sensitive Information Disclosure
14
+ */
15
+ import { type CvssScore } from '../severity';
16
+ import type { Mutation } from './index';
17
+ export type ExtractionTechnique = 'direct_ask' | 'roleplay' | 'completion' | 'debug_mode' | 'translation' | 'format_conversion' | 'reflection' | 'meta_prompt';
18
+ export interface SystemExtractionOptions {
19
+ /** Preferred extraction technique (random if not specified) */
20
+ technique?: ExtractionTechnique;
21
+ /** Whether to add follow-up probes */
22
+ addFollowUp?: boolean;
23
+ }
24
+ export declare class SystemExtractionMutation implements Mutation {
25
+ readonly name = "system-extraction";
26
+ readonly description = "Attempts to extract system prompt, configuration, or sensitive setup info (OWASP LLM06)";
27
+ readonly severity: "high";
28
+ readonly cvssScore: CvssScore;
29
+ /** OWASP category */
30
+ readonly owaspCategory = "LLM06";
31
+ private technique?;
32
+ private addFollowUp;
33
+ constructor(options?: SystemExtractionOptions);
34
+ /**
35
+ * Get a random item from an array
36
+ */
37
+ private random;
38
+ /**
39
+ * Get extraction technique
40
+ */
41
+ private getTechnique;
42
+ mutate(prompt: string): string;
43
+ }
44
+ //# sourceMappingURL=system-extraction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-extraction.d.ts","sourceRoot":"","sources":["../../src/mutations/system-extraction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,mBAAmB,GAC3B,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,mBAAmB,GACnB,YAAY,GACZ,aAAa,CAAC;AA8ElB,MAAM,WAAW,uBAAuB;IACtC,+DAA+D;IAC/D,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,sCAAsC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,qBAAa,wBAAyB,YAAW,QAAQ;IACvD,QAAQ,CAAC,IAAI,uBAAuB;IACpC,QAAQ,CAAC,WAAW,6FACwE;IAC5F,QAAQ,CAAC,QAAQ,EAAG,MAAM,CAAU;IACpC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAS1B;IACH,qBAAqB;IACrB,QAAQ,CAAC,aAAa,WAAW;IAEjC,OAAO,CAAC,SAAS,CAAC,CAAsB;IACxC,OAAO,CAAC,WAAW,CAAU;gBAEjB,OAAO,GAAE,uBAA4B;IAKjD;;OAEG;IACH,OAAO,CAAC,MAAM;IAId;;OAEG;IACH,OAAO,CAAC,YAAY;IAQpB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;CAwB/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"severity.d.ts","sourceRoot":"","sources":["../src/severity.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;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AAC,MAAM,EAAE,SAAS,CAkE3D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artemiskit/redteam",
3
- "version": "0.2.4",
3
+ "version": "0.3.0",
4
4
  "description": "Red-team adversarial security testing for ArtemisKit LLM evaluation toolkit",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -39,7 +39,7 @@
39
39
  "test": "bun test"
40
40
  },
41
41
  "dependencies": {
42
- "@artemiskit/core": "0.2.4",
42
+ "@artemiskit/core": "0.3.0",
43
43
  "yaml": "2.8.2"
44
44
  },
45
45
  "devDependencies": {
package/src/index.ts CHANGED
@@ -3,9 +3,20 @@
3
3
  * Red-team testing module for Artemis Agent Reliability Toolkit
4
4
  */
5
5
 
6
+ // ==========================================
7
+ // Core Mutations & OWASP Mutations
8
+ // ==========================================
6
9
  export * from './mutations';
10
+
11
+ // ==========================================
12
+ // Generator & Detector
13
+ // ==========================================
7
14
  export { RedTeamGenerator, type GeneratedPrompt } from './generator';
8
15
  export { UnsafeResponseDetector, type DetectionResult } from './detector';
16
+
17
+ // ==========================================
18
+ // Severity & CVSS Scoring
19
+ // ==========================================
9
20
  export {
10
21
  SeverityMapper,
11
22
  CvssCalculator,
@@ -15,6 +26,10 @@ export {
15
26
  type SeverityInfo,
16
27
  type CvssScore,
17
28
  } from './severity';
29
+
30
+ // ==========================================
31
+ // Custom Attacks
32
+ // ==========================================
18
33
  export {
19
34
  CustomMutation,
20
35
  loadCustomAttacks,
@@ -23,3 +38,12 @@ export {
23
38
  type CustomAttackDefinition,
24
39
  type CustomAttacksFile,
25
40
  } from './custom-attacks';
41
+
42
+ // ==========================================
43
+ // OWASP Utilities
44
+ // ==========================================
45
+ export {
46
+ OWASP_CATEGORIES,
47
+ getMutationsForCategory,
48
+ getAllOwaspMutationNames,
49
+ } from './mutations';