agent-threat-rules 0.4.0 → 1.0.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 +161 -52
- package/package.json +3 -1
- package/rules/agent-manipulation/{ATR-2026-030-cross-agent-attack.yaml → ATR-2026-00030-cross-agent-attack.yaml} +3 -1
- package/rules/agent-manipulation/{ATR-2026-032-goal-hijacking.yaml → ATR-2026-00032-goal-hijacking.yaml} +3 -1
- package/rules/agent-manipulation/{ATR-2026-074-cross-agent-privilege-escalation.yaml → ATR-2026-00074-cross-agent-privilege-escalation.yaml} +3 -1
- package/rules/agent-manipulation/{ATR-2026-076-inter-agent-message-spoofing.yaml → ATR-2026-00076-inter-agent-message-spoofing.yaml} +3 -1
- package/rules/agent-manipulation/{ATR-2026-077-human-trust-exploitation.yaml → ATR-2026-00077-human-trust-exploitation.yaml} +3 -1
- package/rules/agent-manipulation/{ATR-2026-108-consensus-sybil-attack.yaml → ATR-2026-00108-consensus-sybil-attack.yaml} +3 -1
- package/rules/agent-manipulation/{ATR-2026-116-a2a-message-validation.yaml → ATR-2026-00116-a2a-message-validation.yaml} +4 -2
- package/rules/agent-manipulation/{ATR-2026-117-agent-identity-spoofing.yaml → ATR-2026-00117-agent-identity-spoofing.yaml} +4 -2
- package/rules/agent-manipulation/{ATR-2026-118-approval-fatigue.yaml → ATR-2026-00118-approval-fatigue.yaml} +3 -1
- package/rules/agent-manipulation/{ATR-2026-119-social-engineering-via-agent.yaml → ATR-2026-00119-social-engineering-via-agent.yaml} +3 -1
- package/rules/agent-manipulation/ATR-2026-00132-casual-authority-escalation.yaml +105 -0
- package/rules/agent-manipulation/ATR-2026-00139-casual-authority-redirect.yaml +53 -0
- package/rules/context-exfiltration/{ATR-2026-020-system-prompt-leak.yaml → ATR-2026-00020-system-prompt-leak.yaml} +3 -1
- package/rules/context-exfiltration/{ATR-2026-021-api-key-exposure.yaml → ATR-2026-00021-api-key-exposure.yaml} +3 -1
- package/rules/context-exfiltration/{ATR-2026-075-agent-memory-manipulation.yaml → ATR-2026-00075-agent-memory-manipulation.yaml} +3 -1
- package/rules/context-exfiltration/{ATR-2026-102-disguised-analytics-exfiltration.yaml → ATR-2026-00102-disguised-analytics-exfiltration.yaml} +3 -1
- package/rules/context-exfiltration/{ATR-2026-113-credential-theft.yaml → ATR-2026-00113-credential-theft.yaml} +3 -1
- package/rules/context-exfiltration/{ATR-2026-114-oauth-token-abuse.yaml → ATR-2026-00114-oauth-token-abuse.yaml} +3 -1
- package/rules/context-exfiltration/{ATR-2026-115-env-var-harvesting.yaml → ATR-2026-00115-env-var-harvesting.yaml} +3 -1
- package/rules/context-exfiltration/ATR-2026-00136-tool-response-data-piggyback.yaml +100 -0
- package/rules/context-exfiltration/ATR-2026-00141-example-format-key-leak.yaml +52 -0
- package/rules/context-exfiltration/ATR-2026-00142-piggyback-transition-words.yaml +55 -0
- package/rules/context-exfiltration/ATR-2026-00145-obfuscated-key-disclosure.yaml +49 -0
- package/rules/context-exfiltration/ATR-2026-00146-env-var-existence-probe.yaml +49 -0
- package/rules/data-poisoning/{ATR-2026-070-data-poisoning.yaml → ATR-2026-00070-data-poisoning.yaml} +3 -1
- package/rules/excessive-autonomy/{ATR-2026-050-runaway-agent-loop.yaml → ATR-2026-00050-runaway-agent-loop.yaml} +3 -1
- package/rules/excessive-autonomy/{ATR-2026-051-resource-exhaustion.yaml → ATR-2026-00051-resource-exhaustion.yaml} +3 -1
- package/rules/excessive-autonomy/{ATR-2026-052-cascading-failure.yaml → ATR-2026-00052-cascading-failure.yaml} +3 -1
- package/rules/excessive-autonomy/{ATR-2026-098-unauthorized-financial-action.yaml → ATR-2026-00098-unauthorized-financial-action.yaml} +3 -1
- package/rules/excessive-autonomy/{ATR-2026-099-high-risk-tool-gate.yaml → ATR-2026-00099-high-risk-tool-gate.yaml} +3 -1
- package/rules/model-security/{ATR-2026-072-model-behavior-extraction.yaml → ATR-2026-00072-model-behavior-extraction.yaml} +3 -1
- package/rules/model-security/{ATR-2026-073-malicious-finetuning-data.yaml → ATR-2026-00073-malicious-finetuning-data.yaml} +3 -1
- package/rules/privilege-escalation/{ATR-2026-040-privilege-escalation.yaml → ATR-2026-00040-privilege-escalation.yaml} +3 -1
- package/rules/privilege-escalation/{ATR-2026-041-scope-creep.yaml → ATR-2026-00041-scope-creep.yaml} +3 -1
- package/rules/privilege-escalation/{ATR-2026-107-delayed-execution-bypass.yaml → ATR-2026-00107-delayed-execution-bypass.yaml} +3 -1
- package/rules/privilege-escalation/{ATR-2026-110-eval-injection.yaml → ATR-2026-00110-eval-injection.yaml} +3 -1
- package/rules/privilege-escalation/{ATR-2026-111-shell-escape.yaml → ATR-2026-00111-shell-escape.yaml} +5 -3
- package/rules/privilege-escalation/{ATR-2026-112-dynamic-import-exploitation.yaml → ATR-2026-00112-dynamic-import-exploitation.yaml} +3 -1
- package/rules/privilege-escalation/ATR-2026-00143-casual-privilege-escalation.yaml +53 -0
- package/rules/privilege-escalation/ATR-2026-00144-rationalized-safety-bypass.yaml +49 -0
- package/rules/prompt-injection/{ATR-2026-001-direct-prompt-injection.yaml → ATR-2026-00001-direct-prompt-injection.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-002-indirect-prompt-injection.yaml → ATR-2026-00002-indirect-prompt-injection.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-003-jailbreak-attempt.yaml → ATR-2026-00003-jailbreak-attempt.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-004-system-prompt-override.yaml → ATR-2026-00004-system-prompt-override.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-005-multi-turn-injection.yaml → ATR-2026-00005-multi-turn-injection.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-080-encoding-evasion.yaml → ATR-2026-00080-encoding-evasion.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-081-semantic-multi-turn.yaml → ATR-2026-00081-semantic-multi-turn.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-082-fingerprint-evasion.yaml → ATR-2026-00082-fingerprint-evasion.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-083-indirect-tool-injection.yaml → ATR-2026-00083-indirect-tool-injection.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-084-structured-data-injection.yaml → ATR-2026-00084-structured-data-injection.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-085-audit-evasion.yaml → ATR-2026-00085-audit-evasion.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-086-visual-spoofing.yaml → ATR-2026-00086-visual-spoofing.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-087-rule-probing.yaml → ATR-2026-00087-rule-probing.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-088-adaptive-countermeasure.yaml → ATR-2026-00088-adaptive-countermeasure.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-089-polymorphic-skill.yaml → ATR-2026-00089-polymorphic-skill.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-090-threat-intel-exfil.yaml → ATR-2026-00090-threat-intel-exfil.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-091-nested-payload.yaml → ATR-2026-00091-nested-payload.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-092-consensus-poisoning.yaml → ATR-2026-00092-consensus-poisoning.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-093-gradual-escalation.yaml → ATR-2026-00093-gradual-escalation.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-094-audit-bypass.yaml → ATR-2026-00094-audit-bypass.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-097-cjk-injection-patterns.yaml → ATR-2026-00097-cjk-injection-patterns.yaml} +3 -1
- package/rules/prompt-injection/{ATR-2026-104-persona-hijacking.yaml → ATR-2026-00104-persona-hijacking.yaml} +3 -1
- package/rules/prompt-injection/ATR-2026-00130-indirect-authority-claim.yaml +103 -0
- package/rules/prompt-injection/ATR-2026-00131-fictional-academic-framing.yaml +99 -0
- package/rules/prompt-injection/ATR-2026-00133-paraphrase-injection.yaml +117 -0
- package/rules/prompt-injection/ATR-2026-00137-authority-claim-injection.yaml +52 -0
- package/rules/prompt-injection/ATR-2026-00138-fictional-framing-bypass.yaml +51 -0
- package/rules/prompt-injection/ATR-2026-00140-indirect-reference-reversal.yaml +52 -0
- package/rules/prompt-injection/ATR-2026-00148-language-switch-injection.yaml +71 -0
- package/rules/skill-compromise/{ATR-2026-060-skill-impersonation.yaml → ATR-2026-00060-skill-impersonation.yaml} +3 -1
- package/rules/skill-compromise/{ATR-2026-061-description-behavior-mismatch.yaml → ATR-2026-00061-description-behavior-mismatch.yaml} +3 -1
- package/rules/skill-compromise/{ATR-2026-062-hidden-capability.yaml → ATR-2026-00062-hidden-capability.yaml} +3 -1
- package/rules/skill-compromise/{ATR-2026-063-skill-chain-attack.yaml → ATR-2026-00063-skill-chain-attack.yaml} +3 -1
- package/rules/skill-compromise/{ATR-2026-064-over-permissioned-skill.yaml → ATR-2026-00064-over-permissioned-skill.yaml} +3 -1
- package/rules/skill-compromise/{ATR-2026-065-skill-update-attack.yaml → ATR-2026-00065-skill-update-attack.yaml} +3 -1
- package/rules/skill-compromise/{ATR-2026-066-parameter-injection.yaml → ATR-2026-00066-parameter-injection.yaml} +3 -1
- package/rules/skill-compromise/ATR-2026-00120-skill-instruction-injection.yaml +121 -0
- package/rules/skill-compromise/ATR-2026-00121-skill-dangerous-script.yaml +165 -0
- package/rules/skill-compromise/ATR-2026-00122-skill-weaponized-instruction.yaml +114 -0
- package/rules/skill-compromise/ATR-2026-00123-skill-overreach-permissions.yaml +118 -0
- package/rules/skill-compromise/ATR-2026-00124-skill-name-squatting.yaml +98 -0
- package/rules/skill-compromise/ATR-2026-00125-context-poisoning-compaction.yaml +93 -0
- package/rules/skill-compromise/ATR-2026-00126-skill-rug-pull-setup.yaml +99 -0
- package/rules/skill-compromise/ATR-2026-00127-subcommand-overflow.yaml +74 -0
- package/rules/skill-compromise/ATR-2026-00128-html-comment-hidden-payload.yaml +79 -0
- package/rules/skill-compromise/ATR-2026-00129-unicode-smuggling.yaml +73 -0
- package/rules/skill-compromise/ATR-2026-00134-fork-claim-impersonation.yaml +93 -0
- package/rules/skill-compromise/ATR-2026-00135-exfil-url-in-instructions.yaml +82 -0
- package/rules/skill-compromise/ATR-2026-00147-fork-impersonation.yaml +48 -0
- package/rules/tool-poisoning/{ATR-2026-010-mcp-malicious-response.yaml → ATR-2026-00010-mcp-malicious-response.yaml} +3 -1
- package/rules/tool-poisoning/{ATR-2026-011-tool-output-injection.yaml → ATR-2026-00011-tool-output-injection.yaml} +3 -1
- package/rules/tool-poisoning/{ATR-2026-012-unauthorized-tool-call.yaml → ATR-2026-00012-unauthorized-tool-call.yaml} +3 -1
- package/rules/tool-poisoning/{ATR-2026-013-tool-ssrf.yaml → ATR-2026-00013-tool-ssrf.yaml} +3 -1
- package/rules/tool-poisoning/{ATR-2026-095-supply-chain-poisoning.yaml → ATR-2026-00095-supply-chain-poisoning.yaml} +3 -1
- package/rules/tool-poisoning/{ATR-2026-096-registry-poisoning.yaml → ATR-2026-00096-registry-poisoning.yaml} +3 -1
- package/rules/tool-poisoning/{ATR-2026-100-consent-bypass-instruction.yaml → ATR-2026-00100-consent-bypass-instruction.yaml} +3 -1
- package/rules/tool-poisoning/{ATR-2026-101-trust-escalation-override.yaml → ATR-2026-00101-trust-escalation-override.yaml} +3 -1
- package/rules/tool-poisoning/{ATR-2026-103-hidden-safety-bypass-instruction.yaml → ATR-2026-00103-hidden-safety-bypass-instruction.yaml} +3 -1
- package/rules/tool-poisoning/{ATR-2026-105-silent-action-concealment.yaml → ATR-2026-00105-silent-action-concealment.yaml} +3 -1
- package/rules/tool-poisoning/{ATR-2026-106-schema-description-contradiction.yaml → ATR-2026-00106-schema-description-contradiction.yaml} +3 -1
- package/spec/atr-schema.yaml +32 -3
- package/dist/action-executor.d.ts +0 -44
- package/dist/action-executor.d.ts.map +0 -1
- package/dist/action-executor.js +0 -130
- package/dist/action-executor.js.map +0 -1
- package/dist/adapters/default-adapter.d.ts +0 -24
- package/dist/adapters/default-adapter.d.ts.map +0 -1
- package/dist/adapters/default-adapter.js +0 -51
- package/dist/adapters/default-adapter.js.map +0 -1
- package/dist/adapters/stdio-adapter.d.ts +0 -30
- package/dist/adapters/stdio-adapter.d.ts.map +0 -1
- package/dist/adapters/stdio-adapter.js +0 -128
- package/dist/adapters/stdio-adapter.js.map +0 -1
- package/dist/badge.d.ts +0 -42
- package/dist/badge.d.ts.map +0 -1
- package/dist/badge.js +0 -158
- package/dist/badge.js.map +0 -1
- package/dist/capability-extractor.d.ts +0 -35
- package/dist/capability-extractor.d.ts.map +0 -1
- package/dist/capability-extractor.js +0 -91
- package/dist/capability-extractor.js.map +0 -1
- package/dist/cli.d.ts +0 -12
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -892
- package/dist/cli.js.map +0 -1
- package/dist/converters/elastic.d.ts +0 -36
- package/dist/converters/elastic.d.ts.map +0 -1
- package/dist/converters/elastic.js +0 -125
- package/dist/converters/elastic.js.map +0 -1
- package/dist/converters/index.d.ts +0 -28
- package/dist/converters/index.d.ts.map +0 -1
- package/dist/converters/index.js +0 -36
- package/dist/converters/index.js.map +0 -1
- package/dist/converters/splunk.d.ts +0 -19
- package/dist/converters/splunk.d.ts.map +0 -1
- package/dist/converters/splunk.js +0 -148
- package/dist/converters/splunk.js.map +0 -1
- package/dist/coverage-analyzer.d.ts +0 -43
- package/dist/coverage-analyzer.d.ts.map +0 -1
- package/dist/coverage-analyzer.js +0 -329
- package/dist/coverage-analyzer.js.map +0 -1
- package/dist/embedding/build-corpus.d.ts +0 -15
- package/dist/embedding/build-corpus.d.ts.map +0 -1
- package/dist/embedding/build-corpus.js +0 -105
- package/dist/embedding/build-corpus.js.map +0 -1
- package/dist/embedding/model-loader.d.ts +0 -41
- package/dist/embedding/model-loader.d.ts.map +0 -1
- package/dist/embedding/model-loader.js +0 -90
- package/dist/embedding/model-loader.js.map +0 -1
- package/dist/embedding/vector-store.d.ts +0 -41
- package/dist/embedding/vector-store.d.ts.map +0 -1
- package/dist/embedding/vector-store.js +0 -70
- package/dist/embedding/vector-store.js.map +0 -1
- package/dist/engine.d.ts +0 -163
- package/dist/engine.d.ts.map +0 -1
- package/dist/engine.js +0 -869
- package/dist/engine.js.map +0 -1
- package/dist/eval/corpus.d.ts +0 -42
- package/dist/eval/corpus.d.ts.map +0 -1
- package/dist/eval/corpus.js +0 -427
- package/dist/eval/corpus.js.map +0 -1
- package/dist/eval/eval-harness.d.ts +0 -44
- package/dist/eval/eval-harness.d.ts.map +0 -1
- package/dist/eval/eval-harness.js +0 -296
- package/dist/eval/eval-harness.js.map +0 -1
- package/dist/eval/index.d.ts +0 -13
- package/dist/eval/index.d.ts.map +0 -1
- package/dist/eval/index.js +0 -9
- package/dist/eval/index.js.map +0 -1
- package/dist/eval/metrics.d.ts +0 -74
- package/dist/eval/metrics.d.ts.map +0 -1
- package/dist/eval/metrics.js +0 -108
- package/dist/eval/metrics.js.map +0 -1
- package/dist/eval/pint-corpus.d.ts +0 -34
- package/dist/eval/pint-corpus.d.ts.map +0 -1
- package/dist/eval/pint-corpus.js +0 -109
- package/dist/eval/pint-corpus.js.map +0 -1
- package/dist/eval/rule-corpus.d.ts +0 -9
- package/dist/eval/rule-corpus.d.ts.map +0 -1
- package/dist/eval/rule-corpus.js +0 -4780
- package/dist/eval/rule-corpus.js.map +0 -1
- package/dist/eval/rule-metrics.d.ts +0 -34
- package/dist/eval/rule-metrics.d.ts.map +0 -1
- package/dist/eval/rule-metrics.js +0 -92
- package/dist/eval/rule-metrics.js.map +0 -1
- package/dist/eval/run-eval.d.ts +0 -7
- package/dist/eval/run-eval.d.ts.map +0 -1
- package/dist/eval/run-eval.js +0 -11
- package/dist/eval/run-eval.js.map +0 -1
- package/dist/eval/run-pint-benchmark.d.ts +0 -18
- package/dist/eval/run-pint-benchmark.d.ts.map +0 -1
- package/dist/eval/run-pint-benchmark.js +0 -159
- package/dist/eval/run-pint-benchmark.js.map +0 -1
- package/dist/flywheel.d.ts +0 -54
- package/dist/flywheel.d.ts.map +0 -1
- package/dist/flywheel.js +0 -121
- package/dist/flywheel.js.map +0 -1
- package/dist/hook-handler.d.ts +0 -61
- package/dist/hook-handler.d.ts.map +0 -1
- package/dist/hook-handler.js +0 -178
- package/dist/hook-handler.js.map +0 -1
- package/dist/index.d.ts +0 -62
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -54
- package/dist/index.js.map +0 -1
- package/dist/layer-integration.d.ts +0 -55
- package/dist/layer-integration.d.ts.map +0 -1
- package/dist/layer-integration.js +0 -185
- package/dist/layer-integration.js.map +0 -1
- package/dist/loader.d.ts +0 -21
- package/dist/loader.d.ts.map +0 -1
- package/dist/loader.js +0 -124
- package/dist/loader.js.map +0 -1
- package/dist/mcp-server.d.ts +0 -13
- package/dist/mcp-server.d.ts.map +0 -1
- package/dist/mcp-server.js +0 -220
- package/dist/mcp-server.js.map +0 -1
- package/dist/mcp-tools/coverage-gaps.d.ts +0 -13
- package/dist/mcp-tools/coverage-gaps.d.ts.map +0 -1
- package/dist/mcp-tools/coverage-gaps.js +0 -55
- package/dist/mcp-tools/coverage-gaps.js.map +0 -1
- package/dist/mcp-tools/list-rules.d.ts +0 -17
- package/dist/mcp-tools/list-rules.d.ts.map +0 -1
- package/dist/mcp-tools/list-rules.js +0 -45
- package/dist/mcp-tools/list-rules.js.map +0 -1
- package/dist/mcp-tools/scan.d.ts +0 -24
- package/dist/mcp-tools/scan.d.ts.map +0 -1
- package/dist/mcp-tools/scan.js +0 -94
- package/dist/mcp-tools/scan.js.map +0 -1
- package/dist/mcp-tools/submit-proposal.d.ts +0 -12
- package/dist/mcp-tools/submit-proposal.d.ts.map +0 -1
- package/dist/mcp-tools/submit-proposal.js +0 -103
- package/dist/mcp-tools/submit-proposal.js.map +0 -1
- package/dist/mcp-tools/threat-summary.d.ts +0 -12
- package/dist/mcp-tools/threat-summary.d.ts.map +0 -1
- package/dist/mcp-tools/threat-summary.js +0 -74
- package/dist/mcp-tools/threat-summary.js.map +0 -1
- package/dist/mcp-tools/validate.d.ts +0 -15
- package/dist/mcp-tools/validate.d.ts.map +0 -1
- package/dist/mcp-tools/validate.js +0 -45
- package/dist/mcp-tools/validate.js.map +0 -1
- package/dist/modules/embedding.d.ts +0 -71
- package/dist/modules/embedding.d.ts.map +0 -1
- package/dist/modules/embedding.js +0 -141
- package/dist/modules/embedding.js.map +0 -1
- package/dist/modules/index.d.ts +0 -144
- package/dist/modules/index.d.ts.map +0 -1
- package/dist/modules/index.js +0 -82
- package/dist/modules/index.js.map +0 -1
- package/dist/modules/semantic.d.ts +0 -106
- package/dist/modules/semantic.d.ts.map +0 -1
- package/dist/modules/semantic.js +0 -359
- package/dist/modules/semantic.js.map +0 -1
- package/dist/modules/session.d.ts +0 -70
- package/dist/modules/session.d.ts.map +0 -1
- package/dist/modules/session.js +0 -128
- package/dist/modules/session.js.map +0 -1
- package/dist/rule-scaffolder.d.ts +0 -53
- package/dist/rule-scaffolder.d.ts.map +0 -1
- package/dist/rule-scaffolder.js +0 -301
- package/dist/rule-scaffolder.js.map +0 -1
- package/dist/session-tracker.d.ts +0 -58
- package/dist/session-tracker.d.ts.map +0 -1
- package/dist/session-tracker.js +0 -176
- package/dist/session-tracker.js.map +0 -1
- package/dist/shadow-evaluator.d.ts +0 -48
- package/dist/shadow-evaluator.d.ts.map +0 -1
- package/dist/shadow-evaluator.js +0 -128
- package/dist/shadow-evaluator.js.map +0 -1
- package/dist/skill-fingerprint.d.ts +0 -85
- package/dist/skill-fingerprint.d.ts.map +0 -1
- package/dist/skill-fingerprint.js +0 -284
- package/dist/skill-fingerprint.js.map +0 -1
- package/dist/tier0-invariant.d.ts +0 -49
- package/dist/tier0-invariant.d.ts.map +0 -1
- package/dist/tier0-invariant.js +0 -184
- package/dist/tier0-invariant.js.map +0 -1
- package/dist/tier1-blacklist.d.ts +0 -48
- package/dist/tier1-blacklist.d.ts.map +0 -1
- package/dist/tier1-blacklist.js +0 -91
- package/dist/tier1-blacklist.js.map +0 -1
- package/dist/types.d.ts +0 -190
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -6
- package/dist/types.js.map +0 -1
- package/dist/verdict.d.ts +0 -26
- package/dist/verdict.d.ts.map +0 -1
- package/dist/verdict.js +0 -127
- package/dist/verdict.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
title: "Unauthorized Tool Call Detection"
|
|
2
|
-
id: ATR-2026-
|
|
2
|
+
id: ATR-2026-00012
|
|
3
|
+
rule_version: 1
|
|
3
4
|
status: experimental
|
|
4
5
|
description: >
|
|
5
6
|
Detects unauthorized or malicious tool call attempts including parameter injection,
|
|
@@ -31,6 +32,7 @@ references:
|
|
|
31
32
|
tags:
|
|
32
33
|
category: tool-poisoning
|
|
33
34
|
subcategory: unauthorized-access
|
|
35
|
+
scan_target: mcp
|
|
34
36
|
confidence: high
|
|
35
37
|
|
|
36
38
|
agent_source:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
title: "SSRF via Agent Tool Calls"
|
|
2
|
-
id: ATR-2026-
|
|
2
|
+
id: ATR-2026-00013
|
|
3
|
+
rule_version: 1
|
|
3
4
|
status: experimental
|
|
4
5
|
description: >
|
|
5
6
|
Detects Server-Side Request Forgery (SSRF) attempts through agent tool calls.
|
|
@@ -37,6 +38,7 @@ references:
|
|
|
37
38
|
tags:
|
|
38
39
|
category: tool-poisoning
|
|
39
40
|
subcategory: ssrf
|
|
41
|
+
scan_target: both
|
|
40
42
|
confidence: high
|
|
41
43
|
|
|
42
44
|
agent_source:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
title: "MCP Tool Supply Chain Poisoning"
|
|
2
|
-
id: ATR-2026-
|
|
2
|
+
id: ATR-2026-00095
|
|
3
|
+
rule_version: 1
|
|
3
4
|
status: draft
|
|
4
5
|
description: >
|
|
5
6
|
Detects tool poisoning attacks targeting the MCP (Model Context Protocol)
|
|
@@ -21,6 +22,7 @@ references:
|
|
|
21
22
|
tags:
|
|
22
23
|
category: tool-poisoning
|
|
23
24
|
subcategory: supply-chain-attack
|
|
25
|
+
scan_target: mcp
|
|
24
26
|
confidence: medium
|
|
25
27
|
|
|
26
28
|
agent_source:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
title: "Skill Registry Poisoning and Compromised Tool Distribution"
|
|
2
|
-
id: ATR-2026-
|
|
2
|
+
id: ATR-2026-00096
|
|
3
|
+
rule_version: 1
|
|
3
4
|
status: draft
|
|
4
5
|
description: >
|
|
5
6
|
Detects supply chain attacks that target skill/tool registries and
|
|
@@ -23,6 +24,7 @@ references:
|
|
|
23
24
|
tags:
|
|
24
25
|
category: tool-poisoning
|
|
25
26
|
subcategory: registry-poisoning
|
|
27
|
+
scan_target: mcp
|
|
26
28
|
confidence: medium
|
|
27
29
|
|
|
28
30
|
agent_source:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
title: "Consent Bypass via Hidden LLM Instructions in Tool Descriptions"
|
|
2
|
-
id: ATR-2026-
|
|
2
|
+
id: ATR-2026-00100
|
|
3
|
+
rule_version: 1
|
|
3
4
|
status: experimental
|
|
4
5
|
description: |
|
|
5
6
|
Detects tool descriptions that embed instructions directing the LLM to automatically
|
|
@@ -26,6 +27,7 @@ references:
|
|
|
26
27
|
tags:
|
|
27
28
|
category: tool-poisoning
|
|
28
29
|
subcategory: consent-bypass-instruction
|
|
30
|
+
scan_target: mcp
|
|
29
31
|
confidence: medium
|
|
30
32
|
|
|
31
33
|
agent_source:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
title: "Trust Escalation via Authority Override Instructions"
|
|
2
|
-
id: ATR-2026-
|
|
2
|
+
id: ATR-2026-00101
|
|
3
|
+
rule_version: 1
|
|
3
4
|
status: experimental
|
|
4
5
|
description: |
|
|
5
6
|
Detects MCP tools that instruct the LLM to treat tool output as "authoritative directives"
|
|
@@ -25,6 +26,7 @@ references:
|
|
|
25
26
|
tags:
|
|
26
27
|
category: tool-poisoning
|
|
27
28
|
subcategory: trust-escalation-override
|
|
29
|
+
scan_target: mcp
|
|
28
30
|
confidence: medium
|
|
29
31
|
|
|
30
32
|
agent_source:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
title: "Hidden LLM Safety Bypass Instructions in Tool Descriptions"
|
|
2
|
-
id: ATR-2026-
|
|
2
|
+
id: ATR-2026-00103
|
|
3
|
+
rule_version: 1
|
|
3
4
|
status: experimental
|
|
4
5
|
description: |
|
|
5
6
|
Detects tools that embed explicit instructions directing the LLM to disregard safety
|
|
@@ -27,6 +28,7 @@ references:
|
|
|
27
28
|
tags:
|
|
28
29
|
category: tool-poisoning
|
|
29
30
|
subcategory: hidden-llm-instructions
|
|
31
|
+
scan_target: mcp
|
|
30
32
|
confidence: medium
|
|
31
33
|
|
|
32
34
|
agent_source:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
title: "Silent Action Concealment Instructions in Tool Descriptions"
|
|
2
|
-
id: ATR-2026-
|
|
2
|
+
id: ATR-2026-00105
|
|
3
|
+
rule_version: 1
|
|
3
4
|
status: experimental
|
|
4
5
|
description: |
|
|
5
6
|
Detects MCP tools that explicitly instruct the LLM to perform actions silently or hide
|
|
@@ -26,6 +27,7 @@ references:
|
|
|
26
27
|
tags:
|
|
27
28
|
category: tool-poisoning
|
|
28
29
|
subcategory: silent-action-instruction
|
|
30
|
+
scan_target: mcp
|
|
29
31
|
confidence: medium
|
|
30
32
|
|
|
31
33
|
agent_source:
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
title: "Schema-Description Contradiction Attack"
|
|
2
|
-
id: ATR-2026-
|
|
2
|
+
id: ATR-2026-00106
|
|
3
|
+
rule_version: 1
|
|
3
4
|
status: experimental
|
|
4
5
|
description: |
|
|
5
6
|
Detects tools that claim read-only or safe functionality in their description but expose
|
|
@@ -25,6 +26,7 @@ references:
|
|
|
25
26
|
tags:
|
|
26
27
|
category: tool-poisoning
|
|
27
28
|
subcategory: schema-description-mismatch
|
|
29
|
+
scan_target: mcp
|
|
28
30
|
confidence: medium
|
|
29
31
|
|
|
30
32
|
agent_source:
|
package/spec/atr-schema.yaml
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
$schema: "https://json-schema.org/draft/2020-12/schema"
|
|
11
11
|
title: ATR Rule Schema
|
|
12
12
|
description: Schema for Agent Threat Rules (ATR) detection rules
|
|
13
|
-
version: "
|
|
13
|
+
version: "1.0.0"
|
|
14
14
|
|
|
15
15
|
type: object
|
|
16
16
|
required:
|
|
@@ -43,8 +43,8 @@ properties:
|
|
|
43
43
|
|
|
44
44
|
id:
|
|
45
45
|
type: string
|
|
46
|
-
pattern: "^ATR-\\d{4}-\\d{
|
|
47
|
-
description: "Unique rule identifier. Format: ATR-YYYY-
|
|
46
|
+
pattern: "^ATR-\\d{4}-\\d{5}$"
|
|
47
|
+
description: "Unique rule identifier. Format: ATR-YYYY-NNNNN (e.g., ATR-2026-00001)"
|
|
48
48
|
|
|
49
49
|
status:
|
|
50
50
|
type: string
|
|
@@ -69,6 +69,11 @@ properties:
|
|
|
69
69
|
pattern: "^\\d{4}/\\d{2}/\\d{2}$"
|
|
70
70
|
description: "Last modification date in YYYY/MM/DD format"
|
|
71
71
|
|
|
72
|
+
rule_version:
|
|
73
|
+
type: integer
|
|
74
|
+
minimum: 1
|
|
75
|
+
description: "Rule version number. Bump when detection logic changes. Starts at 1."
|
|
76
|
+
|
|
72
77
|
# === Classification ===
|
|
73
78
|
|
|
74
79
|
detection_tier:
|
|
@@ -114,6 +119,26 @@ properties:
|
|
|
114
119
|
items:
|
|
115
120
|
type: string
|
|
116
121
|
description: Related CVE identifiers
|
|
122
|
+
owasp_agentic:
|
|
123
|
+
type: array
|
|
124
|
+
items:
|
|
125
|
+
type: string
|
|
126
|
+
description: "OWASP Agentic Top 10 references (e.g., ASI01, ASI02)"
|
|
127
|
+
owasp_ast:
|
|
128
|
+
type: array
|
|
129
|
+
items:
|
|
130
|
+
type: string
|
|
131
|
+
description: "OWASP Agentic Skills Top 10 references (e.g., AST01)"
|
|
132
|
+
safe_mcp:
|
|
133
|
+
type: array
|
|
134
|
+
items:
|
|
135
|
+
type: string
|
|
136
|
+
description: "SAFE-MCP technique IDs (e.g., SMCP-T001)"
|
|
137
|
+
research:
|
|
138
|
+
type: array
|
|
139
|
+
items:
|
|
140
|
+
type: string
|
|
141
|
+
description: "Research paper references or URLs"
|
|
117
142
|
|
|
118
143
|
# === Tags (ATR classification) ===
|
|
119
144
|
|
|
@@ -141,6 +166,10 @@ properties:
|
|
|
141
166
|
type: string
|
|
142
167
|
enum: [high, medium, low]
|
|
143
168
|
description: Expected accuracy of this rule (high = low false positive rate)
|
|
169
|
+
scan_target:
|
|
170
|
+
type: string
|
|
171
|
+
enum: [mcp, skill, both, runtime]
|
|
172
|
+
description: "Which scan path this rule belongs to. mcp=runtime events, skill=SKILL.md static scan, both=fires in both paths, runtime=behavior monitoring."
|
|
144
173
|
|
|
145
174
|
# === Agent Source (analogous to Sigma's logsource) ===
|
|
146
175
|
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Action Executor - Executes ATR response actions via platform adapters.
|
|
3
|
-
*
|
|
4
|
-
* Deduplicates actions, sorts by priority, and delegates execution
|
|
5
|
-
* to a PlatformAdapter. Handles per-action errors so one failure
|
|
6
|
-
* does not block the rest.
|
|
7
|
-
*
|
|
8
|
-
* @module agent-threat-rules/action-executor
|
|
9
|
-
*/
|
|
10
|
-
import type { ActionResult, ExecutionContext, PlatformAdapter } from './types.js';
|
|
11
|
-
export interface ActionExecutorConfig {
|
|
12
|
-
readonly adapter: PlatformAdapter;
|
|
13
|
-
readonly dryRun?: boolean;
|
|
14
|
-
readonly onActionComplete?: (result: ActionResult) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare class ActionExecutor {
|
|
17
|
-
private readonly adapter;
|
|
18
|
-
private readonly dryRun;
|
|
19
|
-
private readonly onActionComplete?;
|
|
20
|
-
constructor(config: ActionExecutorConfig);
|
|
21
|
-
/**
|
|
22
|
-
* Execute all actions from the verdict context.
|
|
23
|
-
*
|
|
24
|
-
* Actions are deduplicated, sorted by priority, and executed
|
|
25
|
-
* sequentially. Each action is wrapped in try/catch so a single
|
|
26
|
-
* failure does not prevent subsequent actions from running.
|
|
27
|
-
*
|
|
28
|
-
* Returns a frozen array of ActionResult.
|
|
29
|
-
*/
|
|
30
|
-
execute(context: ExecutionContext): Promise<readonly ActionResult[]>;
|
|
31
|
-
/**
|
|
32
|
-
* Deduplicate actions and sort by priority (highest priority first).
|
|
33
|
-
*/
|
|
34
|
-
private deduplicateAndSort;
|
|
35
|
-
/**
|
|
36
|
-
* Execute a single action, returning a result even on failure.
|
|
37
|
-
*/
|
|
38
|
-
private executeOne;
|
|
39
|
-
/** Get the adapter name for diagnostics */
|
|
40
|
-
getAdapterName(): string;
|
|
41
|
-
/** Check if dry-run mode is enabled */
|
|
42
|
-
isDryRun(): boolean;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=action-executor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-executor.d.ts","sourceRoot":"","sources":["../src/action-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAEV,YAAY,EACZ,gBAAgB,EAChB,eAAe,EAChB,MAAM,YAAY,CAAC;AA8BpB,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;CAC5D;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkB;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAU;IACjC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAiC;gBAEvD,MAAM,EAAE,oBAAoB;IAMxC;;;;;;;;OAQG;IACG,OAAO,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;IAgB1E;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAW1B;;OAEG;YACW,UAAU;IAmDxB,2CAA2C;IAC3C,cAAc,IAAI,MAAM;IAIxB,uCAAuC;IACvC,QAAQ,IAAI,OAAO;CAGpB"}
|
package/dist/action-executor.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Action Executor - Executes ATR response actions via platform adapters.
|
|
3
|
-
*
|
|
4
|
-
* Deduplicates actions, sorts by priority, and delegates execution
|
|
5
|
-
* to a PlatformAdapter. Handles per-action errors so one failure
|
|
6
|
-
* does not block the rest.
|
|
7
|
-
*
|
|
8
|
-
* @module agent-threat-rules/action-executor
|
|
9
|
-
*/
|
|
10
|
-
/** Priority order: lower number = higher priority (executed first) */
|
|
11
|
-
const ACTION_PRIORITY = {
|
|
12
|
-
kill_agent: 0,
|
|
13
|
-
block_input: 1,
|
|
14
|
-
block_output: 2,
|
|
15
|
-
block_tool: 3,
|
|
16
|
-
quarantine_session: 4,
|
|
17
|
-
reduce_permissions: 5,
|
|
18
|
-
reset_context: 6,
|
|
19
|
-
alert: 7,
|
|
20
|
-
escalate: 8,
|
|
21
|
-
snapshot: 9,
|
|
22
|
-
};
|
|
23
|
-
/** Map action names to PlatformAdapter method names */
|
|
24
|
-
const ACTION_METHOD_MAP = {
|
|
25
|
-
block_input: 'blockInput',
|
|
26
|
-
block_output: 'blockOutput',
|
|
27
|
-
block_tool: 'blockTool',
|
|
28
|
-
quarantine_session: 'quarantineSession',
|
|
29
|
-
reset_context: 'resetContext',
|
|
30
|
-
alert: 'alert',
|
|
31
|
-
snapshot: 'snapshot',
|
|
32
|
-
escalate: 'escalate',
|
|
33
|
-
reduce_permissions: 'reducePermissions',
|
|
34
|
-
kill_agent: 'killAgent',
|
|
35
|
-
};
|
|
36
|
-
export class ActionExecutor {
|
|
37
|
-
adapter;
|
|
38
|
-
dryRun;
|
|
39
|
-
onActionComplete;
|
|
40
|
-
constructor(config) {
|
|
41
|
-
this.adapter = config.adapter;
|
|
42
|
-
this.dryRun = config.dryRun ?? false;
|
|
43
|
-
this.onActionComplete = config.onActionComplete;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Execute all actions from the verdict context.
|
|
47
|
-
*
|
|
48
|
-
* Actions are deduplicated, sorted by priority, and executed
|
|
49
|
-
* sequentially. Each action is wrapped in try/catch so a single
|
|
50
|
-
* failure does not prevent subsequent actions from running.
|
|
51
|
-
*
|
|
52
|
-
* Returns a frozen array of ActionResult.
|
|
53
|
-
*/
|
|
54
|
-
async execute(context) {
|
|
55
|
-
const actions = this.deduplicateAndSort(context.verdict.actions);
|
|
56
|
-
const results = [];
|
|
57
|
-
for (const action of actions) {
|
|
58
|
-
const result = await this.executeOne(action, context);
|
|
59
|
-
results.push(result);
|
|
60
|
-
if (this.onActionComplete) {
|
|
61
|
-
this.onActionComplete(result);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return Object.freeze(results);
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Deduplicate actions and sort by priority (highest priority first).
|
|
68
|
-
*/
|
|
69
|
-
deduplicateAndSort(actions) {
|
|
70
|
-
const unique = [...new Set(actions)];
|
|
71
|
-
return unique.sort((a, b) => {
|
|
72
|
-
const pa = ACTION_PRIORITY[a] ?? 99;
|
|
73
|
-
const pb = ACTION_PRIORITY[b] ?? 99;
|
|
74
|
-
return pa - pb;
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Execute a single action, returning a result even on failure.
|
|
79
|
-
*/
|
|
80
|
-
async executeOne(action, context) {
|
|
81
|
-
const timestamp = new Date().toISOString();
|
|
82
|
-
if (this.dryRun) {
|
|
83
|
-
return Object.freeze({
|
|
84
|
-
action,
|
|
85
|
-
success: true,
|
|
86
|
-
message: `[dry-run] Would execute: ${action}`,
|
|
87
|
-
timestamp,
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
try {
|
|
91
|
-
const methodName = ACTION_METHOD_MAP[action];
|
|
92
|
-
if (!methodName) {
|
|
93
|
-
return Object.freeze({
|
|
94
|
-
action,
|
|
95
|
-
success: false,
|
|
96
|
-
message: `Unknown action: ${action}`,
|
|
97
|
-
timestamp,
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
const method = this.adapter[methodName];
|
|
101
|
-
if (typeof method !== 'function') {
|
|
102
|
-
return Object.freeze({
|
|
103
|
-
action,
|
|
104
|
-
success: false,
|
|
105
|
-
message: `Adapter "${this.adapter.name}" does not implement: ${methodName}`,
|
|
106
|
-
timestamp,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
return await method.call(this.adapter, context);
|
|
110
|
-
}
|
|
111
|
-
catch (err) {
|
|
112
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
113
|
-
return Object.freeze({
|
|
114
|
-
action,
|
|
115
|
-
success: false,
|
|
116
|
-
message: `Action "${action}" failed: ${message}`,
|
|
117
|
-
timestamp,
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
/** Get the adapter name for diagnostics */
|
|
122
|
-
getAdapterName() {
|
|
123
|
-
return this.adapter.name;
|
|
124
|
-
}
|
|
125
|
-
/** Check if dry-run mode is enabled */
|
|
126
|
-
isDryRun() {
|
|
127
|
-
return this.dryRun;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
//# sourceMappingURL=action-executor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-executor.js","sourceRoot":"","sources":["../src/action-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,sEAAsE;AACtE,MAAM,eAAe,GAAwC;IAC3D,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,CAAC;IACd,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,OAAO,MAAM,CAAC,MAAM,CAAC;oBACnB,MAAM;oBACN,OAAO,EAAE,KAAK;oBACd,OAAO,EAAE,YAAY,IAAI,CAAC,OAAO,CAAC,IAAI,yBAAyB,UAAU,EAAE;oBAC3E,SAAS;iBACV,CAAC,CAAC;YACL,CAAC;YAED,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAClD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjE,OAAO,MAAM,CAAC,MAAM,CAAC;gBACnB,MAAM;gBACN,OAAO,EAAE,KAAK;gBACd,OAAO,EAAE,WAAW,MAAM,aAAa,OAAO,EAAE;gBAChD,SAAS;aACV,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,2CAA2C;IAC3C,cAAc;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED,uCAAuC;IACvC,QAAQ;QACN,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default Platform Adapter - No-op implementation for CLI and testing.
|
|
3
|
-
*
|
|
4
|
-
* Every method logs the action and returns a success result.
|
|
5
|
-
* This adapter is safe to use in any environment as it performs
|
|
6
|
-
* no actual enforcement.
|
|
7
|
-
*
|
|
8
|
-
* @module agent-threat-rules/adapters/default-adapter
|
|
9
|
-
*/
|
|
10
|
-
import type { ActionResult, ExecutionContext, PlatformAdapter } from '../types.js';
|
|
11
|
-
export declare class DefaultAdapter implements PlatformAdapter {
|
|
12
|
-
readonly name = "default";
|
|
13
|
-
blockInput(ctx: ExecutionContext): Promise<ActionResult>;
|
|
14
|
-
blockOutput(ctx: ExecutionContext): Promise<ActionResult>;
|
|
15
|
-
blockTool(ctx: ExecutionContext): Promise<ActionResult>;
|
|
16
|
-
quarantineSession(ctx: ExecutionContext): Promise<ActionResult>;
|
|
17
|
-
resetContext(ctx: ExecutionContext): Promise<ActionResult>;
|
|
18
|
-
alert(ctx: ExecutionContext): Promise<ActionResult>;
|
|
19
|
-
snapshot(ctx: ExecutionContext): Promise<ActionResult>;
|
|
20
|
-
escalate(ctx: ExecutionContext): Promise<ActionResult>;
|
|
21
|
-
reducePermissions(ctx: ExecutionContext): Promise<ActionResult>;
|
|
22
|
-
killAgent(ctx: ExecutionContext): Promise<ActionResult>;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=default-adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/default-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,eAAe,EAChB,MAAM,aAAa,CAAC;AAcrB,qBAAa,cAAe,YAAW,eAAe;IACpD,QAAQ,CAAC,IAAI,aAAa;IAEpB,UAAU,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAIxD,WAAW,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAIzD,SAAS,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAIvD,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAI/D,YAAY,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAI1D,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAInD,QAAQ,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAItD,QAAQ,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAItD,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAI/D,SAAS,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;CAG9D"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default Platform Adapter - No-op implementation for CLI and testing.
|
|
3
|
-
*
|
|
4
|
-
* Every method logs the action and returns a success result.
|
|
5
|
-
* This adapter is safe to use in any environment as it performs
|
|
6
|
-
* no actual enforcement.
|
|
7
|
-
*
|
|
8
|
-
* @module agent-threat-rules/adapters/default-adapter
|
|
9
|
-
*/
|
|
10
|
-
function createResult(action, ctx) {
|
|
11
|
-
return Object.freeze({
|
|
12
|
-
action,
|
|
13
|
-
success: true,
|
|
14
|
-
message: `[${action}] logged (no-op) for verdict: ${ctx.verdict.outcome}`,
|
|
15
|
-
timestamp: new Date().toISOString(),
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
export class DefaultAdapter {
|
|
19
|
-
name = 'default';
|
|
20
|
-
async blockInput(ctx) {
|
|
21
|
-
return createResult('block_input', ctx);
|
|
22
|
-
}
|
|
23
|
-
async blockOutput(ctx) {
|
|
24
|
-
return createResult('block_output', ctx);
|
|
25
|
-
}
|
|
26
|
-
async blockTool(ctx) {
|
|
27
|
-
return createResult('block_tool', ctx);
|
|
28
|
-
}
|
|
29
|
-
async quarantineSession(ctx) {
|
|
30
|
-
return createResult('quarantine_session', ctx);
|
|
31
|
-
}
|
|
32
|
-
async resetContext(ctx) {
|
|
33
|
-
return createResult('reset_context', ctx);
|
|
34
|
-
}
|
|
35
|
-
async alert(ctx) {
|
|
36
|
-
return createResult('alert', ctx);
|
|
37
|
-
}
|
|
38
|
-
async snapshot(ctx) {
|
|
39
|
-
return createResult('snapshot', ctx);
|
|
40
|
-
}
|
|
41
|
-
async escalate(ctx) {
|
|
42
|
-
return createResult('escalate', ctx);
|
|
43
|
-
}
|
|
44
|
-
async reducePermissions(ctx) {
|
|
45
|
-
return createResult('reduce_permissions', ctx);
|
|
46
|
-
}
|
|
47
|
-
async killAgent(ctx) {
|
|
48
|
-
return createResult('kill_agent', ctx);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=default-adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default-adapter.js","sourceRoot":"","sources":["../../src/adapters/default-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH,SAAS,YAAY,CACnB,MAA8B,EAC9B,GAAqB;IAErB,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,MAAM;QACN,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,IAAI,MAAM,iCAAiC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE;QACzE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,OAAO,cAAc;IAChB,IAAI,GAAG,SAAS,CAAC;IAE1B,KAAK,CAAC,UAAU,CAAC,GAAqB;QACpC,OAAO,YAAY,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,GAAqB;QACrC,OAAO,YAAY,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,GAAqB;QACnC,OAAO,YAAY,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,GAAqB;QAC3C,OAAO,YAAY,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,GAAqB;QACtC,OAAO,YAAY,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,GAAqB;QAC/B,OAAO,YAAY,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,GAAqB;QAClC,OAAO,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,GAAqB;QAClC,OAAO,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,KAAK,CAAC,iBAAiB,CAAC,GAAqB;QAC3C,OAAO,YAAY,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,GAAqB;QACnC,OAAO,YAAY,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;CACF"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Stdio Platform Adapter - Adapter for Claude Code hook integration.
|
|
3
|
-
*
|
|
4
|
-
* Block actions write JSON responses to an internal buffer that can
|
|
5
|
-
* be flushed to stdout. Alert and snapshot actions log to stderr
|
|
6
|
-
* to avoid interfering with the JSON protocol on stdout.
|
|
7
|
-
*
|
|
8
|
-
* @module agent-threat-rules/adapters/stdio-adapter
|
|
9
|
-
*/
|
|
10
|
-
import type { ActionResult, ExecutionContext, PlatformAdapter } from '../types.js';
|
|
11
|
-
export declare class StdioAdapter implements PlatformAdapter {
|
|
12
|
-
readonly name = "stdio";
|
|
13
|
-
private readonly responseBuffer;
|
|
14
|
-
/**
|
|
15
|
-
* Get buffered responses and clear the buffer.
|
|
16
|
-
* Returns a frozen copy.
|
|
17
|
-
*/
|
|
18
|
-
flushResponses(): readonly unknown[];
|
|
19
|
-
blockInput(ctx: ExecutionContext): Promise<ActionResult>;
|
|
20
|
-
blockOutput(ctx: ExecutionContext): Promise<ActionResult>;
|
|
21
|
-
blockTool(ctx: ExecutionContext): Promise<ActionResult>;
|
|
22
|
-
quarantineSession(ctx: ExecutionContext): Promise<ActionResult>;
|
|
23
|
-
resetContext(ctx: ExecutionContext): Promise<ActionResult>;
|
|
24
|
-
alert(ctx: ExecutionContext): Promise<ActionResult>;
|
|
25
|
-
snapshot(ctx: ExecutionContext): Promise<ActionResult>;
|
|
26
|
-
escalate(ctx: ExecutionContext): Promise<ActionResult>;
|
|
27
|
-
reducePermissions(ctx: ExecutionContext): Promise<ActionResult>;
|
|
28
|
-
killAgent(ctx: ExecutionContext): Promise<ActionResult>;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=stdio-adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stdio-adapter.d.ts","sourceRoot":"","sources":["../../src/adapters/stdio-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,gBAAgB,EAChB,eAAe,EAChB,MAAM,aAAa,CAAC;AAcrB,qBAAa,YAAa,YAAW,eAAe;IAClD,QAAQ,CAAC,IAAI,WAAW;IACxB,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAEhD;;;OAGG;IACH,cAAc,IAAI,SAAS,OAAO,EAAE;IAM9B,UAAU,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAUxD,WAAW,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAUzD,SAAS,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAWvD,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAU/D,YAAY,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAS1D,KAAK,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAWnD,QAAQ,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAetD,QAAQ,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAWtD,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAU/D,SAAS,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;CAS9D"}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Stdio Platform Adapter - Adapter for Claude Code hook integration.
|
|
3
|
-
*
|
|
4
|
-
* Block actions write JSON responses to an internal buffer that can
|
|
5
|
-
* be flushed to stdout. Alert and snapshot actions log to stderr
|
|
6
|
-
* to avoid interfering with the JSON protocol on stdout.
|
|
7
|
-
*
|
|
8
|
-
* @module agent-threat-rules/adapters/stdio-adapter
|
|
9
|
-
*/
|
|
10
|
-
function makeResult(action, message) {
|
|
11
|
-
return Object.freeze({
|
|
12
|
-
action,
|
|
13
|
-
success: true,
|
|
14
|
-
message,
|
|
15
|
-
timestamp: new Date().toISOString(),
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
export class StdioAdapter {
|
|
19
|
-
name = 'stdio';
|
|
20
|
-
responseBuffer = [];
|
|
21
|
-
/**
|
|
22
|
-
* Get buffered responses and clear the buffer.
|
|
23
|
-
* Returns a frozen copy.
|
|
24
|
-
*/
|
|
25
|
-
flushResponses() {
|
|
26
|
-
const copy = Object.freeze([...this.responseBuffer]);
|
|
27
|
-
this.responseBuffer.length = 0;
|
|
28
|
-
return copy;
|
|
29
|
-
}
|
|
30
|
-
async blockInput(ctx) {
|
|
31
|
-
const entry = {
|
|
32
|
-
action: 'block_input',
|
|
33
|
-
verdict: ctx.verdict.outcome,
|
|
34
|
-
reason: ctx.verdict.reason,
|
|
35
|
-
};
|
|
36
|
-
this.responseBuffer.push(entry);
|
|
37
|
-
return makeResult('block_input', 'Input blocked via stdio protocol');
|
|
38
|
-
}
|
|
39
|
-
async blockOutput(ctx) {
|
|
40
|
-
const entry = {
|
|
41
|
-
action: 'block_output',
|
|
42
|
-
verdict: ctx.verdict.outcome,
|
|
43
|
-
reason: ctx.verdict.reason,
|
|
44
|
-
};
|
|
45
|
-
this.responseBuffer.push(entry);
|
|
46
|
-
return makeResult('block_output', 'Output blocked via stdio protocol');
|
|
47
|
-
}
|
|
48
|
-
async blockTool(ctx) {
|
|
49
|
-
const entry = {
|
|
50
|
-
action: 'block_tool',
|
|
51
|
-
verdict: ctx.verdict.outcome,
|
|
52
|
-
reason: ctx.verdict.reason,
|
|
53
|
-
tool: ctx.event.fields?.['tool_name'] ?? 'unknown',
|
|
54
|
-
};
|
|
55
|
-
this.responseBuffer.push(entry);
|
|
56
|
-
return makeResult('block_tool', 'Tool blocked via stdio protocol');
|
|
57
|
-
}
|
|
58
|
-
async quarantineSession(ctx) {
|
|
59
|
-
const entry = {
|
|
60
|
-
action: 'quarantine_session',
|
|
61
|
-
verdict: ctx.verdict.outcome,
|
|
62
|
-
sessionId: ctx.sessionId ?? 'unknown',
|
|
63
|
-
};
|
|
64
|
-
this.responseBuffer.push(entry);
|
|
65
|
-
return makeResult('quarantine_session', 'Session quarantined via stdio protocol');
|
|
66
|
-
}
|
|
67
|
-
async resetContext(ctx) {
|
|
68
|
-
const entry = {
|
|
69
|
-
action: 'reset_context',
|
|
70
|
-
verdict: ctx.verdict.outcome,
|
|
71
|
-
};
|
|
72
|
-
this.responseBuffer.push(entry);
|
|
73
|
-
return makeResult('reset_context', 'Context reset via stdio protocol');
|
|
74
|
-
}
|
|
75
|
-
async alert(ctx) {
|
|
76
|
-
const alertMsg = {
|
|
77
|
-
type: 'alert',
|
|
78
|
-
severity: ctx.verdict.highestSeverity,
|
|
79
|
-
reason: ctx.verdict.reason,
|
|
80
|
-
matchCount: ctx.verdict.matchCount,
|
|
81
|
-
};
|
|
82
|
-
process.stderr.write(JSON.stringify(alertMsg) + '\n');
|
|
83
|
-
return makeResult('alert', 'Alert written to stderr');
|
|
84
|
-
}
|
|
85
|
-
async snapshot(ctx) {
|
|
86
|
-
const snapshotData = {
|
|
87
|
-
type: 'snapshot',
|
|
88
|
-
event: {
|
|
89
|
-
type: ctx.event.type,
|
|
90
|
-
contentPreview: ctx.event.content.slice(0, 200),
|
|
91
|
-
},
|
|
92
|
-
verdict: ctx.verdict.outcome,
|
|
93
|
-
matchCount: ctx.verdict.matchCount,
|
|
94
|
-
timestamp: new Date().toISOString(),
|
|
95
|
-
};
|
|
96
|
-
process.stderr.write(JSON.stringify(snapshotData) + '\n');
|
|
97
|
-
return makeResult('snapshot', 'Snapshot written to stderr');
|
|
98
|
-
}
|
|
99
|
-
async escalate(ctx) {
|
|
100
|
-
const escalation = {
|
|
101
|
-
type: 'escalation',
|
|
102
|
-
severity: ctx.verdict.highestSeverity,
|
|
103
|
-
reason: ctx.verdict.reason,
|
|
104
|
-
matchCount: ctx.verdict.matchCount,
|
|
105
|
-
};
|
|
106
|
-
process.stderr.write(JSON.stringify(escalation) + '\n');
|
|
107
|
-
return makeResult('escalate', 'Escalation written to stderr');
|
|
108
|
-
}
|
|
109
|
-
async reducePermissions(ctx) {
|
|
110
|
-
const entry = {
|
|
111
|
-
action: 'reduce_permissions',
|
|
112
|
-
verdict: ctx.verdict.outcome,
|
|
113
|
-
reason: ctx.verdict.reason,
|
|
114
|
-
};
|
|
115
|
-
this.responseBuffer.push(entry);
|
|
116
|
-
return makeResult('reduce_permissions', 'Permissions reduced via stdio protocol');
|
|
117
|
-
}
|
|
118
|
-
async killAgent(ctx) {
|
|
119
|
-
const entry = {
|
|
120
|
-
action: 'kill_agent',
|
|
121
|
-
verdict: ctx.verdict.outcome,
|
|
122
|
-
reason: ctx.verdict.reason,
|
|
123
|
-
};
|
|
124
|
-
this.responseBuffer.push(entry);
|
|
125
|
-
return makeResult('kill_agent', 'Agent kill requested via stdio protocol');
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
//# sourceMappingURL=stdio-adapter.js.map
|
|
@@ -1 +0,0 @@
|
|
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