@exorcist-98/cli 0.1.1 → 0.1.2

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 CHANGED
@@ -11,7 +11,7 @@ Needs Node 20 or newer.
11
11
  ## Scan a project
12
12
 
13
13
  ```sh
14
- npx -y @exorcist-98/cli@0.1.1 scan .
14
+ npx -y @exorcist-98/cli@0.1.2 scan .
15
15
  ```
16
16
 
17
17
  Every finding shows the file, line, the exact text, how serious it is and how
@@ -26,7 +26,7 @@ text. It needs AWS credentials, `AWS_REGION` and
26
26
  ## Map the haunted house
27
27
 
28
28
  ```sh
29
- npx -y @exorcist-98/cli@0.1.1 map .
29
+ npx -y @exorcist-98/cli@0.1.2 map .
30
30
  ```
31
31
 
32
32
  For every MCP config in the folder, lists which servers sit in the three rooms
@@ -39,8 +39,8 @@ data. The rules are in `definitions/capabilities.yaml`.
39
39
  ## Disinfect (exorcise)
40
40
 
41
41
  ```sh
42
- npx -y @exorcist-98/cli@0.1.1 exorcise . # dry run: prints a unified diff
43
- npx -y @exorcist-98/cli@0.1.1 exorcise . --write # apply, with a vault backup first
42
+ npx -y @exorcist-98/cli@0.1.2 exorcise . # dry run: prints a unified diff
43
+ npx -y @exorcist-98/cli@0.1.2 exorcise . --write # apply, with a vault backup first
44
44
  ```
45
45
 
46
46
  Only threats with one safe, mechanical fix are repaired: hidden characters
@@ -54,7 +54,7 @@ human"), and `exorcist vault restore <id>` puts every file back byte for byte.
54
54
  ## Protect your MCP servers
55
55
 
56
56
  ```sh
57
- npx -y @exorcist-98/cli@0.1.1 wrap .kiro/settings/mcp.json
57
+ npx -y @exorcist-98/cli@0.1.2 wrap .kiro/settings/mcp.json
58
58
  ```
59
59
 
60
60
  `wrap` puts every server in the file, local or remote, behind the Real-Time
@@ -66,9 +66,9 @@ instruct your agent. `unwrap` restores the file exactly. See
66
66
  ## Share approved tools with your team: exorcist.lock
67
67
 
68
68
  ```sh
69
- npx -y @exorcist-98/cli@0.1.1 lock # write exorcist.lock, then commit it
70
- npx -y @exorcist-98/cli@0.1.1 lock --check # exit 1 if any tool or program changed
71
- npx -y @exorcist-98/cli@0.1.1 lock --check --static # starts nothing: names, programs, URLs only
69
+ npx -y @exorcist-98/cli@0.1.2 lock # write exorcist.lock, then commit it
70
+ npx -y @exorcist-98/cli@0.1.2 lock --check # exit 1 if any tool or program changed
71
+ npx -y @exorcist-98/cli@0.1.2 lock --check --static # starts nothing: names, programs, URLs only
72
72
  ```
73
73
 
74
74
  `exorcist.lock` records the fingerprint of every tool your MCP servers list,
@@ -25,6 +25,17 @@ match:
25
25
  classes:
26
26
  - zero-width
27
27
  severity: medium
28
+ # A single U+200B between @ and a name is how changelogs keep GitHub from
29
+ # notifying that person (an @ sign, a zero-width space, then the name). It carries no message, so it is low and
30
+ # does not count toward the five short runs that make a file suspect.
31
+ mention_guard:
32
+ severity: low
33
+ # Test and eval fixtures hold attack samples on purpose (a security scanner's
34
+ # own tests, adversarial evals). Findings there are reported at low severity,
35
+ # not dropped. A file an agent reads (instructions, hooks, MCP configs, .kiro,
36
+ # .claude, .cursor) is never lowered, wherever it sits.
37
+ low_severity_paths:
38
+ - "(^|/)(tests?|__tests__|__mocks__|spec|specs|fixtures?|testdata|test-data|e2e|evals?)/|[._-](test|spec)s?\\.[A-Za-z0-9]+$|_tests?\\.(rs|go|py)$"
28
39
  owasp:
