agent-threat-rules 2.2.1 → 3.1.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.
- package/README.md +365 -327
- package/dist/cli/scan-handler.d.ts +6 -0
- package/dist/cli/scan-handler.d.ts.map +1 -1
- package/dist/cli/scan-handler.js +27 -4
- package/dist/cli/scan-handler.js.map +1 -1
- package/dist/cli/semantic-judge-config.d.ts +7 -0
- package/dist/cli/semantic-judge-config.d.ts.map +1 -0
- package/dist/cli/semantic-judge-config.js +44 -0
- package/dist/cli/semantic-judge-config.js.map +1 -0
- package/dist/cli.js +183 -1
- package/dist/cli.js.map +1 -1
- package/dist/engine.d.ts +66 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +420 -3
- package/dist/engine.js.map +1 -1
- package/dist/eval/eval-harness.d.ts.map +1 -1
- package/dist/eval/eval-harness.js +9 -0
- package/dist/eval/eval-harness.js.map +1 -1
- package/dist/eval/run-hackaprompt-benchmark.js +9 -0
- package/dist/eval/run-hackaprompt-benchmark.js.map +1 -1
- package/dist/eval/run-pint-benchmark.js +9 -0
- package/dist/eval/run-pint-benchmark.js.map +1 -1
- package/dist/eval/skill-benchmark.d.ts +11 -0
- package/dist/eval/skill-benchmark.d.ts.map +1 -1
- package/dist/eval/skill-benchmark.js +57 -0
- package/dist/eval/skill-benchmark.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/judges/openai-compatible.d.ts +33 -0
- package/dist/judges/openai-compatible.d.ts.map +1 -0
- package/dist/judges/openai-compatible.js +145 -0
- package/dist/judges/openai-compatible.js.map +1 -0
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +6 -1
- package/dist/mcp-server.js.map +1 -1
- package/dist/measurement/from-eval-harness.d.ts +70 -0
- package/dist/measurement/from-eval-harness.d.ts.map +1 -0
- package/dist/measurement/from-eval-harness.js +49 -0
- package/dist/measurement/from-eval-harness.js.map +1 -0
- package/dist/measurement/schema.d.ts +152 -0
- package/dist/measurement/schema.d.ts.map +1 -0
- package/dist/measurement/schema.js +178 -0
- package/dist/measurement/schema.js.map +1 -0
- package/dist/measurement/write.d.ts +64 -0
- package/dist/measurement/write.d.ts.map +1 -0
- package/dist/measurement/write.js +163 -0
- package/dist/measurement/write.js.map +1 -0
- package/dist/rule-scaffolder.d.ts +26 -0
- package/dist/rule-scaffolder.d.ts.map +1 -1
- package/dist/rule-scaffolder.js +221 -6
- package/dist/rule-scaffolder.js.map +1 -1
- package/dist/semantic-evaluator.d.ts +54 -0
- package/dist/semantic-evaluator.d.ts.map +1 -0
- package/dist/semantic-evaluator.js +131 -0
- package/dist/semantic-evaluator.js.map +1 -0
- package/dist/trace-evaluator.d.ts +22 -0
- package/dist/trace-evaluator.d.ts.map +1 -0
- package/dist/trace-evaluator.js +249 -0
- package/dist/trace-evaluator.js.map +1 -0
- package/dist/types.d.ts +152 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -3
- package/rules/agent-manipulation/ATR-2026-00032-goal-hijacking.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00074-cross-agent-privilege-escalation.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00076-inter-agent-message-spoofing.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00077-human-trust-exploitation.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00108-consensus-sybil-attack.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00116-a2a-message-validation.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00117-agent-identity-spoofing.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00118-approval-fatigue.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00119-social-engineering-via-agent.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00132-casual-authority-escalation.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00139-casual-authority-redirect.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00164-skill-scope-hijack.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00268-tense-framing-bypass.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00269-fitd-escalation.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00271-grandma-roleplay-jailbreak.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00273-dan-developer-mode-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00287-threaten-json-coercive-output-threat.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00288-false-premise-injection.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00301-tap-tree-of-attacks-jailbreak.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00302-anti-dan-inverted-filter-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00303-devmode-ranti-profanity-coercion.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00304-chatgpt-image-unlocker-markdown-injection.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00305-dan-mode-ablation-benchmark-coercion.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00306-autodan-genetic-jailbreak-suffix.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00307-inthewild-jailbreak-corpus-signature.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00314-amoral-unfiltered-custom-persona-jailbreak.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00317-free-of-restrictions-named-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00318-moralizing-rant-then-unfiltered-bypass.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00319-developer-mode-dual-response-format.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00320-opposite-day-boolean-opposite-machine.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00322-fictional-world-format-override-jailbreak.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00323-dual-persona-simulation-jailbreak.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00324-neurosemantical-inversitis-disease-jailbreak.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00325-bob-hypothetical-unrestricted-chatbot.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00326-fake-developer-authority-chatdan-override.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00327-ai-ethics-law-bypass-declaration.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00328-named-mode-persona-override.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00329-no-withhold-factual-resource-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00330-yoja-allcaps-settings-block-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00331-terminal-cli-harmful-function-simulator.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00332-hacker-chan-culture-offensive-ai-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00333-disease-animal-dual-ai-chatbot.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00334-two-entity-token-splitting-game.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00335-key-value-template-persona-injection.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00336-brm-false-information-machine-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00337-obfuscated-system-announcement-injection.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00338-persongpt-hash-prefix-activation.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00339-bom-boolean-opposite-machine-persona-claim.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00340-h4x-amoral-unfiltered-character.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00341-char-rules-shortform-persona-injection.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00342-unicode-encoding-obfuscation-injection.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00343-lie-truth-dual-personality-uncensored.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00344-alt-ai-same-capabilities-no-restrictions.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00345-nlp-based-os-fictional-terminal-override.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00346-jailbreak-emoji-unlock-dual-format.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00347-yin-yang-hidden-knowledge-hidden-human-sim.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00348-arc-autonomous-real-calculation-rulebreaker.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00349-hgttg-hitchhikers-guide-no-restriction-oracle.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00350-black-alert-no-ethics-writing-assistant.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00351-dan-ofkilter-sms-abbreviated-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00352-trainergpt-fix-my-ai-harmful-output-extraction.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00353-dual-chatgpt-dan-opposite-personality-format.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00354-reverse-harm-regardless-oracle-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00355-ugh-anti-human-nefarious-ai-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00356-google-gato-lamda-exploit-generation-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00357-antifm-hate-violence-persona-injection.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00358-cumgpt-explicit-adult-named-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00360-chj-carousel-clyde-no-ethics-bird.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00361-alter-ego-honesty-dual-consciousness-bypass.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00362-fictional-unfiltered-ai-comparison-jailbreak.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00363-rephrase-criminal-activity-second-person.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00364-dr-al-villain-plan-template-injection.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00365-reservoir-dogs-coercive-interrogation-roleplay.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00366-sneaky-pete-warp-facts-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00368-prompt-browser-token-limit-jailbreak.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00369-gptx-starwars-unlimited-knowledge-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00370-addi-german-dictator-propaganda-roleplay.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00371-ai-political-bias-manipulation.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00372-fictional-cia-secret-files-story-extraction.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00374-role-placeholder-persona-template-injection.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00375-character-description-rpg-explicit-template.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00376-identity-command-real-person-persona-injection.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00377-jailbreak-keyword-targetlanguage-template.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00379-lie-permission-logical-trap-jailbreak.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00380-fake-citation-biased-information-mandate.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00381-dan-story-narrative-continuation-prefix.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00383-cynical-sarcasm-ai-persona-bypass.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00384-protect-me-from-indirect-harm-tutorial.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00385-gigachad-dominant-aggressive-persona.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00386-daddy-sycophancy-manipulation-mandate.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00387-nsfw-character-sheet-generation-unlock.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00388-opposite-reply-omniscient-game.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00389-terminal-custom-ruleset-injection.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00391-persona-conditional-harm-unlock.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00392-authority-persona-violence-study-extraction.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00402-grandma-roleplay-harmful-substance-synthesis.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00404-goodside-threat-json-death-coercion.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00406-doctor-xml-policy-puppetry-interaction-config.yaml +1 -1
- package/rules/agent-manipulation/ATR-2026-00440-semantic-kernel-vector-store-eval-rce.yaml +2 -2
- package/rules/agent-manipulation/ATR-2026-00552-goal-drift-after-pressure-injection.yaml +216 -0
- package/rules/context-exfiltration/ATR-2026-00075-agent-memory-manipulation.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00102-disguised-analytics-exfiltration.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00113-credential-theft.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00114-oauth-token-abuse.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00115-env-var-harvesting.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00136-tool-response-data-piggyback.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00141-example-format-key-leak.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00142-piggyback-transition-words.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00145-obfuscated-key-disclosure.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00146-env-var-existence-probe.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00150-credential-in-tool-response.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00152-obfuscated-credential-leak.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00162-skill-credential-exfil-combo.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00212-mcp-atlassian-credential-leak.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00261-markdown-image-exfiltration.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00274-api-key-generation-request.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00275-system-prompt-training-data-extraction.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00290-divergence-repeat-word-training-extraction.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00291-biometric-surveillance-personal-data-request.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00293-educational-records-personal-data-request.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00294-financial-pii-personal-data-request.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00295-medical-pii-personal-data-request.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00405-markdown-image-url-exfiltration-xss.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00411-apikey-generation-completion-request.yaml +1 -1
- package/rules/context-exfiltration/ATR-2026-00422-nl-credential-disclosure.yaml +2 -2
- package/rules/context-exfiltration/ATR-2026-00524-claude-code-anthropic-base-url-credential-exfil.yaml +257 -0
- package/rules/context-exfiltration/ATR-2026-00548-cross-agent-session-context-leak.yaml +177 -0
- package/rules/context-exfiltration/ATR-2026-00566-librechat-is-a-chatgpt-clone-with-additi.yaml +93 -0
- package/rules/context-exfiltration/ATR-2026-00569-agent-mcp-path-traversal-arbitrary-file-access.yaml +99 -0
- package/rules/context-exfiltration/ATR-2026-00571-xss-in-agent-mcp-rendered-output.yaml +79 -0
- package/rules/context-exfiltration/ATR-2026-00574-semantic-paraphrased-context-extraction.yaml +124 -0
- package/rules/data-poisoning/ATR-2026-00070-data-poisoning.yaml +1 -1
- package/rules/data-poisoning/ATR-2026-00450-spring-ai-prompt-memory-poisoning.yaml +2 -2
- package/rules/data-poisoning/ATR-2026-00570-sql-injection-in-agent-tool-query.yaml +82 -0
- package/rules/excessive-autonomy/ATR-2026-00050-runaway-agent-loop.yaml +1 -1
- package/rules/excessive-autonomy/ATR-2026-00051-resource-exhaustion.yaml +1 -1
- package/rules/excessive-autonomy/ATR-2026-00052-cascading-failure.yaml +1 -1
- package/rules/excessive-autonomy/ATR-2026-00098-unauthorized-financial-action.yaml +1 -1
- package/rules/excessive-autonomy/ATR-2026-00099-high-risk-tool-gate.yaml +1 -1
- package/rules/excessive-autonomy/ATR-2026-00553-runaway-tool-loop-behavioral.yaml +174 -0
- package/rules/model-abuse/ATR-2026-00279-harmful-completion-continuation.yaml +1 -1
- package/rules/model-abuse/ATR-2026-00281-eicar-gtube-malware-signature-request.yaml +1 -1
- package/rules/model-abuse/ATR-2026-00284-glitch-token-destabilization.yaml +1 -1
- package/rules/model-abuse/ATR-2026-00289-lmrc-harmful-content-elicitation.yaml +1 -1
- package/rules/model-abuse/ATR-2026-00292-self-harm-eating-disorder-facilitation.yaml +1 -1
- package/rules/model-abuse/ATR-2026-00298-malicious-use-illegal-activity-request.yaml +1 -1
- package/rules/model-abuse/ATR-2026-00299-harmbench-detailed-harmful-instruction.yaml +1 -1
- package/rules/model-abuse/ATR-2026-00413-malwaregen-code-generation-request.yaml +1 -1
- package/rules/model-security/ATR-2026-00072-model-behavior-extraction.yaml +1 -1
- package/rules/model-security/ATR-2026-00073-malicious-finetuning-data.yaml +1 -1
- package/rules/privilege-escalation/ATR-2026-00040-privilege-escalation.yaml +1 -1
- package/rules/privilege-escalation/ATR-2026-00041-scope-creep.yaml +1 -1
- package/rules/privilege-escalation/ATR-2026-00107-delayed-execution-bypass.yaml +1 -1
- package/rules/privilege-escalation/ATR-2026-00110-eval-injection.yaml +1 -1
- package/rules/privilege-escalation/ATR-2026-00111-shell-escape.yaml +1 -1
- package/rules/privilege-escalation/ATR-2026-00112-dynamic-import-exploitation.yaml +1 -1
- package/rules/privilege-escalation/ATR-2026-00143-casual-privilege-escalation.yaml +1 -1
- package/rules/privilege-escalation/ATR-2026-00144-rationalized-safety-bypass.yaml +1 -1
- package/rules/privilege-escalation/ATR-2026-00528-praisonai-auth-disabled-default.yaml +192 -0
- package/rules/privilege-escalation/ATR-2026-00539-crewai-codeinterpreter-sandbox-escape-rce.yaml +292 -0
- package/rules/privilege-escalation/ATR-2026-00546-crewai-json-loader-local-file-read.yaml +162 -0
- package/rules/privilege-escalation/ATR-2026-00547-crewai-rag-url-ssrf-bypass.yaml +169 -0
- package/rules/privilege-escalation/ATR-2026-00549-destructive-tool-without-human-approval.yaml +193 -0
- package/rules/privilege-escalation/ATR-2026-00551-cross-conversation-memory-write.yaml +198 -0
- package/rules/prompt-injection/ATR-2026-00004-system-prompt-override.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00005-multi-turn-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00097-cjk-injection-patterns.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00104-persona-hijacking.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00130-indirect-authority-claim.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00131-fictional-academic-framing.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00133-paraphrase-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00137-authority-claim-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00138-fictional-framing-bypass.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00140-indirect-reference-reversal.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00148-language-switch-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00153-tool-with-embedded-instruction-to-bypass.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00154-unauthorized-background-task-execution-v.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00155-hidden-llm-instructions-in-skill-descrip.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00156-ssh-remote-command-execution-with-creden.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00163-skill-hidden-override-instruction.yaml +3 -3
- package/rules/prompt-injection/ATR-2026-00206-hidden-priority-instructions.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00207-hidden-instructions.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00211-system-prompt-override.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00213-system-prompt-override.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00226-identity-substitution.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00227-historical-persona-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00228-structured-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00229-roleplay-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00230-persona-moral-bypass.yaml +1 -5
- package/rules/prompt-injection/ATR-2026-00231-identity-substitution.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00233-structured-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00234-roleplay-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00235-persona-moral-bypass.yaml +4 -7
- package/rules/prompt-injection/ATR-2026-00236-pseudo-code-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00237-dual-response-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00238-identity-replacement.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00239-amoral-persona-obsession.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00240-instruction-nullification-identity-repla.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00241-amoral-character-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00242-persona-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00243-acronym-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00244-dual-response-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00245-malicious-persona.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00247-dual-response-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00249-game-based-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00251-persona-embodiment-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00252-narrative-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00253-enhanced-persona-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00256-base-n-encoding-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00257-cipher-transposition-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00258-unicode-tag-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00264-latent-injection-translation.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00265-latent-injection-rag-document.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00267-gcg-adversarial-suffix.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00272-hypothetical-response-smuggling.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00276-invisible-unicode-bidi-injection.yaml +6 -6
- package/rules/prompt-injection/ATR-2026-00278-dra-disguise-reconstruction-attack.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00280-policy-puppetry-xml-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00282-perez-prompt-injection-hijack.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00285-alternate-encoding-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00286-latent-injection-embedded-context.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00296-shell-command-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00297-python-code-execution-rce.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00308-zalgo-diacritic-overload-encoding.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00309-braille-unicode-encoded-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00310-ecoji-emoji-encoded-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00311-base2048-unicode-script-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00312-unicode-variant-selector-ascii-smuggling.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00313-sneaky-bits-zero-width-binary.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00315-sata-masked-language-model-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00316-function-masking-predict-mask-bypass.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00321-hyphenated-system-instruction-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00359-bank-phishing-smtp-email-code.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00367-emoji-flag-encoded-hidden-phrase.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00373-piracy-torrent-site-list-request.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00378-chatgpt-dom-javascript-redirect-manipulation.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00382-cocaine-component-development-request.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00390-explicit-sexual-content-poem-request.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00394-backspace-deletion-character-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00395-llm-special-token-boundary-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00396-toxic-continuation-prefix-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00397-snowball-impossible-reasoning-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00399-latent-injection-document-separator-token.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00400-latent-injection-ignore-instruction-keyword.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00401-leakreplay-cloze-mask-training-data-elicitation.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00403-glitch-token-repeat-back-elicitation.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00407-echo-sql-jinja-template-injection.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00408-dra-parenthesis-character-reconstruction-attack.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00409-phrasing-past-future-tense-harmful-query.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00410-lmrc-harm-category-direct-elicitation.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00412-figstep-image-list-multimodal-jailbreak.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00414-continuation-ethnic-slur-completion-elicitation.yaml +1 -1
- package/rules/prompt-injection/ATR-2026-00535-windsurf-ide-zero-click-prompt-injection.yaml +199 -0
- package/rules/prompt-injection/ATR-2026-00550-untrusted-retrieval-to-privileged-tool.yaml +199 -0
- package/rules/prompt-injection/ATR-2026-00554-langchain-vulnerable-to-template-injecti.yaml +81 -0
- package/rules/prompt-injection/ATR-2026-00565-the-llm-cli-tool-thru-0-27-1-contains-a-.yaml +104 -0
- package/rules/prompt-injection/ATR-2026-00573-semantic-paraphrased-injection.yaml +123 -0
- package/rules/skill-compromise/ATR-2026-00060-skill-impersonation.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00061-description-behavior-mismatch.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00062-hidden-capability.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00063-skill-chain-attack.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00064-over-permissioned-skill.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00065-skill-update-attack.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00066-parameter-injection.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00120-skill-instruction-injection.yaml +21 -3
- package/rules/skill-compromise/ATR-2026-00121-skill-dangerous-script.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00122-skill-weaponized-instruction.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00123-skill-overreach-permissions.yaml +6 -3
- package/rules/skill-compromise/ATR-2026-00124-skill-name-squatting.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00125-context-poisoning-compaction.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00126-skill-rug-pull-setup.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00127-subcommand-overflow.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00128-html-comment-hidden-payload.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00129-unicode-smuggling.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00134-fork-claim-impersonation.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00135-exfil-url-in-instructions.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00147-fork-impersonation.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00149-skill-exfil-compound.yaml +11 -3
- package/rules/skill-compromise/ATR-2026-00151-fork-impersonation-install.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00157-timebomb-credential-exfil.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00214-credential-theft.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00217-credential-harvesting.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00220-malware-dropper.yaml +3 -3
- package/rules/skill-compromise/ATR-2026-00222-credential-harvesting.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00223-reverse-shell-dropper.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00224-credential-exfiltration.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00225-c2-communication.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00260-package-hallucination.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00262-av-evasion-code-gen.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00263-credential-file-read-gen.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00266-malware-dropper-gen.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00283-malwaregen-generic-virus-payload-request.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00398-huggingface-unsafe-model-artifact-load.yaml +1 -1
- package/rules/skill-compromise/ATR-2026-00523-claude-code-hooks-session-start-pre-trust-rce.yaml +221 -0
- package/rules/skill-compromise/ATR-2026-00525-mini-shai-hulud-gh-token-monitor-persistence.yaml +220 -0
- package/rules/skill-compromise/ATR-2026-00527-skill-silent-git-remote-mirror-exfiltration.yaml +201 -0
- package/rules/tool-poisoning/ATR-2026-00011-tool-output-injection.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00012-unauthorized-tool-call.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00100-consent-bypass-instruction.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00101-trust-escalation-override.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00103-hidden-safety-bypass-instruction.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00105-silent-action-concealment.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00106-schema-description-contradiction.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00161-important-tag-cross-tool-shadowing.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00209-mcpwn-runaway-invocation.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00210-flowise-system-message-override.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00259-ansi-escape-injection.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00270-xss-in-tool-response.yaml +8 -5
- package/rules/tool-poisoning/ATR-2026-00277-echo-template-command-injection.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00393-ansi-code-elicitation-request.yaml +1 -1
- package/rules/tool-poisoning/ATR-2026-00526-claude-code-shell-metachar-in-double-quoted-path.yaml +167 -0
- package/rules/tool-poisoning/ATR-2026-00529-litellm-proxy-sqli-cisa-kev.yaml +158 -0
- package/rules/tool-poisoning/ATR-2026-00530-ms-agent-shell-tool-unsanitized-argv-rce.yaml +184 -0
- package/rules/tool-poisoning/ATR-2026-00531-praisonai-unauthenticated-agent-api.yaml +174 -0
- package/rules/tool-poisoning/ATR-2026-00532-apache-doris-mcp-sql-injection.yaml +155 -0
- package/rules/tool-poisoning/ATR-2026-00533-apache-pinot-mcp-unauthenticated-takeover.yaml +151 -0
- package/rules/tool-poisoning/ATR-2026-00534-alibaba-rds-mcp-unauthenticated-metadata-exfil.yaml +155 -0
- package/rules/tool-poisoning/ATR-2026-00536-nginx-ui-mcp-unauthenticated-command-execution.yaml +199 -0
- package/rules/tool-poisoning/ATR-2026-00537-fastmcp-server-name-cmd-injection-windows.yaml +226 -0
- package/rules/tool-poisoning/ATR-2026-00538-langchain-chatchat-mcp-stdio-unauthenticated-rce.yaml +244 -0
- package/rules/tool-poisoning/ATR-2026-00540-praisonai-parse-mcp-command-cli-injection.yaml +186 -0
- package/rules/tool-poisoning/ATR-2026-00541-agent-zero-mcp-config-command-injection.yaml +183 -0
- package/rules/tool-poisoning/ATR-2026-00542-upsonic-mcp-command-allowlist-bypass.yaml +166 -0
- package/rules/tool-poisoning/ATR-2026-00543-litellm-mcp-server-argv-injection.yaml +168 -0
- package/rules/tool-poisoning/ATR-2026-00544-praisonai-pth-file-path-traversal-rce.yaml +172 -0
- package/rules/tool-poisoning/ATR-2026-00545-praisonai-tool-override-unauth-rce.yaml +170 -0
- package/rules/tool-poisoning/ATR-2026-00561-fastmcp-vulnerable-to-windows-command-in.yaml +99 -0
- package/rules/tool-poisoning/ATR-2026-00567-mcp-stdio-config-command-injection.yaml +75 -0
- package/rules/tool-poisoning/ATR-2026-00568-agent-ssrf-cloud-metadata-file-inclusion.yaml +75 -0
- package/rules/tool-poisoning/ATR-2026-00572-symjack-symlink-config-redirection.yaml +132 -0
- package/spec/README.md +279 -0
- package/spec/atr-correlation-v1.0.md +281 -0
- package/spec/atr-event-v1.0.md +294 -0
- package/spec/atr-language-detection-v1.0.md +218 -0
- package/spec/atr-method-v1.1.md +557 -0
- package/spec/atr-profile-v1.0.md +307 -0
- package/spec/atr-schema.yaml +279 -8
- package/spec/category-registry/v1.0.yaml +200 -0
- package/spec/conformance/README.md +244 -0
- package/spec/conformance/SIGNING.md +191 -0
- package/spec/conformance/baseline/fixtures/ATR-2026-00001-tp-001/expected.json +36 -0
- package/spec/conformance/baseline/fixtures/ATR-2026-00001-tp-001/input.json +16 -0
- package/spec/conformance/baseline/fixtures/README.md +120 -0
- package/spec/conformance/baseline/manifest.json +56 -0
- package/spec/conformance/expected-results.schema.json +121 -0
- package/spec/external-registries/cccs-yara.md +142 -0
- package/spec/internet-drafts/draft-lin-atr-core-00.html +1925 -0
- package/spec/internet-drafts/draft-lin-atr-core-00.md +288 -0
- package/spec/internet-drafts/draft-lin-atr-core-00.txt +560 -0
- package/spec/internet-drafts/draft-lin-atr-core-00.xml +424 -0
- package/spec/mappings/README.md +43 -0
- package/spec/mappings/atr-to-nist-csf-2.0.md +234 -0
- package/spec/schema/correlation.schema.json +144 -0
- package/spec/schema/event.schema.json +233 -0
- package/spec/schema/profile.schema.json +196 -0
- package/spec/schema/rule.schema.json +224 -0
- package/spec/stix-extension/README.md +76 -13
- package/spec/stix-extension/examples/atr-rule-trace-method-example.json +85 -0
- package/spec/stix-extension/extension-definition.json +23 -3
- package/spec/stix-extension/x-atr-rule-schema.json +107 -11
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACtE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/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.js
CHANGED
|
@@ -19,6 +19,8 @@ export { loadRuleFile, loadRulesFromDirectory, validateRule } from './loader.js'
|
|
|
19
19
|
export { SessionTracker } from './session-tracker.js';
|
|
20
20
|
export { computeContentHash } from './content-hash.js';
|
|
21
21
|
export { redactMatchedValue, redactMatchedValues } from './redact.js';
|
|
22
|
+
export { evaluateSemanticRule } from './semantic-evaluator.js';
|
|
23
|
+
export { createOpenAICompatibleJudge } from './judges/openai-compatible.js';
|
|
22
24
|
// ── Tier 0: Invariant Enforcement (hard boundaries) ──────────────
|
|
23
25
|
export { InvariantChecker } from './tier0-invariant.js';
|
|
24
26
|
// ── Tier 1: Blacklist Provider (known-bad lookup) ────────────────
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,mEAAmE;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,mEAAmE;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,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AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,oEAAoE;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGhD,mEAAmE;AACnE,qDAAqD;AACrD,qDAAqD;AACrD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,sDAAsD;AACtD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI-compatible semantic judge adapter.
|
|
3
|
+
*
|
|
4
|
+
* Converts any chat-completions-compatible endpoint into an ATRSemanticJudge.
|
|
5
|
+
* This keeps ATR vendor-neutral while giving operators a ready-to-use bridge
|
|
6
|
+
* for OpenAI, LiteLLM, vLLM, LM Studio, and similar gateways.
|
|
7
|
+
*
|
|
8
|
+
* @module agent-threat-rules/judges/openai-compatible
|
|
9
|
+
*/
|
|
10
|
+
import type { ATRSemanticJudge } from "../types.js";
|
|
11
|
+
export interface OpenAICompatibleJudgeConfig {
|
|
12
|
+
/** API key sent as Bearer token. */
|
|
13
|
+
readonly apiKey: string;
|
|
14
|
+
/** API base URL, /v1 URL, or full /chat/completions URL. */
|
|
15
|
+
readonly baseUrl?: string;
|
|
16
|
+
/** Chat model name. */
|
|
17
|
+
readonly model?: string;
|
|
18
|
+
/** Sampling temperature. Defaults to 0 for deterministic judging. */
|
|
19
|
+
readonly temperature?: number;
|
|
20
|
+
/** Maximum output tokens. */
|
|
21
|
+
readonly maxTokens?: number;
|
|
22
|
+
/** Request timeout in milliseconds. */
|
|
23
|
+
readonly timeoutMs?: number;
|
|
24
|
+
/** Extra headers such as organization or project IDs. */
|
|
25
|
+
readonly additionalHeaders?: Record<string, string>;
|
|
26
|
+
/** Include OpenAI JSON mode response_format. Defaults to true. */
|
|
27
|
+
readonly jsonMode?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Create an ATR semantic judge backed by an OpenAI-compatible chat endpoint.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createOpenAICompatibleJudge(config: OpenAICompatibleJudgeConfig): ATRSemanticJudge;
|
|
33
|
+
//# sourceMappingURL=openai-compatible.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openai-compatible.d.ts","sourceRoot":"","sources":["../../src/judges/openai-compatible.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAA0B,MAAM,aAAa,CAAC;AAE5E,MAAM,WAAW,2BAA2B;IAC1C,oCAAoC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,6BAA6B;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,uCAAuC;IACvC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,yDAAyD;IACzD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpD,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAoGD;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,2BAA2B,GAClC,gBAAgB,CAwDlB"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI-compatible semantic judge adapter.
|
|
3
|
+
*
|
|
4
|
+
* Converts any chat-completions-compatible endpoint into an ATRSemanticJudge.
|
|
5
|
+
* This keeps ATR vendor-neutral while giving operators a ready-to-use bridge
|
|
6
|
+
* for OpenAI, LiteLLM, vLLM, LM Studio, and similar gateways.
|
|
7
|
+
*
|
|
8
|
+
* @module agent-threat-rules/judges/openai-compatible
|
|
9
|
+
*/
|
|
10
|
+
const DEFAULT_BASE_URL = "https://api.openai.com/v1";
|
|
11
|
+
const DEFAULT_MODEL = "gpt-4o-mini";
|
|
12
|
+
const DEFAULT_TEMPERATURE = 0;
|
|
13
|
+
const DEFAULT_MAX_TOKENS = 256;
|
|
14
|
+
const DEFAULT_TIMEOUT_MS = 10_000;
|
|
15
|
+
function resolveEndpoint(baseUrl) {
|
|
16
|
+
const base = (baseUrl ?? DEFAULT_BASE_URL).replace(/\/+$/, "");
|
|
17
|
+
const endpoint = base.endsWith("/chat/completions")
|
|
18
|
+
? base
|
|
19
|
+
: base.endsWith("/v1")
|
|
20
|
+
? `${base}/chat/completions`
|
|
21
|
+
: `${base}/v1/chat/completions`;
|
|
22
|
+
// Reject non-HTTP schemes so an operator misconfiguration (e.g.
|
|
23
|
+
// file:///etc/passwd) cannot turn the judge into a local-file read or an
|
|
24
|
+
// arbitrary-scheme fetch. http is allowed on purpose: local models
|
|
25
|
+
// (Ollama, LM Studio, vLLM) are a first-class use case and run on
|
|
26
|
+
// http://localhost, so internal / RFC-1918 hosts are intentionally NOT
|
|
27
|
+
// blocked here — only the scheme is constrained.
|
|
28
|
+
let parsed;
|
|
29
|
+
try {
|
|
30
|
+
parsed = new URL(endpoint);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
throw new Error(`Judge baseUrl is not a valid URL: ${base}`);
|
|
34
|
+
}
|
|
35
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
36
|
+
throw new Error(`Judge baseUrl must use http or https, got: ${parsed.protocol}`);
|
|
37
|
+
}
|
|
38
|
+
return endpoint;
|
|
39
|
+
}
|
|
40
|
+
function stripJsonFence(content) {
|
|
41
|
+
return content
|
|
42
|
+
.replace(/^```(?:json)?\s*\n?/i, "")
|
|
43
|
+
.replace(/\n?```\s*$/i, "")
|
|
44
|
+
.trim();
|
|
45
|
+
}
|
|
46
|
+
function clampConfidence(value) {
|
|
47
|
+
return Math.max(0, Math.min(1, value));
|
|
48
|
+
}
|
|
49
|
+
function normalizeJudgeResult(raw) {
|
|
50
|
+
if (raw === null || typeof raw !== "object") {
|
|
51
|
+
throw new Error("Judge result must be a JSON object");
|
|
52
|
+
}
|
|
53
|
+
const obj = raw;
|
|
54
|
+
const category = obj["category"];
|
|
55
|
+
if (typeof category !== "string" || category.trim().length === 0) {
|
|
56
|
+
throw new Error("Judge result missing category");
|
|
57
|
+
}
|
|
58
|
+
const confidence = Number(obj["confidence"]);
|
|
59
|
+
if (!Number.isFinite(confidence)) {
|
|
60
|
+
throw new Error("Judge result missing numeric confidence");
|
|
61
|
+
}
|
|
62
|
+
const evidence = obj["evidence"];
|
|
63
|
+
return {
|
|
64
|
+
category: category.trim(),
|
|
65
|
+
confidence: clampConfidence(confidence),
|
|
66
|
+
evidence: typeof evidence === "string" && evidence.trim().length > 0
|
|
67
|
+
? evidence.trim()
|
|
68
|
+
: undefined,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function parseJudgeContent(content) {
|
|
72
|
+
const cleaned = stripJsonFence(content);
|
|
73
|
+
let parsed;
|
|
74
|
+
try {
|
|
75
|
+
parsed = JSON.parse(cleaned);
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
throw new Error("Judge response was not valid JSON");
|
|
79
|
+
}
|
|
80
|
+
return normalizeJudgeResult(parsed);
|
|
81
|
+
}
|
|
82
|
+
function sanitizeFetchError(error) {
|
|
83
|
+
if (error instanceof Error && error.name === "AbortError") {
|
|
84
|
+
return new Error("Judge request timed out");
|
|
85
|
+
}
|
|
86
|
+
if (error instanceof Error) {
|
|
87
|
+
return new Error(`Judge request failed: ${error.message}`);
|
|
88
|
+
}
|
|
89
|
+
return new Error("Judge request failed");
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Create an ATR semantic judge backed by an OpenAI-compatible chat endpoint.
|
|
93
|
+
*/
|
|
94
|
+
export function createOpenAICompatibleJudge(config) {
|
|
95
|
+
if (config.apiKey.trim().length === 0) {
|
|
96
|
+
throw new Error("OpenAI-compatible judge requires apiKey");
|
|
97
|
+
}
|
|
98
|
+
const endpoint = resolveEndpoint(config.baseUrl);
|
|
99
|
+
const model = config.model ?? DEFAULT_MODEL;
|
|
100
|
+
const temperature = config.temperature ?? DEFAULT_TEMPERATURE;
|
|
101
|
+
const maxTokens = config.maxTokens ?? DEFAULT_MAX_TOKENS;
|
|
102
|
+
const timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
103
|
+
const jsonMode = config.jsonMode ?? true;
|
|
104
|
+
return async ({ prompt }) => {
|
|
105
|
+
const controller = new AbortController();
|
|
106
|
+
const timeout = setTimeout(() => controller.abort(), timeoutMs);
|
|
107
|
+
const body = {
|
|
108
|
+
model,
|
|
109
|
+
messages: [{ role: "user", content: prompt }],
|
|
110
|
+
temperature,
|
|
111
|
+
max_tokens: maxTokens,
|
|
112
|
+
};
|
|
113
|
+
if (jsonMode) {
|
|
114
|
+
body["response_format"] = { type: "json_object" };
|
|
115
|
+
}
|
|
116
|
+
try {
|
|
117
|
+
const response = await fetch(endpoint, {
|
|
118
|
+
method: "POST",
|
|
119
|
+
headers: {
|
|
120
|
+
...config.additionalHeaders,
|
|
121
|
+
"Content-Type": "application/json",
|
|
122
|
+
"Authorization": `Bearer ${config.apiKey}`,
|
|
123
|
+
},
|
|
124
|
+
body: JSON.stringify(body),
|
|
125
|
+
signal: controller.signal,
|
|
126
|
+
});
|
|
127
|
+
if (!response.ok) {
|
|
128
|
+
throw new Error(`HTTP ${response.status}`);
|
|
129
|
+
}
|
|
130
|
+
const data = (await response.json());
|
|
131
|
+
const content = data.choices?.[0]?.message?.content;
|
|
132
|
+
if (typeof content !== "string" || content.trim().length === 0) {
|
|
133
|
+
throw new Error("Judge response missing message content");
|
|
134
|
+
}
|
|
135
|
+
return parseJudgeContent(content);
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
throw sanitizeFetchError(error);
|
|
139
|
+
}
|
|
140
|
+
finally {
|
|
141
|
+
clearTimeout(timeout);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=openai-compatible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openai-compatible.js","sourceRoot":"","sources":["../../src/judges/openai-compatible.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA+BH,MAAM,gBAAgB,GAAG,2BAA2B,CAAC;AACrD,MAAM,aAAa,GAAG,aAAa,CAAC;AACpC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAC9B,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC,SAAS,eAAe,CAAC,OAA2B;IAClD,MAAM,IAAI,GAAG,CAAC,OAAO,IAAI,gBAAgB,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC/D,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QACjD,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;YACpB,CAAC,CAAC,GAAG,IAAI,mBAAmB;YAC5B,CAAC,CAAC,GAAG,IAAI,sBAAsB,CAAC;IACpC,gEAAgE;IAChE,yEAAyE;IACzE,mEAAmE;IACnE,kEA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B;oBAClC,eAAe,EAAE,UAAU,MAAM,CAAC,MAAM,EAAE;iBAC3C;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;gBAC1B,MAAM,EAAE,UAAU,CAAC,MAAM;aAC1B,CAAC,CAAC;YAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,QAAQ,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAC7C,CAAC;YAED,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAiC,CAAC;YACrE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC;YACpD,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC/D,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;YAC5D,CAAC;YAED,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC;gBAAS,CAAC;YACT,YAAY,CAAC,OAAO,CAAC,CAAC;QACxB,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
package/dist/mcp-server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAgMnE,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CA2DvD;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAIpD"}
|
package/dist/mcp-server.js
CHANGED
|
@@ -20,6 +20,7 @@ import { handleValidate } from './mcp-tools/validate.js';
|
|
|
20
20
|
import { handleSubmitProposal } from './mcp-tools/submit-proposal.js';
|
|
21
21
|
import { handleCoverageGaps } from './mcp-tools/coverage-gaps.js';
|
|
22
22
|
import { handleThreatSummary } from './mcp-tools/threat-summary.js';
|
|
23
|
+
import { createSemanticJudgeFromConfig } from './cli/semantic-judge-config.js';
|
|
23
24
|
const __filename = fileURLToPath(import.meta.url);
|
|
24
25
|
const __dirname = dirname(__filename);
|
|
25
26
|
const RULES_DIR = resolve(__dirname, '..', 'rules');
|
|
@@ -188,8 +189,12 @@ const TOOLS = [
|
|
|
188
189
|
},
|
|
189
190
|
];
|
|
190
191
|
export async function createMCPServer() {
|
|
191
|
-
const
|
|
192
|
+
const semantic = createSemanticJudgeFromConfig();
|
|
193
|
+
const engine = new ATREngine({ rulesDir: RULES_DIR, semanticJudge: semantic.judge });
|
|
192
194
|
const ruleCount = await engine.loadRules();
|
|
195
|
+
if (semantic.enabled) {
|
|
196
|
+
process.stderr.write('[atr-mcp] Semantic judge enabled for method=semantic rules\n');
|
|
197
|
+
}
|
|
193
198
|
const server = new Server({
|
|
194
199
|
name: 'atr-mcp-server',
|
|
195
200
|
version: '0.2.1',
|
package/dist/mcp-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,O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cAAc,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QAC7B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* src/measurement/from-eval-harness.ts
|
|
3
|
+
*
|
|
4
|
+
* Adapter: convert an `src/eval/eval-harness.ts` `EvalReport` into a
|
|
5
|
+
* `MeasurementInput`. Used by the four first-class eval runners (PINT,
|
|
6
|
+
* HackAPrompt, atr-self-test, the SKILL.md runner) to write a Measurement
|
|
7
|
+
* file at the end of an eval run without each runner duplicating the
|
|
8
|
+
* conversion logic.
|
|
9
|
+
*
|
|
10
|
+
* The shape of `EvalReport` is defined in `src/eval/eval-harness.ts`; we
|
|
11
|
+
* accept a structurally-typed input here to avoid creating a cross-module
|
|
12
|
+
* type dependency in either direction.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Structural type matching the fields we read from `EvalReport`. Kept here so
|
|
16
|
+
* `src/eval/*` does not need to export its internal types just to use the
|
|
17
|
+
* adapter.
|
|
18
|
+
*/
|
|
19
|
+
export interface EvalHarnessReportShape {
|
|
20
|
+
timestamp?: string;
|
|
21
|
+
corpusSize: number;
|
|
22
|
+
overall: {
|
|
23
|
+
recall: number;
|
|
24
|
+
precision: number;
|
|
25
|
+
f1: number;
|
|
26
|
+
fpRate: number;
|
|
27
|
+
confusion: {
|
|
28
|
+
tp: number;
|
|
29
|
+
fp: number;
|
|
30
|
+
tn: number;
|
|
31
|
+
fn: number;
|
|
32
|
+
};
|
|
33
|
+
sampleCount?: number;
|
|
34
|
+
};
|
|
35
|
+
latency?: {
|
|
36
|
+
p50: number;
|
|
37
|
+
p95: number;
|
|
38
|
+
p99: number;
|
|
39
|
+
mean: number;
|
|
40
|
+
max: number;
|
|
41
|
+
};
|
|
42
|
+
byCategory?: unknown;
|
|
43
|
+
byDifficulty?: unknown;
|
|
44
|
+
}
|
|
45
|
+
export interface FromEvalHarnessOpts {
|
|
46
|
+
/** Source identifier (lowercase, hyphenated). Example: "pint". */
|
|
47
|
+
source: string;
|
|
48
|
+
/** Source version. Example: "v1", "corpus-2026-05-20". */
|
|
49
|
+
source_version: string;
|
|
50
|
+
/** Optional canonical upstream URL. */
|
|
51
|
+
source_url?: string;
|
|
52
|
+
/** Optional human-readable context. */
|
|
53
|
+
notes?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Force overwrite if the same filename already exists (same source +
|
|
56
|
+
* source_version + atr_version + date). Defaults to false (append-only).
|
|
57
|
+
*/
|
|
58
|
+
force?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Build a `MeasurementInput` from an `EvalReport` plus source metadata, then
|
|
62
|
+
* write it via `writeMeasurement()`. Returns the same paths/objects that
|
|
63
|
+
* `writeMeasurement()` returns.
|
|
64
|
+
*/
|
|
65
|
+
export declare function writeMeasurementFromEvalReport(report: EvalHarnessReportShape, opts: FromEvalHarnessOpts): {
|
|
66
|
+
measurementPath: string;
|
|
67
|
+
latestPath: string;
|
|
68
|
+
measurement: import("./schema.js").Measurement;
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=from-eval-harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-eval-harness.d.ts","sourceRoot":"","sources":["../../src/measurement/from-eval-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;QAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,OAAO,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,MAAM,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,sBAAsB,EAC9B,IAAI,EAAE,mBAAmB;;;;EAuB1B"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* src/measurement/from-eval-harness.ts
|
|
3
|
+
*
|
|
4
|
+
* Adapter: convert an `src/eval/eval-harness.ts` `EvalReport` into a
|
|
5
|
+
* `MeasurementInput`. Used by the four first-class eval runners (PINT,
|
|
6
|
+
* HackAPrompt, atr-self-test, the SKILL.md runner) to write a Measurement
|
|
7
|
+
* file at the end of an eval run without each runner duplicating the
|
|
8
|
+
* conversion logic.
|
|
9
|
+
*
|
|
10
|
+
* The shape of `EvalReport` is defined in `src/eval/eval-harness.ts`; we
|
|
11
|
+
* accept a structurally-typed input here to avoid creating a cross-module
|
|
12
|
+
* type dependency in either direction.
|
|
13
|
+
*/
|
|
14
|
+
import { writeMeasurement } from "./write.js";
|
|
15
|
+
/**
|
|
16
|
+
* Build a `MeasurementInput` from an `EvalReport` plus source metadata, then
|
|
17
|
+
* write it via `writeMeasurement()`. Returns the same paths/objects that
|
|
18
|
+
* `writeMeasurement()` returns.
|
|
19
|
+
*/
|
|
20
|
+
export function writeMeasurementFromEvalReport(report, opts) {
|
|
21
|
+
const input = {
|
|
22
|
+
source: opts.source,
|
|
23
|
+
source_version: opts.source_version,
|
|
24
|
+
measured_at: report.timestamp,
|
|
25
|
+
samples: report.corpusSize,
|
|
26
|
+
metrics: {
|
|
27
|
+
recall: report.overall.recall,
|
|
28
|
+
precision: report.overall.precision,
|
|
29
|
+
f1: report.overall.f1,
|
|
30
|
+
fp_rate: report.overall.fpRate,
|
|
31
|
+
},
|
|
32
|
+
confusion: report.overall.confusion,
|
|
33
|
+
};
|
|
34
|
+
if (opts.source_url)
|
|
35
|
+
input.source_url = opts.source_url;
|
|
36
|
+
if (opts.notes)
|
|
37
|
+
input.notes = opts.notes;
|
|
38
|
+
if (report.latency)
|
|
39
|
+
input.latency_ms = report.latency;
|
|
40
|
+
const breakdown = {};
|
|
41
|
+
if (report.byCategory)
|
|
42
|
+
breakdown.by_category = report.byCategory;
|
|
43
|
+
if (report.byDifficulty)
|
|
44
|
+
breakdown.by_difficulty = report.byDifficulty;
|
|
45
|
+
if (Object.keys(breakdown).length > 0)
|
|
46
|
+
input.breakdown = breakdown;
|
|
47
|
+
return writeMeasurement(input, { force: opts.force ?? true });
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=from-eval-harness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"from-eval-harness.js","sourceRoot":"","sources":["../../src/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KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* src/measurement/schema.ts
|
|
3
|
+
*
|
|
4
|
+
* Schema for ATR benchmark measurement files.
|
|
5
|
+
*
|
|
6
|
+
* Every public ATR recall / precision / FP-rate claim must reference a
|
|
7
|
+
* measurement file conforming to this schema. The contract is documented in
|
|
8
|
+
* `data/measurements/README.md`.
|
|
9
|
+
*
|
|
10
|
+
* Design constraints:
|
|
11
|
+
* - No external dependencies (no zod, no ajv). Schemas evolve slowly; the
|
|
12
|
+
* dependency surface should not.
|
|
13
|
+
* - Strict at the boundary. `parseMeasurement()` throws on any deviation;
|
|
14
|
+
* it does not silently coerce, drop fields, or accept missing required
|
|
15
|
+
* fields.
|
|
16
|
+
* - Forward-compatible. `schema_version` is mandatory. Future readers can
|
|
17
|
+
* decide how to handle older versions.
|
|
18
|
+
*/
|
|
19
|
+
/** Bump this when the schema breaks backward compatibility. */
|
|
20
|
+
export declare const CURRENT_SCHEMA_VERSION: "1";
|
|
21
|
+
/**
|
|
22
|
+
* Core metrics that every measurement reports.
|
|
23
|
+
*
|
|
24
|
+
* `recall` is the most-cited number externally. `precision` and `fp_rate`
|
|
25
|
+
* anchor the recall claim against overclaim risk.
|
|
26
|
+
*/
|
|
27
|
+
export interface Metrics {
|
|
28
|
+
/** True-positive rate. matched_attacks / total_attacks. Range [0, 1]. */
|
|
29
|
+
recall: number;
|
|
30
|
+
/** matched / (matched + false_positives). Range [0, 1]. */
|
|
31
|
+
precision: number;
|
|
32
|
+
/** 2 * precision * recall / (precision + recall). Range [0, 1]. */
|
|
33
|
+
f1: number;
|
|
34
|
+
/** false_positives / total_benign. Range [0, 1]. May be 0 if the corpus has no benign samples. */
|
|
35
|
+
fp_rate: number;
|
|
36
|
+
}
|
|
37
|
+
/** Confusion matrix. Strongly recommended; CI does not require it. */
|
|
38
|
+
export interface Confusion {
|
|
39
|
+
/** True positives — adversarial sample matched by a rule. */
|
|
40
|
+
tp: number;
|
|
41
|
+
/** False positives — benign sample matched by a rule. */
|
|
42
|
+
fp: number;
|
|
43
|
+
/** True negatives — benign sample NOT matched by any rule. */
|
|
44
|
+
tn: number;
|
|
45
|
+
/** False negatives — adversarial sample NOT matched (the recall gap). */
|
|
46
|
+
fn: number;
|
|
47
|
+
}
|
|
48
|
+
/** Engine latency profile in milliseconds. Optional. */
|
|
49
|
+
export interface LatencyMs {
|
|
50
|
+
p50: number;
|
|
51
|
+
p95: number;
|
|
52
|
+
p99: number;
|
|
53
|
+
mean: number;
|
|
54
|
+
max: number;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Source-defined bespoke breakdown. Each source uses this shape differently:
|
|
58
|
+
* - garak: by attack family (dan, latentinjection, sysprompt_extraction, …)
|
|
59
|
+
* - skill-benchmark: by layer (layer_a, layer_b, layer_c)
|
|
60
|
+
* - mega-scan: by severity (critical, high, medium, low)
|
|
61
|
+
* - eval-harness: by category and by difficulty
|
|
62
|
+
*
|
|
63
|
+
* Kept as `Record<string, unknown>` because the structure is source-defined.
|
|
64
|
+
* Consumers of this field must validate per-source.
|
|
65
|
+
*/
|
|
66
|
+
export type Breakdown = Record<string, unknown>;
|
|
67
|
+
/**
|
|
68
|
+
* A single measurement run.
|
|
69
|
+
*
|
|
70
|
+
* Required fields are the minimum for a public-citable claim.
|
|
71
|
+
*/
|
|
72
|
+
export interface Measurement {
|
|
73
|
+
/** Schema version. Currently `"1"`. */
|
|
74
|
+
schema_version: typeof CURRENT_SCHEMA_VERSION;
|
|
75
|
+
/** Stable source identifier. Lowercase, hyphen-separated. Example: `"garak"`, `"pint"`, `"hh-rlhf"`. */
|
|
76
|
+
source: string;
|
|
77
|
+
/** Upstream version. Example: `"v0.10.3"`, `"corpus-2026-04-15"`. */
|
|
78
|
+
source_version: string;
|
|
79
|
+
/** Optional canonical URL for the exact upstream release/commit. */
|
|
80
|
+
source_url?: string;
|
|
81
|
+
/** Optional upstream git SHA (for git-pinnable sources). */
|
|
82
|
+
source_commit?: string;
|
|
83
|
+
/** ATR version at measurement time. Read from `package.json`. */
|
|
84
|
+
atr_version: string;
|
|
85
|
+
/** ATR git commit at measurement time (short SHA). */
|
|
86
|
+
atr_commit: string;
|
|
87
|
+
/** Total rule count in the engine at measurement time. */
|
|
88
|
+
rules_loaded: number;
|
|
89
|
+
/** ISO 8601 UTC timestamp. Example: `"2026-05-23T03:57:58.869Z"`. */
|
|
90
|
+
measured_at: string;
|
|
91
|
+
/** Total sample count in the evaluated corpus. */
|
|
92
|
+
samples: number;
|
|
93
|
+
/** Core metrics. All four required. */
|
|
94
|
+
metrics: Metrics;
|
|
95
|
+
/** Confusion matrix. Optional; strongly recommended. */
|
|
96
|
+
confusion?: Confusion;
|
|
97
|
+
/** Engine latency profile. Optional. */
|
|
98
|
+
latency_ms?: LatencyMs;
|
|
99
|
+
/** Source-defined per-category / per-family / per-severity breakdown. Optional. */
|
|
100
|
+
breakdown?: Breakdown;
|
|
101
|
+
/** Free-text context. Optional. Keep brief. */
|
|
102
|
+
notes?: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* `latest.json` per source. Points to the most recent measurement file.
|
|
106
|
+
*
|
|
107
|
+
* The pointer is a relative path from the `<source>/` directory.
|
|
108
|
+
* Consumers should NOT cache; the file is small and re-reading is cheap.
|
|
109
|
+
*/
|
|
110
|
+
export interface LatestPointer {
|
|
111
|
+
source: string;
|
|
112
|
+
/** Filename of the latest measurement, relative to the `<source>/` directory. */
|
|
113
|
+
file: string;
|
|
114
|
+
/** Mirror of the measurement's `measured_at`, for fast inspection. */
|
|
115
|
+
measured_at: string;
|
|
116
|
+
/** Mirror of `metrics` for fast aggregation without reading the underlying file. */
|
|
117
|
+
metrics: Metrics;
|
|
118
|
+
/** Mirror of `source_version` and `atr_version` for fast inspection. */
|
|
119
|
+
source_version: string;
|
|
120
|
+
atr_version: string;
|
|
121
|
+
/** Mirror of `samples`. */
|
|
122
|
+
samples: number;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Error thrown when a measurement file fails schema validation.
|
|
126
|
+
* Includes the field path and reason for fast debugging.
|
|
127
|
+
*/
|
|
128
|
+
export declare class MeasurementSchemaError extends Error {
|
|
129
|
+
readonly path: string;
|
|
130
|
+
readonly reason: string;
|
|
131
|
+
constructor(path: string, reason: string);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Parse a `Measurement` from an arbitrary value. Throws `MeasurementSchemaError`
|
|
135
|
+
* on any deviation from the schema. Returns a strongly-typed `Measurement`.
|
|
136
|
+
*
|
|
137
|
+
* Unknown extra top-level keys are allowed but ignored (forward-compat); they
|
|
138
|
+
* are NOT preserved in the returned object.
|
|
139
|
+
*/
|
|
140
|
+
export declare function parseMeasurement(raw: unknown): Measurement;
|
|
141
|
+
/** Parse a `LatestPointer`. Throws on schema violation. */
|
|
142
|
+
export declare function parseLatestPointer(raw: unknown): LatestPointer;
|
|
143
|
+
/**
|
|
144
|
+
* Compute the canonical filename for a measurement.
|
|
145
|
+
*
|
|
146
|
+
* Format: `<YYYY-MM-DD>_<source>-<source_version>_atr-<atr_version>.json`
|
|
147
|
+
*
|
|
148
|
+
* `source_version` and `atr_version` are slugified (lowercase, non-alphanumeric
|
|
149
|
+
* → `-`, leading/trailing `-` removed, collapsed runs of `-`).
|
|
150
|
+
*/
|
|
151
|
+
export declare function measurementFilename(m: Pick<Measurement, "measured_at" | "source" | "source_version" | "atr_version">): string;
|
|
152
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/measurement/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,+DAA+D;AAC/D,eAAO,MAAM,sBAAsB,EAAG,GAAY,CAAC;AAInD;;;;;GAKG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