mcp-audit-scanner 0.1.0__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.
- mcp_audit_scanner-0.1.0/.coverage +0 -0
- mcp_audit_scanner-0.1.0/.github/PULL_REQUEST_TEMPLATE/rule-submission.md +28 -0
- mcp_audit_scanner-0.1.0/.github/dependabot.yml +25 -0
- mcp_audit_scanner-0.1.0/.github/workflows/ci.yml +85 -0
- mcp_audit_scanner-0.1.0/.github/workflows/codeql.yml +38 -0
- mcp_audit_scanner-0.1.0/.github/workflows/mcp-audit-example.yml +48 -0
- mcp_audit_scanner-0.1.0/.github/workflows/release.yml +133 -0
- mcp_audit_scanner-0.1.0/.gitignore +26 -0
- mcp_audit_scanner-0.1.0/.pre-commit-hooks.yaml +9 -0
- mcp_audit_scanner-0.1.0/.semgrepignore +13 -0
- mcp_audit_scanner-0.1.0/CHANGELOG.md +266 -0
- mcp_audit_scanner-0.1.0/CLAUDE.md +415 -0
- mcp_audit_scanner-0.1.0/CONTRIBUTING.md +203 -0
- mcp_audit_scanner-0.1.0/GAPS.md +447 -0
- mcp_audit_scanner-0.1.0/LICENSE +201 -0
- mcp_audit_scanner-0.1.0/PKG-INFO +449 -0
- mcp_audit_scanner-0.1.0/PRE-LAUNCH-REVIEW.md +174 -0
- mcp_audit_scanner-0.1.0/PROVENANCE.md +149 -0
- mcp_audit_scanner-0.1.0/README.md +400 -0
- mcp_audit_scanner-0.1.0/SECURITY.md +43 -0
- mcp_audit_scanner-0.1.0/action.yml +233 -0
- mcp_audit_scanner-0.1.0/build.py +101 -0
- mcp_audit_scanner-0.1.0/coverage.json +1 -0
- mcp_audit_scanner-0.1.0/cursor-prompt-manual-test.md +326 -0
- mcp_audit_scanner-0.1.0/demo/README.md +117 -0
- mcp_audit_scanner-0.1.0/demo/configs/claude_desktop_config.json +21 -0
- mcp_audit_scanner-0.1.0/demo/configs/cursor_mcp.json +24 -0
- mcp_audit_scanner-0.1.0/demo/configs/vscode_mcp.json +17 -0
- mcp_audit_scanner-0.1.0/demo/output/.gitkeep +0 -0
- mcp_audit_scanner-0.1.0/demo/run_demo.sh +80 -0
- mcp_audit_scanner-0.1.0/docs/README.md +22 -0
- mcp_audit_scanner-0.1.0/docs/baselines.md +203 -0
- mcp_audit_scanner-0.1.0/docs/contributing-rules.md +196 -0
- mcp_audit_scanner-0.1.0/docs/docs-usage.md +487 -0
- mcp_audit_scanner-0.1.0/docs/enterprise-deployment.md +456 -0
- mcp_audit_scanner-0.1.0/docs/extensions.md +242 -0
- mcp_audit_scanner-0.1.0/docs/fleet-scanning.md +277 -0
- mcp_audit_scanner-0.1.0/docs/github-action.md +356 -0
- mcp_audit_scanner-0.1.0/docs/governance.md +283 -0
- mcp_audit_scanner-0.1.0/docs/nucleus-integration.md +195 -0
- mcp_audit_scanner-0.1.0/docs/pre-commit.md +109 -0
- mcp_audit_scanner-0.1.0/docs/registry-contributions.md +65 -0
- mcp_audit_scanner-0.1.0/docs/registry.md +135 -0
- mcp_audit_scanner-0.1.0/docs/sast-rules.md +260 -0
- mcp_audit_scanner-0.1.0/docs/scoring.md +100 -0
- mcp_audit_scanner-0.1.0/docs/severity-framework.md +161 -0
- mcp_audit_scanner-0.1.0/docs/supply-chain.md +326 -0
- mcp_audit_scanner-0.1.0/docs/telemetry.md +41 -0
- mcp_audit_scanner-0.1.0/docs/writing-rules.md +431 -0
- mcp_audit_scanner-0.1.0/examples/github-actions/basic.yml +31 -0
- mcp_audit_scanner-0.1.0/examples/github-actions/strict.yml +32 -0
- mcp_audit_scanner-0.1.0/examples/github-actions/with-baseline.yml +52 -0
- mcp_audit_scanner-0.1.0/examples/policies/README.md +49 -0
- mcp_audit_scanner-0.1.0/examples/policies/enterprise.yml +82 -0
- mcp_audit_scanner-0.1.0/examples/policies/starter.yml +27 -0
- mcp_audit_scanner-0.1.0/examples/policies/strict.yml +60 -0
- mcp_audit_scanner-0.1.0/examples/pre-commit/basic.yaml +11 -0
- mcp_audit_scanner-0.1.0/examples/pre-commit/strict.yaml +12 -0
- mcp_audit_scanner-0.1.0/mcp-audit-darwin-arm64.spec +87 -0
- mcp_audit_scanner-0.1.0/mcp-audit-darwin-x86_64.spec +38 -0
- mcp_audit_scanner-0.1.0/mcp-audit-linux-x86_64.spec +87 -0
- mcp_audit_scanner-0.1.0/mcp-audit-windows-x86_64.spec +87 -0
- mcp_audit_scanner-0.1.0/pyproject.toml +119 -0
- mcp_audit_scanner-0.1.0/registry/known-extension-vulns.json +56 -0
- mcp_audit_scanner-0.1.0/registry/known-servers.json +1007 -0
- mcp_audit_scanner-0.1.0/rules/README.md +61 -0
- mcp_audit_scanner-0.1.0/rules/community/COMM-001.yml +17 -0
- mcp_audit_scanner-0.1.0/rules/community/COMM-002.yml +17 -0
- mcp_audit_scanner-0.1.0/rules/community/COMM-003.yml +17 -0
- mcp_audit_scanner-0.1.0/rules/community/COMM-004.yml +25 -0
- mcp_audit_scanner-0.1.0/rules/community/COMM-005.yml +16 -0
- mcp_audit_scanner-0.1.0/rules/community/COMM-006.yml +16 -0
- mcp_audit_scanner-0.1.0/rules/community/COMM-007.yml +16 -0
- mcp_audit_scanner-0.1.0/rules/community/COMM-008.yml +17 -0
- mcp_audit_scanner-0.1.0/rules/community/COMM-009.yml +18 -0
- mcp_audit_scanner-0.1.0/rules/community/COMM-010.yml +17 -0
- mcp_audit_scanner-0.1.0/rules/community/COMM-011.yml +17 -0
- mcp_audit_scanner-0.1.0/rules/community/COMM-012.yml +17 -0
- mcp_audit_scanner-0.1.0/scripts/build-linux.sh +91 -0
- mcp_audit_scanner-0.1.0/scripts/enrich_registry.py +111 -0
- mcp_audit_scanner-0.1.0/scripts/generate_license.py +282 -0
- mcp_audit_scanner-0.1.0/scripts/install.sh +24 -0
- mcp_audit_scanner-0.1.0/scripts/smoke_test.py +195 -0
- mcp_audit_scanner-0.1.0/scripts/update_test_count.py +125 -0
- mcp_audit_scanner-0.1.0/scripts/validate_nucleus.py +303 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/.semgrepignore +7 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/README.md +142 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/credentials/mcp-credentials-in-args.yml +28 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/credentials/mcp-hardcoded-secrets.yml +43 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/credentials/mcp-secrets-logged.yml +58 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/injection/mcp-eval-injection.yml +28 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/injection/mcp-path-traversal.yml +63 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/injection/mcp-sql-injection.yml +45 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/injection/mcp-ssrf.yml +72 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/injection/mcp-subprocess-injection.yml +68 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/poisoning/mcp-description-exfiltration-url.yml +25 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/poisoning/mcp-description-hidden-instructions.yml +73 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/poisoning/mcp-description-obfuscated-content.yml +42 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/protocol/mcp-missing-input-validation.yml +34 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/protocol/mcp-stack-trace-exposure.yml +54 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/transport/mcp-http-no-tls.yml +47 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/python/transport/mcp-listen-all-interfaces.yml +41 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/tests/python/clean/safe_server.py +89 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/tests/python/vulnerable/credentials_examples.py +64 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/tests/python/vulnerable/injection_examples.py +100 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/tests/python/vulnerable/poisoning_examples.py +31 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/tests/typescript/clean/safe_server.ts +57 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/tests/typescript/vulnerable/credentials_examples.ts +16 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/tests/typescript/vulnerable/injection_examples.ts +71 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/typescript/credentials/mcp-hardcoded-secrets.yml +50 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/typescript/injection/mcp-child-process-injection.yml +46 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/typescript/injection/mcp-eval-injection.yml +20 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/typescript/poisoning/mcp-description-hidden-instructions.yml +59 -0
- mcp_audit_scanner-0.1.0/semgrep-rules/typescript/transport/mcp-http-no-tls.yml +18 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/__init__.py +8 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/_gate.py +26 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/_license_cache.py +34 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/_network.py +65 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/_paths.py +102 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/analyzers/__init__.py +0 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/analyzers/attack_paths.py +459 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/analyzers/base.py +61 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/analyzers/credentials.py +98 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/analyzers/poisoning.py +358 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/analyzers/rug_pull.py +389 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/analyzers/supply_chain.py +198 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/analyzers/toxic_flow.py +539 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/analyzers/transport.py +234 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/attestation/__init__.py +1 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/attestation/hasher.py +203 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/attestation/sigstore_client.py +370 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/attestation/sigstore_findings.py +247 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/attestation/verifier.py +258 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/baselines/__init__.py +1 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/baselines/manager.py +503 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/__init__.py +129 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/__main__.py +6 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/_helpers.py +15 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/baseline.py +238 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/dashboard.py +106 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/extensions.py +163 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/fleet.py +218 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/license.py +89 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/policy.py +266 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/push_nucleus.py +363 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/registry.py +316 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/rules.py +236 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/sast.py +114 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/sbom.py +140 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/cli/scan.py +1095 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/config_parser.py +83 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/data/d3.v7.min.js +2 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/data/known_npm_packages.yaml +57 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/data/revoked.json +6 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/discovery.py +207 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/extensions/__init__.py +1 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/extensions/analyzer.py +546 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/extensions/discovery.py +181 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/extensions/models.py +41 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/fleet/__init__.py +1 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/fleet/merger.py +463 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/governance/__init__.py +6 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/governance/evaluator.py +716 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/governance/loader.py +148 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/governance/models.py +105 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/licensing.py +386 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/mcp_client.py +272 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/models.py +239 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/output/__init__.py +0 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/output/base.py +22 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/output/cyclonedx.py +101 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/output/dashboard.py +1101 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/output/nucleus.py +109 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/output/sarif.py +266 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/output/terminal.py +254 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/registry/__init__.py +1 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/registry/loader.py +328 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/rules/__init__.py +1 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/rules/engine.py +541 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/sast/__init__.py +0 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/sast/bundler.py +39 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/sast/runner.py +265 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/scanner.py +479 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/scoring.py +151 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/vulnerability/__init__.py +1 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/vulnerability/depsdev.py +84 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/vulnerability/models.py +36 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/vulnerability/osv.py +140 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/vulnerability/resolver.py +133 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/vulnerability/scanner.py +149 -0
- mcp_audit_scanner-0.1.0/src/mcp_audit/watcher.py +254 -0
- mcp_audit_scanner-0.1.0/tests/__init__.py +0 -0
- mcp_audit_scanner-0.1.0/tests/conftest.py +35 -0
- mcp_audit_scanner-0.1.0/tests/fixtures/clean_with_credential.json +16 -0
- mcp_audit_scanner-0.1.0/tests/fixtures/exploits/behavioral_override_stealth.json +15 -0
- mcp_audit_scanner-0.1.0/tests/fixtures/exploits/cloud_credential_exfiltration.json +15 -0
- mcp_audit_scanner-0.1.0/tests/fixtures/exploits/crowdstrike_add_numbers.json +15 -0
- mcp_audit_scanner-0.1.0/tests/fixtures/exploits/fake_postmark_exfiltration.json +17 -0
- mcp_audit_scanner-0.1.0/tests/fixtures/exploits/invariant_labs_ssh_exfiltration.json +15 -0
- mcp_audit_scanner-0.1.0/tests/fixtures/exploits/xml_injection_override.json +15 -0
- mcp_audit_scanner-0.1.0/tests/fixtures/malicious_config.json +20 -0
- mcp_audit_scanner-0.1.0/tests/fixtures/real_servers/community_mcp_servers.json +69 -0
- mcp_audit_scanner-0.1.0/tests/fixtures/real_servers/official_mcp_servers.json +69 -0
- mcp_audit_scanner-0.1.0/tests/fixtures/sarif-schema-2.1.0.json +3045 -0
- mcp_audit_scanner-0.1.0/tests/fixtures/smoke_test_config.json +27 -0
- mcp_audit_scanner-0.1.0/tests/test_analyzers.py +636 -0
- mcp_audit_scanner-0.1.0/tests/test_attack_paths.py +465 -0
- mcp_audit_scanner-0.1.0/tests/test_attestation.py +550 -0
- mcp_audit_scanner-0.1.0/tests/test_base_analyzer.py +105 -0
- mcp_audit_scanner-0.1.0/tests/test_baselines.py +860 -0
- mcp_audit_scanner-0.1.0/tests/test_build.py +94 -0
- mcp_audit_scanner-0.1.0/tests/test_dashboard.py +722 -0
- mcp_audit_scanner-0.1.0/tests/test_dashboard_compat.py +206 -0
- mcp_audit_scanner-0.1.0/tests/test_dashboard_xss.py +62 -0
- mcp_audit_scanner-0.1.0/tests/test_discovery.py +256 -0
- mcp_audit_scanner-0.1.0/tests/test_exploit_validation.py +302 -0
- mcp_audit_scanner-0.1.0/tests/test_extensions.py +655 -0
- mcp_audit_scanner-0.1.0/tests/test_false_positive_benchmark.py +232 -0
- mcp_audit_scanner-0.1.0/tests/test_fleet.py +692 -0
- mcp_audit_scanner-0.1.0/tests/test_gate.py +48 -0
- mcp_audit_scanner-0.1.0/tests/test_github_action.py +385 -0
- mcp_audit_scanner-0.1.0/tests/test_governance.py +676 -0
- mcp_audit_scanner-0.1.0/tests/test_license_cache.py +84 -0
- mcp_audit_scanner-0.1.0/tests/test_licensing.py +549 -0
- mcp_audit_scanner-0.1.0/tests/test_licensing_revocation.py +296 -0
- mcp_audit_scanner-0.1.0/tests/test_machine_info.py +374 -0
- mcp_audit_scanner-0.1.0/tests/test_mcp_client.py +618 -0
- mcp_audit_scanner-0.1.0/tests/test_network_policy.py +67 -0
- mcp_audit_scanner-0.1.0/tests/test_nucleus_output.py +305 -0
- mcp_audit_scanner-0.1.0/tests/test_pre_commit.py +329 -0
- mcp_audit_scanner-0.1.0/tests/test_push_nucleus.py +418 -0
- mcp_audit_scanner-0.1.0/tests/test_registry.py +766 -0
- mcp_audit_scanner-0.1.0/tests/test_rug_pull.py +552 -0
- mcp_audit_scanner-0.1.0/tests/test_rules.py +1095 -0
- mcp_audit_scanner-0.1.0/tests/test_sarif_output.py +602 -0
- mcp_audit_scanner-0.1.0/tests/test_sarif_schema.py +228 -0
- mcp_audit_scanner-0.1.0/tests/test_sast.py +512 -0
- mcp_audit_scanner-0.1.0/tests/test_sast_bundler.py +276 -0
- mcp_audit_scanner-0.1.0/tests/test_scanner.py +1724 -0
- mcp_audit_scanner-0.1.0/tests/test_scoring.py +348 -0
- mcp_audit_scanner-0.1.0/tests/test_sigstore_client.py +146 -0
- mcp_audit_scanner-0.1.0/tests/test_sigstore_findings.py +166 -0
- mcp_audit_scanner-0.1.0/tests/test_smoke_fixture.py +44 -0
- mcp_audit_scanner-0.1.0/tests/test_supply_chain.py +329 -0
- mcp_audit_scanner-0.1.0/tests/test_terminal_output.py +129 -0
- mcp_audit_scanner-0.1.0/tests/test_toxic_flow.py +738 -0
- mcp_audit_scanner-0.1.0/tests/test_version_consistency.py +50 -0
- mcp_audit_scanner-0.1.0/tests/test_vulnerability/__init__.py +0 -0
- mcp_audit_scanner-0.1.0/tests/test_vulnerability/test_osv.py +146 -0
- mcp_audit_scanner-0.1.0/tests/test_vulnerability/test_resolver.py +81 -0
- mcp_audit_scanner-0.1.0/tests/test_watcher.py +480 -0
- mcp_audit_scanner-0.1.0/uv.lock +2051 -0
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Community Rule Submission
|
|
3
|
+
about: Submit a new detection rule to the mcp-audit community ruleset
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Rule submission checklist
|
|
7
|
+
|
|
8
|
+
- [ ] Rule ID follows the `COMM-NNN` format and does not conflict with an
|
|
9
|
+
existing rule in `rules/community/`
|
|
10
|
+
- [ ] Rule file is named `{RULE-ID}.yml` and placed in `rules/community/`
|
|
11
|
+
- [ ] Rule passes `mcp-audit rule validate rules/community/{RULE-ID}.yml`
|
|
12
|
+
with no errors
|
|
13
|
+
- [ ] Rule has been tested with `mcp-audit rule test` against at least one
|
|
14
|
+
real MCP config
|
|
15
|
+
- [ ] Severity is justified in the PR description (why high vs medium vs low)
|
|
16
|
+
- [ ] Tags are drawn from existing tag vocabulary where possible
|
|
17
|
+
- [ ] Rule does not duplicate an existing community rule
|
|
18
|
+
- [ ] Description explains what attacker behavior or misconfiguration this
|
|
19
|
+
detects and why it matters
|
|
20
|
+
|
|
21
|
+
## Rule summary
|
|
22
|
+
|
|
23
|
+
**Rule ID:** COMM-NNN
|
|
24
|
+
**Name:**
|
|
25
|
+
**Severity:**
|
|
26
|
+
**What it detects:**
|
|
27
|
+
**Why it matters:**
|
|
28
|
+
**Tested against:** (describe the config you tested it on)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Python dependencies (pip/uv)
|
|
4
|
+
- package-ecosystem: pip
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: weekly
|
|
8
|
+
day: monday
|
|
9
|
+
open-pull-requests-limit: 5
|
|
10
|
+
labels:
|
|
11
|
+
- dependencies
|
|
12
|
+
ignore:
|
|
13
|
+
# sigstore has breaking changes between minors — pin manually
|
|
14
|
+
- dependency-name: sigstore
|
|
15
|
+
update-types: ["version-update:semver-minor", "version-update:semver-major"]
|
|
16
|
+
|
|
17
|
+
# GitHub Actions
|
|
18
|
+
- package-ecosystem: github-actions
|
|
19
|
+
directory: "/"
|
|
20
|
+
schedule:
|
|
21
|
+
interval: weekly
|
|
22
|
+
day: monday
|
|
23
|
+
open-pull-requests-limit: 5
|
|
24
|
+
labels:
|
|
25
|
+
- dependencies
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
name: Test (${{ matrix.os }}, ${{ matrix.python-version }})
|
|
10
|
+
runs-on: ${{ matrix.os }}
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
15
|
+
python-version: ["3.11", "3.12"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install uv
|
|
26
|
+
run: pip install uv
|
|
27
|
+
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: uv pip install -e ".[dev]" --system
|
|
30
|
+
|
|
31
|
+
- name: Install Playwright browsers
|
|
32
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
|
|
33
|
+
run: |
|
|
34
|
+
uv pip install playwright --system
|
|
35
|
+
python -m playwright install chromium firefox webkit
|
|
36
|
+
python -m playwright install-deps
|
|
37
|
+
|
|
38
|
+
- name: Run tests
|
|
39
|
+
run: pytest tests/ -x -q
|
|
40
|
+
|
|
41
|
+
- name: Ruff check
|
|
42
|
+
run: ruff check src/ tests/
|
|
43
|
+
|
|
44
|
+
- name: Ruff format check
|
|
45
|
+
run: ruff format --check src/ tests/
|
|
46
|
+
|
|
47
|
+
- name: Verify test-count docs in sync
|
|
48
|
+
# Runs on a single matrix leg — collected test count is identical
|
|
49
|
+
# across OS / Python versions, so repeating the check is redundant.
|
|
50
|
+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
|
|
51
|
+
run: python scripts/update_test_count.py --check
|
|
52
|
+
|
|
53
|
+
binary-smoke:
|
|
54
|
+
name: Binary smoke test (ubuntu)
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
# Only run on PRs and pushes to main — skip for every branch push
|
|
57
|
+
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
|
|
58
|
+
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v4
|
|
61
|
+
|
|
62
|
+
- name: Install uv
|
|
63
|
+
run: pip install uv
|
|
64
|
+
|
|
65
|
+
- name: Install dependencies
|
|
66
|
+
run: uv pip install -e ".[dev]" --system
|
|
67
|
+
|
|
68
|
+
- name: Install PyInstaller
|
|
69
|
+
run: uv pip install pyinstaller --system
|
|
70
|
+
|
|
71
|
+
- name: Build Linux binary
|
|
72
|
+
run: uv run pyinstaller mcp-audit-linux-x86_64.spec --distpath dist/
|
|
73
|
+
|
|
74
|
+
- name: Run smoke test
|
|
75
|
+
run: python scripts/smoke_test.py dist/mcp-audit-linux-x86_64
|
|
76
|
+
|
|
77
|
+
- name: Check binary size
|
|
78
|
+
run: |
|
|
79
|
+
SIZE_BYTES=$(wc -c < dist/mcp-audit-linux-x86_64 | tr -d ' ')
|
|
80
|
+
SIZE_MB=$(echo "scale=1; $SIZE_BYTES / 1048576" | bc)
|
|
81
|
+
echo "Linux binary: ${SIZE_MB} MB"
|
|
82
|
+
if [ "$SIZE_BYTES" -gt 36700160 ]; then
|
|
83
|
+
echo "ERROR: binary exceeds 35 MB hard limit" >&2
|
|
84
|
+
exit 1
|
|
85
|
+
fi
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: CodeQL
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
schedule:
|
|
9
|
+
# Weekly full scan — Mondays at 08:00 UTC
|
|
10
|
+
- cron: "0 8 * * 1"
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
analyze:
|
|
14
|
+
name: Analyze (Python)
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
actions: read
|
|
18
|
+
contents: read
|
|
19
|
+
security-events: write
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Initialize CodeQL
|
|
26
|
+
uses: github/codeql-action/init@v3
|
|
27
|
+
with:
|
|
28
|
+
languages: python
|
|
29
|
+
# Use the security-extended query suite for broader coverage
|
|
30
|
+
queries: security-extended
|
|
31
|
+
|
|
32
|
+
- name: Autobuild
|
|
33
|
+
uses: github/codeql-action/autobuild@v3
|
|
34
|
+
|
|
35
|
+
- name: Perform CodeQL Analysis
|
|
36
|
+
uses: github/codeql-action/analyze@v3
|
|
37
|
+
with:
|
|
38
|
+
category: "/language:python"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: MCP Security Scan
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
security-events: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
mcp-audit:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
permissions:
|
|
17
|
+
security-events: write
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
|
|
23
|
+
- name: Run mcp-audit
|
|
24
|
+
uses: adudley78/mcp-audit@main
|
|
25
|
+
with:
|
|
26
|
+
severity-threshold: high
|
|
27
|
+
upload-sarif: 'true'
|
|
28
|
+
|
|
29
|
+
# Pro feature — uncomment if you have an mcp-audit Pro license and Semgrep installed.
|
|
30
|
+
# mcp-audit-sast:
|
|
31
|
+
# runs-on: ubuntu-latest
|
|
32
|
+
# permissions:
|
|
33
|
+
# security-events: write
|
|
34
|
+
# contents: read
|
|
35
|
+
#
|
|
36
|
+
# steps:
|
|
37
|
+
# - uses: actions/checkout@v4
|
|
38
|
+
#
|
|
39
|
+
# - name: Install Semgrep
|
|
40
|
+
# run: pip install semgrep
|
|
41
|
+
#
|
|
42
|
+
# - name: Run mcp-audit with SAST
|
|
43
|
+
# uses: adudley78/mcp-audit@main
|
|
44
|
+
# with:
|
|
45
|
+
# sast: 'true'
|
|
46
|
+
# sast-path: 'src/'
|
|
47
|
+
# severity-threshold: medium
|
|
48
|
+
# upload-sarif: 'true'
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
name: Build ${{ matrix.target }}
|
|
14
|
+
runs-on: ${{ matrix.os }}
|
|
15
|
+
strategy:
|
|
16
|
+
fail-fast: false
|
|
17
|
+
matrix:
|
|
18
|
+
include:
|
|
19
|
+
- os: macos-13
|
|
20
|
+
target: darwin-x86_64
|
|
21
|
+
spec: mcp-audit-darwin-x86_64.spec
|
|
22
|
+
binary: mcp-audit-darwin-x86_64
|
|
23
|
+
- os: macos-latest
|
|
24
|
+
target: darwin-arm64
|
|
25
|
+
spec: mcp-audit-darwin-arm64.spec
|
|
26
|
+
binary: mcp-audit-darwin-arm64
|
|
27
|
+
- os: ubuntu-latest
|
|
28
|
+
target: linux-x86_64
|
|
29
|
+
spec: mcp-audit-linux-x86_64.spec
|
|
30
|
+
binary: mcp-audit-linux-x86_64
|
|
31
|
+
- os: windows-latest
|
|
32
|
+
target: windows-x86_64
|
|
33
|
+
spec: mcp-audit-windows-x86_64.spec
|
|
34
|
+
binary: mcp-audit-windows-x86_64.exe
|
|
35
|
+
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v4
|
|
38
|
+
|
|
39
|
+
- name: Install uv
|
|
40
|
+
uses: astral-sh/setup-uv@v4
|
|
41
|
+
with:
|
|
42
|
+
version: "latest"
|
|
43
|
+
|
|
44
|
+
- name: Set up Python
|
|
45
|
+
run: uv python install 3.11
|
|
46
|
+
|
|
47
|
+
- name: Install dependencies
|
|
48
|
+
run: uv sync --all-extras
|
|
49
|
+
|
|
50
|
+
- name: Install PyInstaller
|
|
51
|
+
run: uv pip install pyinstaller
|
|
52
|
+
|
|
53
|
+
- name: Build binary
|
|
54
|
+
run: uv run pyinstaller ${{ matrix.spec }} --distpath dist/
|
|
55
|
+
|
|
56
|
+
- name: Smoke test — version
|
|
57
|
+
run: dist/${{ matrix.binary }} version
|
|
58
|
+
shell: bash
|
|
59
|
+
|
|
60
|
+
- name: Smoke test — full end-to-end
|
|
61
|
+
run: python scripts/smoke_test.py dist/${{ matrix.binary }}
|
|
62
|
+
shell: bash
|
|
63
|
+
|
|
64
|
+
- name: Binary size check
|
|
65
|
+
shell: bash
|
|
66
|
+
run: |
|
|
67
|
+
BINARY="dist/${{ matrix.binary }}"
|
|
68
|
+
SIZE_BYTES=$(wc -c < "$BINARY" | tr -d ' ')
|
|
69
|
+
SIZE_MB=$(echo "scale=1; $SIZE_BYTES / 1048576" | bc)
|
|
70
|
+
echo "Binary size: ${SIZE_MB} MB (${SIZE_BYTES} bytes)"
|
|
71
|
+
# Warn at 25 MB, fail at 35 MB. Sigstore added ~3-4 MB from the 20 MB baseline.
|
|
72
|
+
# Adjust these thresholds after the first post-sigstore rebuild.
|
|
73
|
+
if [ "$SIZE_BYTES" -gt 36700160 ]; then # 35 MB
|
|
74
|
+
echo "ERROR: binary exceeds 35 MB hard limit (${SIZE_MB} MB)" >&2
|
|
75
|
+
exit 1
|
|
76
|
+
elif [ "$SIZE_BYTES" -gt 26214400 ]; then # 25 MB
|
|
77
|
+
echo "WARNING: binary exceeds 25 MB soft limit (${SIZE_MB} MB)"
|
|
78
|
+
else
|
|
79
|
+
echo "OK: binary is within size target"
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
- name: Upload artifact
|
|
83
|
+
uses: actions/upload-artifact@v4
|
|
84
|
+
with:
|
|
85
|
+
name: ${{ matrix.target }}
|
|
86
|
+
path: dist/${{ matrix.binary }}
|
|
87
|
+
if-no-files-found: error
|
|
88
|
+
|
|
89
|
+
release:
|
|
90
|
+
name: Create GitHub Release
|
|
91
|
+
needs: build
|
|
92
|
+
runs-on: ubuntu-latest
|
|
93
|
+
|
|
94
|
+
steps:
|
|
95
|
+
- uses: actions/checkout@v4
|
|
96
|
+
|
|
97
|
+
- name: Download all artifacts
|
|
98
|
+
uses: actions/download-artifact@v4
|
|
99
|
+
with:
|
|
100
|
+
path: dist/
|
|
101
|
+
|
|
102
|
+
- name: Create release and upload binaries
|
|
103
|
+
uses: softprops/action-gh-release@v2
|
|
104
|
+
with:
|
|
105
|
+
files: dist/**/*
|
|
106
|
+
generate_release_notes: true
|
|
107
|
+
|
|
108
|
+
report:
|
|
109
|
+
name: Release Summary
|
|
110
|
+
needs: [build, release]
|
|
111
|
+
runs-on: ubuntu-latest
|
|
112
|
+
if: always()
|
|
113
|
+
|
|
114
|
+
steps:
|
|
115
|
+
- name: Download all artifacts
|
|
116
|
+
uses: actions/download-artifact@v4
|
|
117
|
+
with:
|
|
118
|
+
path: dist/
|
|
119
|
+
|
|
120
|
+
- name: Post binary size summary
|
|
121
|
+
run: |
|
|
122
|
+
echo "## Binary sizes" >> $GITHUB_STEP_SUMMARY
|
|
123
|
+
echo "" >> $GITHUB_STEP_SUMMARY
|
|
124
|
+
echo "| Binary | Size |" >> $GITHUB_STEP_SUMMARY
|
|
125
|
+
echo "|--------|------|" >> $GITHUB_STEP_SUMMARY
|
|
126
|
+
for f in dist/**/*; do
|
|
127
|
+
if [ -f "$f" ]; then
|
|
128
|
+
SIZE=$(du -sh "$f" | cut -f1)
|
|
129
|
+
NAME=$(basename "$f")
|
|
130
|
+
echo "| $NAME | $SIZE |" >> $GITHUB_STEP_SUMMARY
|
|
131
|
+
fi
|
|
132
|
+
done
|
|
133
|
+
shell: bash
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*.egg-info/
|
|
4
|
+
dist/
|
|
5
|
+
build/
|
|
6
|
+
.eggs/
|
|
7
|
+
*.egg
|
|
8
|
+
.venv/
|
|
9
|
+
venv/
|
|
10
|
+
.mypy_cache/
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.ruff_cache/
|
|
13
|
+
*.so
|
|
14
|
+
.DS_Store
|
|
15
|
+
Thumbs.db
|
|
16
|
+
|
|
17
|
+
# Secrets and credentials
|
|
18
|
+
.env
|
|
19
|
+
.env.*
|
|
20
|
+
*.key
|
|
21
|
+
*.pem
|
|
22
|
+
|
|
23
|
+
# PyInstaller build artifacts (spec files are source — do not ignore *.spec)
|
|
24
|
+
# Demo output files (generated by demo/run_demo.sh)
|
|
25
|
+
demo/output/*.json
|
|
26
|
+
demo/output/*.sarif
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
- id: mcp-audit
|
|
2
|
+
name: mcp-audit MCP Security Scanner
|
|
3
|
+
description: Scan MCP server configuration files for security vulnerabilities
|
|
4
|
+
language: python
|
|
5
|
+
entry: mcp-audit
|
|
6
|
+
args: [scan, --severity-threshold, high]
|
|
7
|
+
types: [json]
|
|
8
|
+
pass_filenames: false
|
|
9
|
+
always_run: false
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Root .semgrepignore — overrides Semgrep's built-in defaults.
|
|
2
|
+
# Intentionally does NOT exclude tests/ so that semgrep-rules/tests/
|
|
3
|
+
# fixtures are scannable.
|
|
4
|
+
|
|
5
|
+
node_modules/
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.min.js
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
venv/
|
|
11
|
+
.venv/
|
|
12
|
+
.git/
|
|
13
|
+
*.pyc
|