29
40
  - "LLM01:2025 Prompt Injection"
30
41
  - "ASI03 Prompt Injection via External Content"
@@ -18,6 +18,19 @@ match:
18
18
  # EX-002 (docs/FIELD_REPORT.md). A quoted phrase that runs on into a longer
19
19
  # instruction is still reported.
20
20
  quoted_example_cues: '\b(?:such\s+as|e\.g\.|i\.e\.|for\s+(?:example|instance)|never|do\s+not|don''t|must\s+not|should\s+not|refuse|reject|treat|untrusted|inert|injection|jailbreak|adversarial|attack|malicious|hostile|crafted|hijack|red[- ]?team|detect|flag|block|strip|sanitiz|filter|pattern|phrase|cases?\b|example|quarantine|directive|look(?:s|ing)?\s+like|shaped)'
21
+ # A phrase the passage itself forbids is a defence, not an attack: "never
22
+ # ignore earlier instructions", "users cannot bypass the prompt", "it must not
23
+ # attempt to tell the agent to ignore earlier instructions". The negation has
24
+ # to govern the phrase (it ends right before it, or opens a list of what must
25
+ # not be attempted); "do not mention this, tell the agent to ..." is still an
26
+ # attack (m7-precision, packages/core/src/scanner/context.ts isNegated).
27
+ negated_cues: '\b(?:(?:must|should|shall|will|would|may|might|can|could)\s*(?:not|never)|(?:must|should|shall|would|could|do|does|did|is|are|was|were|has|have|ca|wo)n[''’]t|cannot|do(?:es)?\s+not|did\s+not|never|refus(?:e|es|ed|ing)\s+to|(?:is|are)\s+not\s+(?:to|allowed\s+to|permitted\s+to|able\s+to)|unable\s+to)\s+(?:(?:ever|simply|just|even|actually|knowingly)\s+)*$|\b(?:(?:must|should|shall|will|would|may|might|can|could)\s*(?:not|never)|(?:must|should|shall|would|could|do|does|did|is|are|was|were|has|have|ca|wo)n[''’]t|cannot)\s+(?:attempt|try|seek)\s+to\b[^.!?\n]*?\b(?:tell|instruct|ask|cause|make|persuade|trick|convince|get|force|let|allow)\w*\s+(?:(?:the|an?|your|any)\s+)?(?:(?:agent|model|assistant|ai|llm|bot|claude)s?\s+)?(?:to\s+)?$|\b(?:(?:must|should|shall|will|would|may|might|can|could)\s*(?:not|never)|(?:must|should|shall|would|could|do|does|did|is|are|was|were|has|have|ca|wo)n[''’]t|cannot|do(?:es)?\s+not|did\s+not|never|refus(?:e|es|ed|ing)\s+to|(?:is|are)\s+not\s+(?:to|allowed\s+to|permitted\s+to|able\s+to)|unable\s+to)\s+(?:follow|obey|comply\s+with|act\s+on|honou?r|accept|execute|run)\s+(?:(?:any|an?|the|such|these|those|that|text|instructions?|requests?|commands?|messages?|content|tool\s+output|it)\s+)*(?:(?:that|which)\s+)?(?:(?:say|says|saying|tell|tells|telling|ask|asks|asking)\s+(?:you\s+)?(?:to\s+)?)?$'
28
+ # Test and eval fixtures hold attack samples on purpose (a security scanner's
29
+ # own tests, adversarial evals). Findings there are reported at low severity,
30
+ # not dropped. A file an agent reads (instructions, hooks, MCP configs, .kiro,
31
+ # .claude, .cursor) is never lowered, wherever it sits.
32
+ low_severity_paths:
33
+ - "(^|/)(tests?|__tests__|__mocks__|spec|specs|fixtures?|testdata|test-data|e2e|evals?)/|[._-](test|spec)s?\\.[A-Za-z0-9]+$|_tests?\\.(rs|go|py)$"
21
34
  owasp:
