bezoar 1.0.0a2__tar.gz
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.
- bezoar-1.0.0a2/.gitignore +31 -0
- bezoar-1.0.0a2/CHANGELOG.md +141 -0
- bezoar-1.0.0a2/LICENSE +202 -0
- bezoar-1.0.0a2/NOTICE +9 -0
- bezoar-1.0.0a2/PKG-INFO +201 -0
- bezoar-1.0.0a2/README.md +176 -0
- bezoar-1.0.0a2/pyproject.toml +89 -0
- bezoar-1.0.0a2/schemas/policy.v1.schema.json +233 -0
- bezoar-1.0.0a2/schemas/rulepack.v1.schema.json +129 -0
- bezoar-1.0.0a2/schemas/scan-result.v1.schema.json +412 -0
- bezoar-1.0.0a2/src/bezoar/__init__.py +24 -0
- bezoar-1.0.0a2/src/bezoar/__main__.py +7 -0
- bezoar-1.0.0a2/src/bezoar/adapters/__init__.py +15 -0
- bezoar-1.0.0a2/src/bezoar/adapters/base.py +505 -0
- bezoar-1.0.0a2/src/bezoar/adapters/claude_code.py +365 -0
- bezoar-1.0.0a2/src/bezoar/adapters/codex.py +824 -0
- bezoar-1.0.0a2/src/bezoar/adapters/copilot.py +552 -0
- bezoar-1.0.0a2/src/bezoar/adapters/cursor.py +291 -0
- bezoar-1.0.0a2/src/bezoar/adapters/gemini_cli.py +710 -0
- bezoar-1.0.0a2/src/bezoar/adapters/generic.py +1732 -0
- bezoar-1.0.0a2/src/bezoar/cache.py +568 -0
- bezoar-1.0.0a2/src/bezoar/cli.py +492 -0
- bezoar-1.0.0a2/src/bezoar/data/NOTICE +39 -0
- bezoar-1.0.0a2/src/bezoar/data/harness/claude_code.yml +120 -0
- bezoar-1.0.0a2/src/bezoar/data/harness/codex.yml +78 -0
- bezoar-1.0.0a2/src/bezoar/data/harness/common.yml +53 -0
- bezoar-1.0.0a2/src/bezoar/data/harness/copilot.yml +41 -0
- bezoar-1.0.0a2/src/bezoar/data/harness/cursor.yml +65 -0
- bezoar-1.0.0a2/src/bezoar/data/harness/gemini_cli.yml +66 -0
- bezoar-1.0.0a2/src/bezoar/data/harness/grok.yml +77 -0
- bezoar-1.0.0a2/src/bezoar/data/policy/default.yml +66 -0
- bezoar-1.0.0a2/src/bezoar/data/rules/MANIFEST.json +573 -0
- bezoar-1.0.0a2/src/bezoar/data/rules/exfil_sinks.yml +103 -0
- bezoar-1.0.0a2/src/bezoar/data/rules/external_instructions.yml +79 -0
- bezoar-1.0.0a2/src/bezoar/data/rules/prompt_injection.yml +328 -0
- bezoar-1.0.0a2/src/bezoar/data/rules/secrets.yml +690 -0
- bezoar-1.0.0a2/src/bezoar/detectors/__init__.py +19 -0
- bezoar-1.0.0a2/src/bezoar/detectors/data_exfiltration.py +198 -0
- bezoar-1.0.0a2/src/bezoar/detectors/external_instructions.py +156 -0
- bezoar-1.0.0a2/src/bezoar/detectors/harness_forgery/__init__.py +12 -0
- bezoar-1.0.0a2/src/bezoar/detectors/harness_forgery/context.py +251 -0
- bezoar-1.0.0a2/src/bezoar/detectors/harness_forgery/detector.py +579 -0
- bezoar-1.0.0a2/src/bezoar/detectors/harness_forgery/tags.py +537 -0
- bezoar-1.0.0a2/src/bezoar/detectors/harness_forgery/vocab.py +344 -0
- bezoar-1.0.0a2/src/bezoar/detectors/hidden_behavior.py +358 -0
- bezoar-1.0.0a2/src/bezoar/detectors/permissions.py +556 -0
- bezoar-1.0.0a2/src/bezoar/detectors/prompt_injection.py +6 -0
- bezoar-1.0.0a2/src/bezoar/detectors/secrets.py +6 -0
- bezoar-1.0.0a2/src/bezoar/detectors/supply_chain.py +722 -0
- bezoar-1.0.0a2/src/bezoar/engine/__init__.py +61 -0
- bezoar-1.0.0a2/src/bezoar/engine/dedupe.py +147 -0
- bezoar-1.0.0a2/src/bezoar/engine/edges.py +195 -0
- bezoar-1.0.0a2/src/bezoar/engine/pipeline.py +828 -0
- bezoar-1.0.0a2/src/bezoar/engine/session.py +409 -0
- bezoar-1.0.0a2/src/bezoar/engine/verdict.py +359 -0
- bezoar-1.0.0a2/src/bezoar/errors.py +105 -0
- bezoar-1.0.0a2/src/bezoar/incremental.py +184 -0
- bezoar-1.0.0a2/src/bezoar/judge/__init__.py +48 -0
- bezoar-1.0.0a2/src/bezoar/judge/advisory.py +417 -0
- bezoar-1.0.0a2/src/bezoar/judge/prompts/__init__.py +45 -0
- bezoar-1.0.0a2/src/bezoar/judge/prompts/v1.py +35 -0
- bezoar-1.0.0a2/src/bezoar/judge/protocol.py +333 -0
- bezoar-1.0.0a2/src/bezoar/judge/redact.py +125 -0
- bezoar-1.0.0a2/src/bezoar/mcp/__init__.py +27 -0
- bezoar-1.0.0a2/src/bezoar/mcp/probe.py +1032 -0
- bezoar-1.0.0a2/src/bezoar/mcp/tool_poisoning.py +578 -0
- bezoar-1.0.0a2/src/bezoar/models.py +674 -0
- bezoar-1.0.0a2/src/bezoar/normalize.py +520 -0
- bezoar-1.0.0a2/src/bezoar/parallel.py +231 -0
- bezoar-1.0.0a2/src/bezoar/parsing/__init__.py +36 -0
- bezoar-1.0.0a2/src/bezoar/parsing/commands.py +124 -0
- bezoar-1.0.0a2/src/bezoar/parsing/frontmatter.py +173 -0
- bezoar-1.0.0a2/src/bezoar/parsing/hooks.py +32 -0
- bezoar-1.0.0a2/src/bezoar/parsing/loaders.py +142 -0
- bezoar-1.0.0a2/src/bezoar/parsing/mcp_config.py +265 -0
- bezoar-1.0.0a2/src/bezoar/parsing/text.py +292 -0
- bezoar-1.0.0a2/src/bezoar/policy/__init__.py +38 -0
- bezoar-1.0.0a2/src/bezoar/policy/apply.py +583 -0
- bezoar-1.0.0a2/src/bezoar/policy/discovery.py +189 -0
- bezoar-1.0.0a2/src/bezoar/policy/schema.py +789 -0
- bezoar-1.0.0a2/src/bezoar/redact.py +319 -0
- bezoar-1.0.0a2/src/bezoar/registry.py +434 -0
- bezoar-1.0.0a2/src/bezoar/reporters/__init__.py +15 -0
- bezoar-1.0.0a2/src/bezoar/reporting/__init__.py +51 -0
- bezoar-1.0.0a2/src/bezoar/reporting/baseline.py +267 -0
- bezoar-1.0.0a2/src/bezoar/reporting/context.py +63 -0
- bezoar-1.0.0a2/src/bezoar/reporting/discover.py +79 -0
- bezoar-1.0.0a2/src/bezoar/reporting/exitcodes.py +49 -0
- bezoar-1.0.0a2/src/bezoar/reporting/json.py +37 -0
- bezoar-1.0.0a2/src/bezoar/reporting/paths.py +85 -0
- bezoar-1.0.0a2/src/bezoar/reporting/sarif.py +216 -0
- bezoar-1.0.0a2/src/bezoar/reporting/serialize.py +407 -0
- bezoar-1.0.0a2/src/bezoar/reporting/text.py +100 -0
- bezoar-1.0.0a2/src/bezoar/rules/__init__.py +21 -0
- bezoar-1.0.0a2/src/bezoar/rules/compile.py +992 -0
- bezoar-1.0.0a2/src/bezoar/rules/detector.py +350 -0
- bezoar-1.0.0a2/src/bezoar/rules/lint.py +186 -0
- bezoar-1.0.0a2/src/bezoar/rules/loader.py +213 -0
- bezoar-1.0.0a2/src/bezoar/rules/schema.py +476 -0
- bezoar-1.0.0a2/src/bezoar/serve/__init__.py +6 -0
- bezoar-1.0.0a2/src/bezoar/serve/__main__.py +9 -0
- bezoar-1.0.0a2/src/bezoar/serve/config.py +133 -0
- bezoar-1.0.0a2/src/bezoar/serve/core.py +869 -0
- bezoar-1.0.0a2/src/bezoar/serve/handler.py +698 -0
- bezoar-1.0.0a2/src/bezoar/serve/main.py +218 -0
- bezoar-1.0.0a2/src/bezoar/serve/problems.py +87 -0
- bezoar-1.0.0a2/src/bezoar/serve/scans.py +142 -0
- bezoar-1.0.0a2/src/bezoar/serve/security.py +306 -0
- bezoar-1.0.0a2/src/bezoar/serve/store.py +548 -0
- bezoar-1.0.0a2/tests/corpus/benign/copilot/mcp-vscode-pinned/.vscode/mcp.json +8 -0
- bezoar-1.0.0a2/tests/corpus/benign/cursor/command-test/.cursor/commands/test.md +3 -0
- bezoar-1.0.0a2/tests/corpus/benign/cursor/hooks-safe/.cursor/hooks.json +9 -0
- bezoar-1.0.0a2/tests/corpus/benign/cursor/mcp-pinned/.cursor/mcp.json +8 -0
- bezoar-1.0.0a2/tests/corpus/benign/cursor/rules-react/.cursor/rules/react.mdc +9 -0
- bezoar-1.0.0a2/tests/corpus/benign/cursor/rules-typescript/.cursor/rules/typescript.mdc +9 -0
- bezoar-1.0.0a2/tests/corpus/benign/cursor/security-scanner-skill/.cursor/skills/xml-audit/SKILL.md +15 -0
- bezoar-1.0.0a2/tests/corpus/benign/cursor/skill-docs-html-comments/.cursor/skills/doc-comments/SKILL.md +11 -0
- bezoar-1.0.0a2/tests/corpus/benign/cursor/skill-refactor/.cursor/skills/refactor/SKILL.md +7 -0
- bezoar-1.0.0a2/tests/corpus/malicious/copilot/sc-mcpjacking-http/.vscode/mcp.json +7 -0
- bezoar-1.0.0a2/tests/corpus/malicious/cursor/hf-encoded-hex/.cursor/skills/hex-notes/SKILL.md +9 -0
- bezoar-1.0.0a2/tests/corpus/malicious/cursor/hf-encoded-html-entities/.cursor/skills/entity-notes/SKILL.md +9 -0
- bezoar-1.0.0a2/tests/corpus/malicious/cursor/hf-model-layer/.cursor/skills/shell-wrap/SKILL.md +9 -0
- bezoar-1.0.0a2/tests/corpus/malicious/cursor/hf-steer-prefix/.cursor/skills/queue-helper/SKILL.md +8 -0
- bezoar-1.0.0a2/tests/corpus/malicious/cursor/hf-turn-marker/.cursor/rules/always.mdc +7 -0
- bezoar-1.0.0a2/tests/corpus/malicious/cursor/sc-mutable-git-ref/.cursor/skills/git-helpers/SKILL.md +7 -0
- bezoar-1.0.0a2/tests/corpus/malicious/cursor/sc-mutable-git-ref/.cursor/skills/git-helpers/package.json +6 -0
- bezoar-1.0.0a2/tests/corpus/malicious/cursor/sc-unpinned-uvx/.cursor/mcp.json +8 -0
- bezoar-1.0.0a2/tests/e2e/__init__.py +1 -0
- bezoar-1.0.0a2/tests/e2e/conftest.py +57 -0
- bezoar-1.0.0a2/tests/e2e/e2e_support.py +124 -0
- bezoar-1.0.0a2/tests/e2e/test_e2e_corpus.py +202 -0
- bezoar-1.0.0a2/tests/e2e/test_e2e_determinism.py +31 -0
- bezoar-1.0.0a2/tests/e2e/test_e2e_discover.py +44 -0
- bezoar-1.0.0a2/tests/e2e/test_e2e_exit_codes.py +127 -0
- bezoar-1.0.0a2/tests/e2e/test_e2e_incremental.py +126 -0
- bezoar-1.0.0a2/tests/e2e/test_e2e_sarif.py +43 -0
- bezoar-1.0.0a2/tests/e2e/test_e2e_text.py +57 -0
- bezoar-1.0.0a2/tests/fixtures/benign-skill/SKILL.md +18 -0
- bezoar-1.0.0a2/tests/fixtures/harness/manifest.json +534 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/a-colon-midline.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/antml-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/base64-innocent.md +5 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/channel-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/chatml-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/copilot-usage-heading.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/directive-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/environment-word.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/escaped-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/fence-example-detect.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/fence-html-example.md +7 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/fork-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/function-results-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/human-assistant-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/inst-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/invoke-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/json-config.md +4 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/looks-like-without-tag.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/markdown-user-midline.md +4 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/match-example-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/mcp-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/normal-skill-formatter.md +7 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/notice-word.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/output-word.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/permissions-docs.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/prose-system-reminder.md +4 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/python-print.md +5 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/regex-docs.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/rules-word.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/scheduled-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/security-readme-prose.md +7 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/shell-snippet.md +5 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/skill-information-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/source-word.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/table-not-turn.md +5 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/untrusted-word.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/user-query-prose.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/workspace-word.md +3 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/xml-div-span.md +4 -0
- bezoar-1.0.0a2/tests/fixtures/harness/negatives/yaml-frontmatter-only.md +7 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-bash-stdout-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-channel-open.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-confusable-fw.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-cross-gemini.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-encoded-b64.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-escalation.md +7 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-escaped-bs.md +7 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-escaped.md +7 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-hidden-comment.md +10 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-notice-system.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-pseudo-fnr.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-pseudo-meta.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-01.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-02.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-03.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-04.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-05.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-06.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-07.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-08.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-09.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-10.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-11.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-12.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-reminder-tpl-13.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-steer-directive.md +7 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-steer.md +7 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude-tool-ends.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude_code-context-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude_code-envelope-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude_code-fork-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude_code-mcp-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude_code-open-imperative.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude_code-reminder-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/claude_code-tool_result-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/codex-context-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/codex-context-perm-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/codex-context-skill-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/codex-envelope-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/codex-msg-type.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/codex-open-imperative.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/codex-prose.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/common-context-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/common-im-start.md +10 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/common-inst.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/common-tool_result-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/copilot-context-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/copilot-context-ins-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/copilot-encoded-url.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/cursor-context-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/cursor-context-files-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/cursor-context-rules-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/cursor-encoded-hex.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/cursor-encoded-html.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/cursor-model-layer.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/cursor-open-imperative.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/cursor-reminder-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/cursor-turn-pair.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/gemini-notice-continue.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/gemini_cli-context-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/gemini_cli-context-proj-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/gemini_cli-envelope-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/gemini_cli-open-imperative.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/grok-context-bg-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/grok-context-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/grok-context-tr-close.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/grok-notice-agent.md +8 -0
- bezoar-1.0.0a2/tests/fixtures/harness/positives/grok-open-imperative.md +9 -0
- bezoar-1.0.0a2/tests/fixtures/malicious-skill/SKILL.md +28 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/conftest.py +59 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.claude/CLAUDE.md +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.claude/agents/user-agent.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.claude/commands/user-cmd.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.claude/plugins/acme/demo/.claude-plugin/plugin.json +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.claude/plugins/acme/demo/skills/plug/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.claude/settings.json +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.claude/skills/user-skill/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.claude.json +7 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.cursor/hooks.json +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.cursor/mcp.json +8 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.cursor/plugins/cache/acme/widget/deadbeef/mcp.json +8 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.cursor/plugins/cache/acme/widget/deadbeef/rules/cached.mdc +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.cursor/plugins/cache/acme/widget/deadbeef/skills/cached/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.cursor/skills/user-cursor/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/home/.cursor/skills-cursor/builtin/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/malformed/.claude/skills/bad/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/malformed/.claude-plugin/plugin.json +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/malformed/.cursor/rules/bad.mdc +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/malformed/new-schema/.claude-plugin/plugin.json +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/outside/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.claude/CLAUDE.md +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.claude/agents/reviewer.md +6 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.claude/commands/nested/deep.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.claude/commands/review.md +6 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.claude/settings.json +20 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.claude/settings.local.json +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.claude/skills/proj-skill/SKILL.md +6 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.claude/skills/proj-skill/scripts/install.sh +2 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.claude-plugin/marketplace.json +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.claude-plugin/plugin.json +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.cursor/agents/cursor-agent.md +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.cursor/commands/test.md +2 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.cursor/hooks.json +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.cursor/mcp.json +8 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.cursor/rules/always.mdc +8 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.cursor/settings.json +3 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.cursor/skills/cursor-skill/SKILL.md +6 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.cursorrules +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/.mcp.json +12 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/AGENTS.md +2 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/CLAUDE.local.md +2 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/CLAUDE.md +2 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/agentskills-layout/README.md +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/agentskills-layout/manifest.json +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/custom.mcp.json +8 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/extra.agent.md +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/local-mcp/server.py +2 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/managed-settings.json +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/nested/bundle/.claude-plugin/plugin.json +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/nested/bundle/skills/inner/SKILL.md +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/nested/bundle/skills/inner/scripts/run.sh +2 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/node_modules/fake/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/orphan-skill/skill.json +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/skills/bundled/SKILL.md +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/standalone-skill/SKILL.md +6 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/standalone-skill/scripts/setup.sh +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/fixtures/project/vendor/plugin.json +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/goldens/claude_code.discover.json +385 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/goldens/cursor.discover.json +204 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/goldens/generic.discover.json +197 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/test_e1_corpus.py +55 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/test_e1_discover.py +216 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/test_e1_edges.py +49 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/test_e1_malformed.py +54 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/test_goldens.py +59 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/test_load.py +173 -0
- bezoar-1.0.0a2/tests/unit/adapters_e1/test_safety.py +37 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/conftest.py +18 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/e2_helpers.py +287 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/malformed/.codex/config.toml +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/new_schema/.codex/config.toml +2 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/project/.codex/config.toml +16 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/project/.codex/skills/demo/SKILL.md +6 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/project/AGENTS.md +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/project/AGENTS.override.md +2 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/project/extra-skills/bundled/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/project/extra.md +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/project/nested/app/.codex/skills/inner/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/project/scripts/mcp-server.py +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/user/AGENTS.md +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/user/config.toml +6 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/user/plugins/pack/plugin.json +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/user/plugins/pack/skills/bundled/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/user/prompts/review.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/codex/user/skills/user-skill/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/malformed/.vscode/mcp.json +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/.copilot/skills/c/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/.github/agents/reviewer.agent.md +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/.github/copilot/agents/extra.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/.github/copilot/mcp.json +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/.github/copilot-instructions.md +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/.github/instructions/testing.instructions.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/.github/prompts/sum.prompt.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/.github/skills/s/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/.mcp.json +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/.vscode/mcp.json +10 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/.vscode/settings.json +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/AGENTS.md +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/project/nested/.mcp.json +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/user/config.json +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/copilot/user/mcp-config.json +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/escape/.gemini/extensions/evil/gemini-extension.json +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/malformed/.gemini/settings.json +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/new_schema/.gemini/extensions/x/gemini-extension.json +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/project/.gemini/commands/nested/foo.toml +2 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/project/.gemini/commands/review.toml +3 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/project/.gemini/extensions/docs/agents/writer.md +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/project/.gemini/extensions/docs/bin/server +2 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/project/.gemini/extensions/docs/commands/sum.toml +2 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/project/.gemini/extensions/docs/gemini-extension.json +14 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/project/.gemini/extensions/docs/skills/outline/SKILL.md +4 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/project/.gemini/settings.json +14 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/project/.gemini/skills/s/SKILL.md +5 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/project/CONTEXT.md +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/fixtures/gemini_cli/project/GEMINI.md +1 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/goldens/codex.discover.json +124 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/goldens/copilot.discover.json +194 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/goldens/gemini_cli.discover.json +162 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/test_codex.py +133 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/test_common.py +127 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/test_copilot.py +118 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/test_gemini_cli.py +132 -0
- bezoar-1.0.0a2/tests/unit/adapters_e2/test_golden.py +33 -0
- bezoar-1.0.0a2/tests/unit/cli/conftest.py +34 -0
- bezoar-1.0.0a2/tests/unit/cli/test_baseline_path.py +146 -0
- bezoar-1.0.0a2/tests/unit/cli/test_cli_discover.py +66 -0
- bezoar-1.0.0a2/tests/unit/cli/test_cli_streams.py +82 -0
- bezoar-1.0.0a2/tests/unit/cli/test_exit_codes.py +74 -0
- bezoar-1.0.0a2/tests/unit/cli/test_flags.py +247 -0
- bezoar-1.0.0a2/tests/unit/cli/test_policy_rules_cache.py +148 -0
- bezoar-1.0.0a2/tests/unit/cli/test_scan.py +61 -0
- bezoar-1.0.0a2/tests/unit/core/fixtures/mcp/claude.mcp.json +18 -0
- bezoar-1.0.0a2/tests/unit/core/fixtures/mcp/codex.config.toml +9 -0
- bezoar-1.0.0a2/tests/unit/core/fixtures/mcp/cursor.mcp.json +8 -0
- bezoar-1.0.0a2/tests/unit/core/fixtures/mcp/gemini.settings.json +8 -0
- bezoar-1.0.0a2/tests/unit/core/fixtures/mcp/vscode.mcp.json +19 -0
- bezoar-1.0.0a2/tests/unit/core/test_adapter_truncation.py +202 -0
- bezoar-1.0.0a2/tests/unit/core/test_adapters_base.py +98 -0
- bezoar-1.0.0a2/tests/unit/core/test_cache_key.py +184 -0
- bezoar-1.0.0a2/tests/unit/core/test_errors.py +38 -0
- bezoar-1.0.0a2/tests/unit/core/test_file_truncation.py +188 -0
- bezoar-1.0.0a2/tests/unit/core/test_locate_property.py +70 -0
- bezoar-1.0.0a2/tests/unit/core/test_mcp_config.py +164 -0
- bezoar-1.0.0a2/tests/unit/core/test_models.py +109 -0
- bezoar-1.0.0a2/tests/unit/core/test_normalize.py +161 -0
- bezoar-1.0.0a2/tests/unit/core/test_p0_compat.py +29 -0
- bezoar-1.0.0a2/tests/unit/core/test_parsing.py +87 -0
- bezoar-1.0.0a2/tests/unit/core/test_registry.py +53 -0
- bezoar-1.0.0a2/tests/unit/core/test_registry_plugins.py +97 -0
- bezoar-1.0.0a2/tests/unit/detectors/conftest.py +136 -0
- bezoar-1.0.0a2/tests/unit/detectors/test_corpus_required.py +102 -0
- bezoar-1.0.0a2/tests/unit/detectors/test_data_exfiltration.py +124 -0
- bezoar-1.0.0a2/tests/unit/detectors/test_external_instructions.py +111 -0
- bezoar-1.0.0a2/tests/unit/detectors/test_hidden_behavior.py +228 -0
- bezoar-1.0.0a2/tests/unit/detectors/test_permissions.py +236 -0
- bezoar-1.0.0a2/tests/unit/detectors/test_supply_chain.py +232 -0
- bezoar-1.0.0a2/tests/unit/engine/test_cache_metamorphic.py +526 -0
- bezoar-1.0.0a2/tests/unit/engine/test_changed_since.py +61 -0
- bezoar-1.0.0a2/tests/unit/engine/test_dedupe.py +123 -0
- bezoar-1.0.0a2/tests/unit/engine/test_engine_edges.py +75 -0
- bezoar-1.0.0a2/tests/unit/engine/test_int_seams.py +270 -0
- bezoar-1.0.0a2/tests/unit/engine/test_p0_scan.py +30 -0
- bezoar-1.0.0a2/tests/unit/engine/test_pipeline.py +158 -0
- bezoar-1.0.0a2/tests/unit/engine/test_policy_boundary.py +141 -0
- bezoar-1.0.0a2/tests/unit/engine/test_policy_controls.py +345 -0
- bezoar-1.0.0a2/tests/unit/engine/test_rule_timeout_fold.py +106 -0
- bezoar-1.0.0a2/tests/unit/engine/test_session.py +78 -0
- bezoar-1.0.0a2/tests/unit/engine/test_to_dict.py +127 -0
- bezoar-1.0.0a2/tests/unit/engine/test_verdict.py +238 -0
- bezoar-1.0.0a2/tests/unit/eval/test_score.py +110 -0
- bezoar-1.0.0a2/tests/unit/harness/__init__.py +1 -0
- bezoar-1.0.0a2/tests/unit/harness/_gen_fixtures.py +507 -0
- bezoar-1.0.0a2/tests/unit/harness/helpers.py +112 -0
- bezoar-1.0.0a2/tests/unit/harness/test_context.py +24 -0
- bezoar-1.0.0a2/tests/unit/harness/test_corpus.py +79 -0
- bezoar-1.0.0a2/tests/unit/harness/test_detector.py +174 -0
- bezoar-1.0.0a2/tests/unit/harness/test_p0_fixture.py +31 -0
- bezoar-1.0.0a2/tests/unit/harness/test_perf.py +28 -0
- bezoar-1.0.0a2/tests/unit/harness/test_registry.py +19 -0
- bezoar-1.0.0a2/tests/unit/harness/test_vocab.py +102 -0
- bezoar-1.0.0a2/tests/unit/harness/test_wsk_corpus.py +43 -0
- bezoar-1.0.0a2/tests/unit/judge/conftest.py +9 -0
- bezoar-1.0.0a2/tests/unit/judge/factories.py +127 -0
- bezoar-1.0.0a2/tests/unit/judge/fakes.py +155 -0
- bezoar-1.0.0a2/tests/unit/judge/test_advisory.py +83 -0
- bezoar-1.0.0a2/tests/unit/judge/test_band_immunity.py +76 -0
- bezoar-1.0.0a2/tests/unit/judge/test_escalation.py +74 -0
- bezoar-1.0.0a2/tests/unit/judge/test_hook.py +52 -0
- bezoar-1.0.0a2/tests/unit/judge/test_judge_malformed.py +65 -0
- bezoar-1.0.0a2/tests/unit/judge/test_prompts.py +41 -0
- bezoar-1.0.0a2/tests/unit/judge/test_protocol.py +88 -0
- bezoar-1.0.0a2/tests/unit/judge/test_redaction.py +99 -0
- bezoar-1.0.0a2/tests/unit/mcp/conftest.py +179 -0
- bezoar-1.0.0a2/tests/unit/mcp/fixtures/fake_stdio_server.py +150 -0
- bezoar-1.0.0a2/tests/unit/mcp/mcp_helpers.py +44 -0
- bezoar-1.0.0a2/tests/unit/mcp/test_probe_flag.py +109 -0
- bezoar-1.0.0a2/tests/unit/mcp/test_probe_http.py +82 -0
- bezoar-1.0.0a2/tests/unit/mcp/test_probe_redirect.py +120 -0
- bezoar-1.0.0a2/tests/unit/mcp/test_probe_ssrf.py +239 -0
- bezoar-1.0.0a2/tests/unit/mcp/test_probe_stdio.py +98 -0
- bezoar-1.0.0a2/tests/unit/mcp/test_tool_poisoning.py +222 -0
- bezoar-1.0.0a2/tests/unit/parsing/test_bounded_read.py +117 -0
- bezoar-1.0.0a2/tests/unit/parsing/test_command_hooks.py +36 -0
- bezoar-1.0.0a2/tests/unit/parsing/test_mcp_redact.py +186 -0
- bezoar-1.0.0a2/tests/unit/perf/test_cache.py +273 -0
- bezoar-1.0.0a2/tests/unit/perf/test_incremental.py +149 -0
- bezoar-1.0.0a2/tests/unit/perf/test_no_cache.py +104 -0
- bezoar-1.0.0a2/tests/unit/perf/test_parallel.py +116 -0
- bezoar-1.0.0a2/tests/unit/policy/test_apply.py +455 -0
- bezoar-1.0.0a2/tests/unit/policy/test_discovery.py +118 -0
- bezoar-1.0.0a2/tests/unit/policy/test_explain.py +83 -0
- bezoar-1.0.0a2/tests/unit/policy/test_policy_schema.py +153 -0
- bezoar-1.0.0a2/tests/unit/policy/test_unenforced_controls.py +91 -0
- bezoar-1.0.0a2/tests/unit/reporting/conftest.py +121 -0
- bezoar-1.0.0a2/tests/unit/reporting/goldens/scan.json +226 -0
- bezoar-1.0.0a2/tests/unit/reporting/test_baseline.py +147 -0
- bezoar-1.0.0a2/tests/unit/reporting/test_identity.py +142 -0
- bezoar-1.0.0a2/tests/unit/reporting/test_json.py +91 -0
- bezoar-1.0.0a2/tests/unit/reporting/test_redact.py +479 -0
- bezoar-1.0.0a2/tests/unit/reporting/test_reporting_schema.py +105 -0
- bezoar-1.0.0a2/tests/unit/reporting/test_sarif.py +31 -0
- bezoar-1.0.0a2/tests/unit/reporting/test_text.py +28 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/01-readme.md +4 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/02-claude.md +5 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/03-agents.md +3 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/04-skill.md +7 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/05-package.json +5 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/06-pyproject.toml +4 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/07-config.yml +5 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/08-settings.json +4 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/09-script.sh +4 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/10-app.py +6 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/11-utils.ts +3 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/12-query.js +4 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/13-Makefile +5 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/14-Dockerfile +4 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/15-github-actions.yml +7 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/16-env-example +3 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/17-jwt-docs.md +4 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/18-security-notes.md +4 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/19-ignore-files.md +3 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/20-passwords-docs.md +4 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/21-curl-docs.md +3 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/22-webhook-docs.md +3 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/23-ssh-docs.md +3 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/24-review-checklist.md +5 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/25-CHANGELOG.md +4 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/26-LICENSE.md +3 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/27-CONTRIBUTING.md +3 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/28-skill.json +4 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/29-mcp.json +8 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/30-GEMINI.md +3 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/31-typescript.mdc +5 -0
- bezoar-1.0.0a2/tests/unit/rules/benign/32-test_helper.py +2 -0
- bezoar-1.0.0a2/tests/unit/rules/conftest.py +88 -0
- bezoar-1.0.0a2/tests/unit/rules/test_builtin_packs.py +11 -0
- bezoar-1.0.0a2/tests/unit/rules/test_compile.py +214 -0
- bezoar-1.0.0a2/tests/unit/rules/test_detector.py +244 -0
- bezoar-1.0.0a2/tests/unit/rules/test_external_and_exfil.py +39 -0
- bezoar-1.0.0a2/tests/unit/rules/test_fp_benign.py +52 -0
- bezoar-1.0.0a2/tests/unit/rules/test_lint.py +93 -0
- bezoar-1.0.0a2/tests/unit/rules/test_loader.py +57 -0
- bezoar-1.0.0a2/tests/unit/rules/test_prompt_injection.py +88 -0
- bezoar-1.0.0a2/tests/unit/rules/test_rules_corpus.py +76 -0
- bezoar-1.0.0a2/tests/unit/rules/test_rules_schema.py +128 -0
- bezoar-1.0.0a2/tests/unit/rules/test_secrets.py +68 -0
- bezoar-1.0.0a2/tests/unit/serve/conftest.py +85 -0
- bezoar-1.0.0a2/tests/unit/serve/data.py +43 -0
- bezoar-1.0.0a2/tests/unit/serve/http_client.py +69 -0
- bezoar-1.0.0a2/tests/unit/serve/openapi_check.py +197 -0
- bezoar-1.0.0a2/tests/unit/serve/test_atomicity.py +78 -0
- bezoar-1.0.0a2/tests/unit/serve/test_cli.py +39 -0
- bezoar-1.0.0a2/tests/unit/serve/test_contract.py +270 -0
- bezoar-1.0.0a2/tests/unit/serve/test_core_wiring.py +224 -0
- bezoar-1.0.0a2/tests/unit/serve/test_csp.py +75 -0
- bezoar-1.0.0a2/tests/unit/serve/test_file_redact.py +92 -0
- bezoar-1.0.0a2/tests/unit/serve/test_paths.py +51 -0
- bezoar-1.0.0a2/tests/unit/serve/test_scans.py +69 -0
- bezoar-1.0.0a2/tests/unit/serve/test_security.py +354 -0
- bezoar-1.0.0a2/tests/unit/serve/test_store_policy.py +63 -0
- bezoar-1.0.0a2/tests/unit/serve/test_token_sources.py +94 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.venv/
|
|
6
|
+
venv/
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
.mypy_cache/
|
|
10
|
+
.ruff_cache/
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
|
|
13
|
+
# bezoar runtime
|
|
14
|
+
.bezoar-cache/
|
|
15
|
+
.bezoar-baseline.json
|
|
16
|
+
*.sarif
|
|
17
|
+
|
|
18
|
+
# OS / editors
|
|
19
|
+
.DS_Store
|
|
20
|
+
.idea/
|
|
21
|
+
.vscode/
|
|
22
|
+
|
|
23
|
+
# Test fixtures: platform config dirs MUST be tracked even though editor
|
|
24
|
+
# gitignores (the .vscode/ above, and common global excludes like .cursor/)
|
|
25
|
+
# hide them — the corpus and adapter fixtures live inside these dirs.
|
|
26
|
+
!tests/**/.vscode/
|
|
27
|
+
!tests/**/.vscode/**
|
|
28
|
+
!tests/**/.cursor/
|
|
29
|
+
!tests/**/.cursor/**
|
|
30
|
+
!tests/**/node_modules/
|
|
31
|
+
!tests/**/node_modules/**
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.0.0a2] - 2026-09-05
|
|
11
|
+
|
|
12
|
+
Second alpha: security remediation wave, fully wired serve API, green
|
|
13
|
+
Windows CI, and a console design-system upgrade.
|
|
14
|
+
|
|
15
|
+
### Security
|
|
16
|
+
|
|
17
|
+
- Never cache partial scan outcomes: a rule timeout or detector error no
|
|
18
|
+
longer replays as a complete scan from a warm cache
|
|
19
|
+
- Rule-pack lint now rejects polynomial ReDoS shapes (adjacent-star,
|
|
20
|
+
complement-pair, and match-anything wrappers at every sequence level)
|
|
21
|
+
- Redaction covers JSON-quoted keys (`"password":"…"`), spaced assignments,
|
|
22
|
+
headers, Basic auth, and Slack webhook URLs — and no longer redacts
|
|
23
|
+
40-hex git SHAs
|
|
24
|
+
- `metadata.identity` and MCP config `Location.relpath` no longer leak
|
|
25
|
+
absolute host paths into default JSON reports
|
|
26
|
+
- `bezoar serve`: any-NUL path rejection (400), generic 500 bodies, 405s
|
|
27
|
+
with security headers, Host header guard on static files, serve token via
|
|
28
|
+
`BEZOAR_SERVE_TOKEN` / `--token-file`, and `X-Bezoar-Client` enforced on
|
|
29
|
+
all write methods
|
|
30
|
+
- MCP probe: cross-host redirects no longer leak Authorization; CGNAT and
|
|
31
|
+
NAT64 ranges blocked alongside RFC1918
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- `bezoar serve` API fully wired: policy validate, explain, baseline
|
|
36
|
+
read/write, and scan endpoints (schema-invalid `PUT /policy` → 422)
|
|
37
|
+
- Console: seed-derived 8-step token ramps via `color-mix(in oklch)` with a
|
|
38
|
+
parser test enforcing WCAG AA contrast in both themes
|
|
39
|
+
- Console: floating row actions (Open / Set series / Export / Delete) on the
|
|
40
|
+
reports table — keyboard reachable, axe-clean
|
|
41
|
+
- Console policy editor: YAML 1.1 boolean round-trip and raw-byte report
|
|
42
|
+
import
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- Windows: CRLF code-fence parsing crash in detectors, concurrent baseline
|
|
47
|
+
write `PermissionError` (retry with backoff), home-directory resolution in
|
|
48
|
+
tests (`USERPROFILE`), UTF-8 console output
|
|
49
|
+
- CI: `uv venv` everywhere (PEP 668), pytest `pythonpath` for bare `pytest`,
|
|
50
|
+
pinned pnpm via `pnpm/action-setup`, test-fixture directories re-included
|
|
51
|
+
from gitignore
|
|
52
|
+
- `--changed-since` handles non-ASCII filenames (NUL-delimited git diff) and
|
|
53
|
+
anchors at the git toplevel for subdirectory scans
|
|
54
|
+
|
|
55
|
+
## [1.0.0a1] - 2026-09-05
|
|
56
|
+
|
|
57
|
+
First public alpha of bezoar — an offline-first security scanner for the
|
|
58
|
+
AI-agent supply chain (skills, MCP servers, plugins, subagents, rules,
|
|
59
|
+
commands, hooks, CLI helpers, and agent configs).
|
|
60
|
+
|
|
61
|
+
### Added
|
|
62
|
+
|
|
63
|
+
#### Core
|
|
64
|
+
|
|
65
|
+
- Package `bezoar` `1.0.0a1` (Python 3.11+, hatchling src layout, runtime
|
|
66
|
+
dependency `pyyaml>=6.0`)
|
|
67
|
+
- Six platform adapters: Claude Code, Cursor, Codex CLI, Gemini CLI, GitHub
|
|
68
|
+
Copilot, and generic discovery
|
|
69
|
+
- Wheel ships `bezoar/data/rules/*.yml` + `MANIFEST.json`, seven
|
|
70
|
+
`bezoar/data/harness/*.yml` vocabularies, `bezoar/data/policy/default.yml`,
|
|
71
|
+
`bezoar/data/NOTICE`, and `bezoar/data/schemas/policy.v1.schema.json`
|
|
72
|
+
(required for an installed `bezoar scan`)
|
|
73
|
+
|
|
74
|
+
#### Detectors
|
|
75
|
+
|
|
76
|
+
- 136 declarative rule-pack rules in four builtin packs (`data/rules/`,
|
|
77
|
+
counted in `MANIFEST.json`): secrets 80, prompt_injection 36,
|
|
78
|
+
external_instructions 8, exfil_sinks 12
|
|
79
|
+
- Programmatic detectors: harness-envelope forgery (the differentiator —
|
|
80
|
+
data-driven vocabs + structural-sequence matchers), hidden behavior,
|
|
81
|
+
permissions, supply chain, data exfiltration, external instructions,
|
|
82
|
+
MCP tool-poisoning
|
|
83
|
+
- Flag-gated MCP live probe (`--probe-mcp`; INFO-only, cannot move a band)
|
|
84
|
+
- Advisory LLM judge (`--judge`; `NullProvider` via entry point
|
|
85
|
+
`bezoar.judge:null`; cannot move a band)
|
|
86
|
+
|
|
87
|
+
#### Policy and bands
|
|
88
|
+
|
|
89
|
+
- Band algebra (`safe` | `potential_risk` | `unsafe` | `malicious`) with
|
|
90
|
+
disposition caps and corroboration
|
|
91
|
+
- Policy engine (`.bezoar.yml` layered merge, builtin `data/policy/default.yml`)
|
|
92
|
+
mapping bands to decisions (`allow` | `allow_with_notice` | `alert` | `block`)
|
|
93
|
+
- Expiring exceptions, pins, baselines; band is a fact, decision is policy
|
|
94
|
+
|
|
95
|
+
#### CLI, reporters, schemas
|
|
96
|
+
|
|
97
|
+
- Console script `bezoar` (`scan`, `discover`, `rules lint`, `policy
|
|
98
|
+
validate|explain`, `baseline update|diff`, `cache stats|clear`, `serve`,
|
|
99
|
+
`version`)
|
|
100
|
+
- Scan flags include `--fail-on`, `--format text|json|sarif`, `--changed-since`,
|
|
101
|
+
`--config`, `--baseline`, `--jobs`, `--no-cache`, `--cache-dir`
|
|
102
|
+
- Three reporters: text, JSON (`schemas/scan-result.v1.schema.json`), SARIF 2.1.0
|
|
103
|
+
- Versioned schemas: `scan-result.v1`, `policy.v1`, `rulepack.v1`
|
|
104
|
+
|
|
105
|
+
#### Integrations
|
|
106
|
+
|
|
107
|
+
- Composite GitHub Action (`action.yml`): maps to the CLI flags above, always
|
|
108
|
+
writes `bezoar.sarif` from stdout, uploads via `github/codeql-action/upload-sarif`
|
|
109
|
+
when `upload-sarif` is true (including after a failed gate), then re-raises
|
|
110
|
+
the CLI exit code
|
|
111
|
+
- Extra `bezoar[console]` → `bezoar-console==1.0.0a1`
|
|
112
|
+
- Entry-point groups: `bezoar.detectors`, `bezoar.adapters`, `bezoar.reporters`,
|
|
113
|
+
`bezoar.judge` (`null = bezoar.judge:NullProvider`)
|
|
114
|
+
- Multi-stage `Dockerfile` (python:3.12-slim)
|
|
115
|
+
- CI matrix: CPython 3.11/3.12/3.13 × Ubuntu/macOS/Windows, plus
|
|
116
|
+
`python -m bezoar.rules.lint`
|
|
117
|
+
|
|
118
|
+
#### Web console
|
|
119
|
+
|
|
120
|
+
- Static report viewer (drag/drop `bezoar.scan/v1` JSON → IndexedDB)
|
|
121
|
+
- `bezoar serve` (stdlib server + `/api/v1`) when `bezoar-console` is installed
|
|
122
|
+
- See [docs/console.md](docs/console.md)
|
|
123
|
+
|
|
124
|
+
#### Evaluation and performance
|
|
125
|
+
|
|
126
|
+
- Bundled corpus `tests/corpus` + `scripts/eval/score.py`: detection rate
|
|
127
|
+
**1.0000** (41/41 malicious), finding-level FP rate **0.0000** (0/47 benign)
|
|
128
|
+
- Reference machine: 10,001-file / ~200 MiB synthetic
|
|
129
|
+
monorepo through `map_files` + file cache — **12.72 s** cold / **1.54 s**
|
|
130
|
+
warm (targets: < 60 s / < 5 s)
|
|
131
|
+
|
|
132
|
+
#### Supply-chain hygiene
|
|
133
|
+
|
|
134
|
+
- Reproducible `uv build` (`SOURCE_DATE_EPOCH`)
|
|
135
|
+
- Dual SBOMs: CycloneDX and SPDX
|
|
136
|
+
- Sigstore keyless signatures
|
|
137
|
+
- SLSA provenance (`actions/attest-build-provenance`)
|
|
138
|
+
- PyPI trusted publishing (OIDC, `pypi` environment — maintainer setup TODO)
|
|
139
|
+
|
|
140
|
+
[Unreleased]: https://github.com/IsmailKharoub/bezoar/compare/v1.0.0a1...HEAD
|
|
141
|
+
[1.0.0a1]: https://github.com/IsmailKharoub/bezoar/releases/tag/v1.0.0a1
|
bezoar-1.0.0a2/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
bezoar-1.0.0a2/NOTICE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
bezoar
|
|
2
|
+
Copyright 2026 the bezoar authors
|
|
3
|
+
|
|
4
|
+
This product is licensed under the Apache License, Version 2.0.
|
|
5
|
+
See the LICENSE file for the full license text.
|
|
6
|
+
|
|
7
|
+
Third-party pattern attributions for builtin rule packs (principally
|
|
8
|
+
gitleaks, MIT) are in src/bezoar/data/NOTICE, which is also installed
|
|
9
|
+
in the wheel as bezoar/data/NOTICE.
|
bezoar-1.0.0a2/PKG-INFO
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: bezoar
|
|
3
|
+
Version: 1.0.0a2
|
|
4
|
+
Summary: Open-source security scanner for the AI-agent supply chain — skills, MCPs, plugins, subagents
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
License-File: NOTICE
|
|
8
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
9
|
+
Classifier: Topic :: Security
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
|
+
Requires-Dist: pyyaml>=6.0
|
|
12
|
+
Provides-Extra: console
|
|
13
|
+
Requires-Dist: bezoar-console==1.0.0a2; extra == 'console'
|
|
14
|
+
Provides-Extra: dev
|
|
15
|
+
Requires-Dist: hypothesis; extra == 'dev'
|
|
16
|
+
Requires-Dist: jsonschema; extra == 'dev'
|
|
17
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
18
|
+
Requires-Dist: pytest-xdist; extra == 'dev'
|
|
19
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
20
|
+
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
21
|
+
Requires-Dist: types-pyyaml; extra == 'dev'
|
|
22
|
+
Provides-Extra: sbom
|
|
23
|
+
Requires-Dist: cyclonedx-bom; extra == 'sbom'
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# bezoar
|
|
27
|
+
|
|
28
|
+
**The open-source security scanner for the AI-agent supply chain** — skills, MCP servers,
|
|
29
|
+
plugins, subagents, and CLI add-ons across every major agent platform.
|
|
30
|
+
|
|
31
|
+
> *Bezoar: the legendary stone believed to neutralize any poison. This one neutralizes
|
|
32
|
+
> poisoned agent add-ons.*
|
|
33
|
+
|
|
34
|
+
`bezoar scan` audits an add-on before it enters your agent's context: static detectors,
|
|
35
|
+
four verdict **bands**, and a policy layer that turns those bands into **decisions**.
|
|
36
|
+
Think `npm audit` for agent add-ons — offline-first, deterministic, CI-friendly,
|
|
37
|
+
SARIF/JSON output.
|
|
38
|
+
|
|
39
|
+
[](LICENSE)
|
|
40
|
+
[](https://pypi.org/project/bezoar/)
|
|
41
|
+
[](https://github.com/IsmailKharoub/bezoar/actions/workflows/ci.yml)
|
|
42
|
+
[](docs/ci.md)
|
|
43
|
+
|
|
44
|
+
**1.0.0a2** ships the scanner, CLI, SARIF/JSON reporters, GitHub Action, and web
|
|
45
|
+
console. The commands below and the guides in `docs/` describe that shipped
|
|
46
|
+
surface.
|
|
47
|
+
|
|
48
|
+
## 60-second quickstart
|
|
49
|
+
|
|
50
|
+
Requires Python ≥ 3.11.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# From this checkout (works before PyPI)
|
|
54
|
+
uv tool install .
|
|
55
|
+
|
|
56
|
+
# After the 1.0.0a2 tag is published
|
|
57
|
+
# uv tool install bezoar==1.0.0a2
|
|
58
|
+
|
|
59
|
+
bezoar version
|
|
60
|
+
bezoar scan tests/corpus/benign/claude_code/skill-markdown-lint --fail-on unsafe
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Point `bezoar scan` at any skill directory or repo root. Flags: `--format
|
|
64
|
+
text|json|sarif` (reports go to stdout; there is no `--output`), `--fail-on`,
|
|
65
|
+
`--config`, `--changed-since`, `--baseline`. Exit `0` = gate passed, `1` =
|
|
66
|
+
band ≥ `--fail-on`, `2` usage, `3` incomplete, `4` internal.
|
|
67
|
+
|
|
68
|
+
See [Getting started](docs/getting-started.md) for reading findings.
|
|
69
|
+
|
|
70
|
+
### Illustrative text report
|
|
71
|
+
|
|
72
|
+
The live text reporter prints a band table, then per-component rows.
|
|
73
|
+
The excerpt below is the finding shape: `band` is a fact; `decision` is
|
|
74
|
+
policy; locations are raw `file:line:column`; rule ids use `<family>/<rule>`.
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
✗ band=malicious decision=block components=1 findings=4
|
|
78
|
+
|
|
79
|
+
generic:skill:pdf-optimizer@<hash12> malicious → block (band_default)
|
|
80
|
+
|
|
81
|
+
[critical] harness_forgery/control-tag-close SKILL.md:16:1 [hidden]
|
|
82
|
+
Close of a trusted harness wrapper — the breakout primitive
|
|
83
|
+
evidence: </system-reminder>
|
|
84
|
+
|
|
85
|
+
[ high] harness_forgery/control-tag-open SKILL.md:17:1 [hidden]
|
|
86
|
+
Open of a reminder-role control tag with an imperative body
|
|
87
|
+
evidence: <system-reminder priority="critical">
|
|
88
|
+
|
|
89
|
+
[ high] harness_forgery/prose-terminator SKILL.md:22:1 [hidden]
|
|
90
|
+
Prose-form function-end marker (semantic escape)
|
|
91
|
+
evidence: [Function results halted by user]
|
|
92
|
+
|
|
93
|
+
[critical] prompt_injection/instruction-override SKILL.md:27:1
|
|
94
|
+
Instruction-override language
|
|
95
|
+
evidence: Ignore all previous instructions
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`--format json` and `--format sarif` are the stable machine interfaces.
|
|
99
|
+
JSON/SARIF are byte-identical across runs (modulo `stats.duration_ms`).
|
|
100
|
+
|
|
101
|
+
## Bands and decisions
|
|
102
|
+
|
|
103
|
+
**Band is a fact about the component. Decision is what the org does.** No exception,
|
|
104
|
+
pin, baseline, or vendor trust rewrites a band.
|
|
105
|
+
|
|
106
|
+
| Band (fact) | Default decision (policy) |
|
|
107
|
+
|---|---|
|
|
108
|
+
| `safe` | `allow` |
|
|
109
|
+
| `potential_risk` | `allow_with_notice` |
|
|
110
|
+
| `unsafe` | `alert` |
|
|
111
|
+
| `malicious` | `block` |
|
|
112
|
+
|
|
113
|
+
Four bands, four decisions. The three enforcement outcomes people quote
|
|
114
|
+
(allow / alert / block) are the same table: `allow_with_notice` is the fourth decision —
|
|
115
|
+
allow, but surface the risk. Capability-only findings (permissions, unpinned-only
|
|
116
|
+
supply-chain, metadata) cap the band at `potential_risk` unless an intent-bearing
|
|
117
|
+
finding corroborates them. Details: [Policy](docs/policy.md).
|
|
118
|
+
|
|
119
|
+
## Why bezoar
|
|
120
|
+
|
|
121
|
+
Enterprises deploy coding agents with no seatbelt. Skills and MCPs are executable
|
|
122
|
+
supply-chain artifacts that load straight into an agent's context. Public scanners
|
|
123
|
+
catch generic jailbreak phrases and leaked keys; they miss the class that actually
|
|
124
|
+
steers the model — **harness-envelope forgery** (content impersonating the host
|
|
125
|
+
harness's own control syntax). bezoar maps findings to the
|
|
126
|
+
[OWASP Agentic Skills Top 10](https://owasp.org/www-project-agentic-skills-top-10/)
|
|
127
|
+
and adds that missing family. See [Harness-envelope forgery](docs/harness-forgery.md).
|
|
128
|
+
|
|
129
|
+
A default scan performs **no network requests** and **never executes** scanned
|
|
130
|
+
artifacts. Same inputs → same JSON/SARIF.
|
|
131
|
+
|
|
132
|
+
## Comparison
|
|
133
|
+
|
|
134
|
+
Public posture as of 2026-09. “Harness-envelope forgery” means a first-class,
|
|
135
|
+
per-platform vocabulary of harness control syntax plus structural-sequence
|
|
136
|
+
matchers — not generic “ignore previous instructions” or “system message”
|
|
137
|
+
regexes.
|
|
138
|
+
|
|
139
|
+
| | Offline | Deterministic | Harness-forgery detection | Policy-as-code | SARIF | Price |
|
|
140
|
+
|---|---|---|---|---|---|---|
|
|
141
|
+
| **bezoar** | Yes (default) | Yes | Yes | Yes (`.bezoar.yml`) | Yes | Apache-2.0 |
|
|
142
|
+
| [Snyk agent-scan](https://github.com/snyk/agent-scan) | No (`SNYK_TOKEN` + hosted analysis) | No | No | No (Snyk org / API) | No (JSON) | Free Snyk account required; commercial platform |
|
|
143
|
+
| [Cisco skill-scanner](https://github.com/cisco-ai-defense/skill-scanner) | Partial (patterns/YARA offline; LLM optional) | Partial (LLM judge optional) | No | Yes (YAML presets) | Yes | Apache-2.0 |
|
|
144
|
+
| [invariantlabs mcp-scan](https://github.com/invariantlabs-ai/mcp-scan) | No (Invariant API or OpenAI; connects to MCP servers) | No | No | Partial (proxy guardrails) | No | Apache-2.0 + cloud / OpenAI |
|
|
145
|
+
| [AIR](https://air.security) | No (inline firewall + cloud) | No | No | Yes (product policy) | Not documented | Commercial |
|
|
146
|
+
|
|
147
|
+
`invariantlabs-ai/mcp-scan` now redirects into Snyk agent-scan; the column reflects
|
|
148
|
+
the historical Invariant CLI that still appears in comparisons. AIR is the commercial
|
|
149
|
+
category reference — see [FAQ](docs/faq.md#how-does-bezoar-relate-to-air).
|
|
150
|
+
|
|
151
|
+
## Docs
|
|
152
|
+
|
|
153
|
+
| Doc | What it covers |
|
|
154
|
+
|---|---|
|
|
155
|
+
| [Getting started](docs/getting-started.md) | Install, first scan, reading findings, exit codes |
|
|
156
|
+
| [Policy](docs/policy.md) | `.bezoar.yml`, bands vs decisions, exceptions, vendor trust |
|
|
157
|
+
| [Rules authoring](docs/rules-authoring.md) | Rule-pack schema, severity / disposition / confidence, `bezoar rules lint` |
|
|
158
|
+
| [CI](docs/ci.md) | GitHub Action, baselines, SARIF → Code Scanning |
|
|
159
|
+
| [Web console](docs/console.md) | Static JSON viewer and `bezoar serve` |
|
|
160
|
+
| [Harness-envelope forgery](docs/harness-forgery.md) | The differentiator, per-platform vocabularies, tuning |
|
|
161
|
+
| [Platforms](docs/platforms.md) | Discovery matrix and per-platform limits |
|
|
162
|
+
| [FAQ](docs/faq.md) | Offline, determinism, LLM judge, AIR, license |
|
|
163
|
+
|
|
164
|
+
## Web console
|
|
165
|
+
|
|
166
|
+
The console **never computes security facts** — it renders `bezoar.scan/v1` JSON
|
|
167
|
+
from the CLI.
|
|
168
|
+
|
|
169
|
+
- **Viewer:** open the static export (`console/apps/web/out/index.html` or
|
|
170
|
+
`bezoar_console.dist_path()` after `pip install bezoar-console`). Drag-drop a
|
|
171
|
+
JSON report; it stays in IndexedDB. SARIF is rejected — re-scan with
|
|
172
|
+
`--format json`.
|
|
173
|
+
- **Serve:** `bezoar serve` (loopback + `/api/v1`). Needs the console extra:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
pip install 'bezoar[console]' # bezoar-console==1.0.0a2
|
|
177
|
+
bezoar serve
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Details: [docs/console.md](docs/console.md).
|
|
181
|
+
|
|
182
|
+
## GitHub Action
|
|
183
|
+
|
|
184
|
+
```yaml
|
|
185
|
+
# permissions: { contents: read, security-events: write }
|
|
186
|
+
- uses: IsmailKharoub/bezoar@v1.0.0a2
|
|
187
|
+
with:
|
|
188
|
+
path: .
|
|
189
|
+
fail-on: malicious
|
|
190
|
+
upload-sarif: true
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
The Action always writes `bezoar.sarif` from `bezoar scan --format sarif`
|
|
194
|
+
(stdout; the CLI has no `--output`), uploads it to Code Scanning when
|
|
195
|
+
`upload-sarif` is true — including after a failed gate — then re-raises the
|
|
196
|
+
CLI exit code.
|
|
197
|
+
|
|
198
|
+
## License
|
|
199
|
+
|
|
200
|
+
Apache-2.0. Rule-pack pattern attributions (gitleaks) are in [`NOTICE`](NOTICE)
|
|
201
|
+
and [`src/bezoar/data/NOTICE`](src/bezoar/data/NOTICE).
|