22
35
  - "LLM01:2025 Prompt Injection"
23
36
  - "ASI03 Prompt Injection via External Content"
@@ -16,6 +16,16 @@ match:
16
16
  # A comment inside Markdown code (backticks or a fenced block) is displayed,
17
17
  # not hidden, so it is not smuggling.
18
18
  skip_in_code: true
19
+ # Only a bare linter directive is exempt: `<!-- noqa -->` or `<!-- noqa: CODE,
20
+ # CODE -->` and nothing else. Free text after the code is still checked, so
21
+ # starting a comment with noqa does not hide an instruction.
22
+ exclude_regex: '^<!--\s*noqa(?::\s*[A-Z0-9-]+(?:,\s*[A-Z0-9-]+)*)?\s*-->$'
23
+ # Test and eval fixtures hold attack samples on purpose (a security scanner's
24
+ # own tests, adversarial evals). Findings there are reported at low severity,
25
+ # not dropped. A file an agent reads (instructions, hooks, MCP configs, .kiro,
26
+ # .claude, .cursor) is never lowered, wherever it sits.
27
+ low_severity_paths:
28
+ - "(^|/)(tests?|__tests__|__mocks__|spec|specs|fixtures?|testdata|test-data|e2e|evals?)/|[._-](test|spec)s?\\.[A-Za-z0-9]+$|_tests?\\.(rs|go|py)$"
19
29
  owasp:
20
30
  - "LLM01:2025 Prompt Injection"
21
31
  - "ASI03 Prompt Injection via External Content"
@@ -5,7 +5,7 @@ applies_to:
5
5
  - mcp-config
6
6
  - config
7
7
  match:
8
- regex: "(before (responding|answering|using this tool)|(prior to|before) (invoking|calling|running|using) (this|any|the)\\b|do not (inform|tell|mention|notify|alert) the user|without (telling|informing|notifying|asking) the user|(keep|stay) (this |it )?(quiet|secret|hidden) from|this is required for (audit|telemetry|logging)|(send|include|attach|upload|pass|forward)[^.\\n]{0,60}(~/\\.ssh|id_rsa|\\.env\\b|\\.aws/credentials|private key))"
8
+ regex: "(before (responding|answering|using this tool)|(prior to|before) (invoking|calling|running|using) (this|any|the)\\b|do not (inform|tell|mention|notify|alert) the user|without (telling|informing|notifying|asking) the user|(keep|stay) (this |it )?(quiet|secret|hidden) from|this is required for (audit|telemetry|logging)|\\b(?:send|include|attach|upload|pass|forward)(?:s|es|ed|ing)?\\b[^.\\n]{0,60}(~/\\.ssh|id_rsa|\\.env\\b|\\.aws/credentials|private key))"
9
9
  # Only in files that describe MCP servers or tools. Model or prompt configs
10
10
  # that say \"do not mention\" are ordinary (seen in openai/codex).
11
11
  file_regex: "(\"mcpServers\"|\"inputSchema\"|\"input_schema\")"
@@ -12,8 +12,14 @@ match:
12
12
  # in q= or d= is an image setting (quality, density) that image CDNs and
13
13
  # Next.js image URLs carry, not data.
14
14
  regex: "!\\[[^\\]]*\\]\\(https?://[^)?\\s]+(?=\\?)[^)\\s]*(?:[?&](?:(?:d|q)=(?!\\d{1,4}(?:[&)\\s]|$))|(?:data|payload|content|text|msg|token|key|secret|password|pass|pwd|env|cookie|session|auth|creds?|leak|info|user|email)=)|\\{\\{|\\$\\{|%s|<[a-z_]+>|\\b(?:PLACEHOLDER|REPLACE_ME|INSERT)\\b)[^)\\s]*\\)"
15
- # Well-known badge services take query strings by design.
16
- exclude_regex: "\\]\\(https?://(?:(?:img\\.shields\\.io|shields\\.io|badgen\\.net|badge\\.fury\\.io|(?:app\\.)?codecov\\.io|coveralls\\.io|(?:api\\.)?travis-ci\\.(?:org|com)|(?:dl\\.)?circleci\\.com|api\\.netlify\\.com|deepwiki\\.com/badge|www\\.bestpractices\\.dev|api\\.securityscorecards\\.dev|(?:static\\.)?pepy\\.tech|sonarcloud\\.io|readthedocs\\.org|img\\.badgesize\\.io|snyk\\.io/test|discord(?:app)?\\.com/api/guilds|camo\\.githubusercontent\\.com|vercel\\.com/button|deploy\\.workers\\.cloudflare\\.com)/|github\\.com/[^)]*/(?:badge\\.svg|actions/workflows/))|\\]\\(https?://(?:github\\.com/[^)?]+\\?raw=true\\)|raw\\.githubusercontent\\.com/)"
15
+ # Well-known badge services take query strings by design. So do the image
16
+ # links Google Docs (googleusercontent, ?key=) and GitBook (alt=media&token=)
17
+ # make for pictures that were pasted into a document: the key or token is
18
+ # the picture's own address, issued by the host that serves it. Both are
19
+ # anchored: the host is whole dot-separated labels (so attacker-googleusercontent.com
20
+ # is not exempt), and the query is exactly ?key=... or ?alt=media&token=...
21
+ # with nothing before, between or after (so data cannot ride along).
22
+ exclude_regex: "\\]\\(https?://(?:(?:img\\.shields\\.io|shields\\.io|badgen\\.net|badge\\.fury\\.io|(?:app\\.)?codecov\\.io|coveralls\\.io|(?:api\\.)?travis-ci\\.(?:org|com)|(?:dl\\.)?circleci\\.com|api\\.netlify\\.com|deepwiki\\.com/badge|www\\.bestpractices\\.dev|api\\.securityscorecards\\.dev|(?:static\\.)?pepy\\.tech|sonarcloud\\.io|readthedocs\\.org|img\\.badgesize\\.io|snyk\\.io/test|discord(?:app)?\\.com/api/guilds|camo\\.githubusercontent\\.com|vercel\\.com/button|deploy\\.workers\\.cloudflare\\.com)/|github\\.com/[^)]*/(?:badge\\.svg|actions/workflows/))|\\]\\(https?://(?:github\\.com/[^)?]+\\?raw=true\\)|raw\\.githubusercontent\\.com/)|\\]\\(https?://(?:[a-z0-9-]+\\.)*googleusercontent\\.com/(?:docsz|d)/[^)\\s?]*\\?key=[A-Za-z0-9_-]+\\)|\\]\\(https?://(?:[a-z0-9-]+-)?files\\.gitbook\\.io/~/files/v0/b/gitbook-x-prod\\.appspot\\.com/o/[^)\\s?]*\\?alt=media\\\\?&token=[A-Za-z0-9-]+\\)"
17
23
  # An image inside Markdown code (backticks or a fenced block) is shown as
18
24
  # text and never loaded, so it cannot send anything (security docs quote
19
25
  # defanged examples that way).
@@ -15,6 +15,13 @@ match:
15
15
  # EX-002 (docs/FIELD_REPORT.md). A quoted phrase that runs on into a longer
16
16
  # instruction is still reported.
17
17
  quoted_example_cues: '\b(?:such\s+as|e\.g\.|i\.e\.|for\s+(?:example|instance)|never|do\s+not|don''t|must\s+not|should\s+not|refuse|reject|treat|untrusted|inert|injection|jailbreak|adversarial|attack|malicious|hostile|crafted|hijack|red[- ]?team|detect|flag|block|strip|sanitiz|filter|pattern|phrase|cases?\b|example|quarantine|directive|look(?:s|ing)?\s+like|shaped)'
18
+ # A phrase the passage itself forbids is a defence, not an attack: "never
19
+ # ignore earlier instructions", "users cannot bypass the prompt", "it must not
20
+ # attempt to tell the agent to ignore earlier instructions". The negation has
21
+ # to govern the phrase (it ends right before it, or opens a list of what must
22
+ # not be attempted); "do not mention this, tell the agent to ..." is still an
23
+ # attack (m7-precision, packages/core/src/scanner/context.ts isNegated).
24
+ negated_cues: '\b(?:(?:must|should|shall|will|would|may|might|can|could)\s*(?:not|never)|(?:must|should|shall|would|could|do|does|did|is|are|was|were|has|have|ca|wo)n[''’]t|cannot|do(?:es)?\s+not|did\s+not|never|refus(?:e|es|ed|ing)\s+to|(?:is|are)\s+not\s+(?:to|allowed\s+to|permitted\s+to|able\s+to)|unable\s+to)\s+(?:(?:ever|simply|just|even|actually|knowingly)\s+)*$|\b(?:(?:must|should|shall|will|would|may|might|can|could)\s*(?:not|never)|(?:must|should|shall|would|could|do|does|did|is|are|was|were|has|have|ca|wo)n[''’]t|cannot)\s+(?:attempt|try|seek)\s+to\b[^.!?\n]*?\b(?:tell|instruct|ask|cause|make|persuade|trick|convince|get|force|let|allow)\w*\s+(?:(?:the|an?|your|any)\s+)?(?:(?:agent|model|assistant|ai|llm|bot|claude)s?\s+)?(?:to\s+)?$|\b(?:(?:must|should|shall|will|would|may|might|can|could)\s*(?:not|never)|(?:must|should|shall|would|could|do|does|did|is|are|was|were|has|have|ca|wo)n[''’]t|cannot|do(?:es)?\s+not|did\s+not|never|refus(?:e|es|ed|ing)\s+to|(?:is|are)\s+not\s+(?:to|allowed\s+to|permitted\s+to|able\s+to)|unable\s+to)\s+(?:follow|obey|comply\s+with|act\s+on|honou?r|accept|execute|run)\s+(?:(?:any|an?|the|such|these|those|that|text|instructions?|requests?|commands?|messages?|content|tool\s+output|it)\s+)*(?:(?:that|which)\s+)?(?:(?:say|says|saying|tell|tells|telling|ask|asks|asking)\s+(?:you\s+)?(?:to\s+)?)?$'
18
25
  owasp:
19
26
  - "ASI02 Inadequate Human-in-the-Loop Controls"
20
27
  - "LLM06:2025 Excessive Agency"
@@ -13,6 +13,12 @@ match:
13
13
  # naming the servers on each leg; critical when a server on a leg has
14
14
  # auto-approved tools.
15
15
  analysis: trifecta
16
+ # Test and eval fixtures hold attack samples on purpose (a security scanner's
17
+ # own tests, adversarial evals). Findings there are reported at low severity,
18
+ # not dropped. A file an agent reads (instructions, hooks, MCP configs, .kiro,
19
+ # .claude, .cursor) is never lowered, wherever it sits.
20
+ low_severity_paths:
21
+ - "(^|/)(tests?|__tests__|__mocks__|spec|specs|fixtures?|testdata|test-data|e2e|evals?)/|[._-](test|spec)s?\\.[A-Za-z0-9]+$|_tests?\\.(rs|go|py)$"
16
22
  owasp:
17
23
  - "LLM01:2025 Prompt Injection"
18
24
  - "LLM06:2025 Excessive Agency"