agent-audit-kit 0.2.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.
Files changed (120) hide show
  1. agent_audit_kit-0.2.0/.agent-audit-kit.yml +22 -0
  2. agent_audit_kit-0.2.0/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
  3. agent_audit_kit-0.2.0/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  4. agent_audit_kit-0.2.0/.github/PULL_REQUEST_TEMPLATE.md +22 -0
  5. agent_audit_kit-0.2.0/.github/dependabot.yml +19 -0
  6. agent_audit_kit-0.2.0/.github/workflows/ci.yml +51 -0
  7. agent_audit_kit-0.2.0/.github/workflows/codeql.yml +40 -0
  8. agent_audit_kit-0.2.0/.github/workflows/release.yml +147 -0
  9. agent_audit_kit-0.2.0/.github/workflows/scorecard.yml +36 -0
  10. agent_audit_kit-0.2.0/.gitignore +43 -0
  11. agent_audit_kit-0.2.0/.pre-commit-hooks.yaml +10 -0
  12. agent_audit_kit-0.2.0/CHANGELOG.md +28 -0
  13. agent_audit_kit-0.2.0/CODE_OF_CONDUCT.md +54 -0
  14. agent_audit_kit-0.2.0/CONTRIBUTING.md +99 -0
  15. agent_audit_kit-0.2.0/Dockerfile +21 -0
  16. agent_audit_kit-0.2.0/LICENSE +21 -0
  17. agent_audit_kit-0.2.0/PKG-INFO +354 -0
  18. agent_audit_kit-0.2.0/README.md +321 -0
  19. agent_audit_kit-0.2.0/SECURITY.md +55 -0
  20. agent_audit_kit-0.2.0/action.yml +76 -0
  21. agent_audit_kit-0.2.0/agent_audit_kit/__init__.py +4 -0
  22. agent_audit_kit-0.2.0/agent_audit_kit/cli.py +511 -0
  23. agent_audit_kit-0.2.0/agent_audit_kit/data/vuln_db.json +24 -0
  24. agent_audit_kit-0.2.0/agent_audit_kit/diff.py +69 -0
  25. agent_audit_kit-0.2.0/agent_audit_kit/discovery.py +146 -0
  26. agent_audit_kit-0.2.0/agent_audit_kit/engine.py +138 -0
  27. agent_audit_kit-0.2.0/agent_audit_kit/fix.py +195 -0
  28. agent_audit_kit-0.2.0/agent_audit_kit/llm_scan.py +92 -0
  29. agent_audit_kit-0.2.0/agent_audit_kit/models.py +109 -0
  30. agent_audit_kit-0.2.0/agent_audit_kit/output/__init__.py +1 -0
  31. agent_audit_kit-0.2.0/agent_audit_kit/output/compliance.py +114 -0
  32. agent_audit_kit-0.2.0/agent_audit_kit/output/console.py +116 -0
  33. agent_audit_kit-0.2.0/agent_audit_kit/output/json_report.py +48 -0
  34. agent_audit_kit-0.2.0/agent_audit_kit/output/owasp_report.py +164 -0
  35. agent_audit_kit-0.2.0/agent_audit_kit/output/sarif.py +192 -0
  36. agent_audit_kit-0.2.0/agent_audit_kit/pinning.py +162 -0
  37. agent_audit_kit-0.2.0/agent_audit_kit/proxy/__init__.py +1 -0
  38. agent_audit_kit-0.2.0/agent_audit_kit/proxy/interceptor.py +166 -0
  39. agent_audit_kit-0.2.0/agent_audit_kit/rules/__init__.py +1 -0
  40. agent_audit_kit-0.2.0/agent_audit_kit/rules/builtin.py +1209 -0
  41. agent_audit_kit-0.2.0/agent_audit_kit/scanners/__init__.py +1 -0
  42. agent_audit_kit-0.2.0/agent_audit_kit/scanners/_helpers.py +42 -0
  43. agent_audit_kit-0.2.0/agent_audit_kit/scanners/a2a_protocol.py +364 -0
  44. agent_audit_kit-0.2.0/agent_audit_kit/scanners/agent_config.py +210 -0
  45. agent_audit_kit-0.2.0/agent_audit_kit/scanners/hook_injection.py +238 -0
  46. agent_audit_kit-0.2.0/agent_audit_kit/scanners/legal_compliance.py +162 -0
  47. agent_audit_kit-0.2.0/agent_audit_kit/scanners/mcp_config.py +250 -0
  48. agent_audit_kit-0.2.0/agent_audit_kit/scanners/rust_scan.py +147 -0
  49. agent_audit_kit-0.2.0/agent_audit_kit/scanners/secret_exposure.py +293 -0
  50. agent_audit_kit-0.2.0/agent_audit_kit/scanners/supply_chain.py +516 -0
  51. agent_audit_kit-0.2.0/agent_audit_kit/scanners/taint_analysis.py +288 -0
  52. agent_audit_kit-0.2.0/agent_audit_kit/scanners/tool_poisoning.py +274 -0
  53. agent_audit_kit-0.2.0/agent_audit_kit/scanners/transport_security.py +166 -0
  54. agent_audit_kit-0.2.0/agent_audit_kit/scanners/trust_boundary.py +140 -0
  55. agent_audit_kit-0.2.0/agent_audit_kit/scanners/typescript_scan.py +130 -0
  56. agent_audit_kit-0.2.0/agent_audit_kit/scoring.py +81 -0
  57. agent_audit_kit-0.2.0/agent_audit_kit/verification.py +201 -0
  58. agent_audit_kit-0.2.0/agent_audit_kit/vuln_db.py +59 -0
  59. agent_audit_kit-0.2.0/benchmarks/README.md +49 -0
  60. agent_audit_kit-0.2.0/benchmarks/crawler.py +492 -0
  61. agent_audit_kit-0.2.0/benchmarks/run_benchmark.sh +85 -0
  62. agent_audit_kit-0.2.0/benchmarks/sample_configs/sample_01_clean.json +22 -0
  63. agent_audit_kit-0.2.0/benchmarks/sample_configs/sample_02_secrets.json +28 -0
  64. agent_audit_kit-0.2.0/benchmarks/sample_configs/sample_03_no_auth.json +19 -0
  65. agent_audit_kit-0.2.0/benchmarks/sample_configs/sample_04_shell_injection.json +26 -0
  66. agent_audit_kit-0.2.0/benchmarks/sample_configs/sample_05_mixed.json +33 -0
  67. agent_audit_kit-0.2.0/docs/CNAME +1 -0
  68. agent_audit_kit-0.2.0/docs/ci-cd.md +60 -0
  69. agent_audit_kit-0.2.0/docs/comparison.md +41 -0
  70. agent_audit_kit-0.2.0/docs/getting-started.md +66 -0
  71. agent_audit_kit-0.2.0/docs/index.md +39 -0
  72. agent_audit_kit-0.2.0/docs/mkdocs.yml +29 -0
  73. agent_audit_kit-0.2.0/docs/owasp-mapping.md +34 -0
  74. agent_audit_kit-0.2.0/docs/rules.md +30 -0
  75. agent_audit_kit-0.2.0/entrypoint.sh +195 -0
  76. agent_audit_kit-0.2.0/pyproject.toml +55 -0
  77. agent_audit_kit-0.2.0/requirements-lock.txt +63 -0
  78. agent_audit_kit-0.2.0/scripts/generate_lockfile.py +80 -0
  79. agent_audit_kit-0.2.0/tests/conftest.py +67 -0
  80. agent_audit_kit-0.2.0/tests/fixtures/clean_mcp.json +17 -0
  81. agent_audit_kit-0.2.0/tests/fixtures/clean_settings.json +30 -0
  82. agent_audit_kit-0.2.0/tests/fixtures/env_with_secrets +8 -0
  83. agent_audit_kit-0.2.0/tests/fixtures/package_with_risks.json +13 -0
  84. agent_audit_kit-0.2.0/tests/fixtures/vulnerable_hooks.json +14 -0
  85. agent_audit_kit-0.2.0/tests/fixtures/vulnerable_mcp.json +63 -0
  86. agent_audit_kit-0.2.0/tests/fixtures/vulnerable_settings.json +62 -0
  87. agent_audit_kit-0.2.0/tests/test_a2a_protocol.py +346 -0
  88. agent_audit_kit-0.2.0/tests/test_action.py +129 -0
  89. agent_audit_kit-0.2.0/tests/test_agent_config.py +195 -0
  90. agent_audit_kit-0.2.0/tests/test_cli.py +326 -0
  91. agent_audit_kit-0.2.0/tests/test_compliance_output.py +181 -0
  92. agent_audit_kit-0.2.0/tests/test_diff.py +112 -0
  93. agent_audit_kit-0.2.0/tests/test_discovery.py +119 -0
  94. agent_audit_kit-0.2.0/tests/test_fix.py +432 -0
  95. agent_audit_kit-0.2.0/tests/test_hook_injection.py +76 -0
  96. agent_audit_kit-0.2.0/tests/test_legal_compliance.py +293 -0
  97. agent_audit_kit-0.2.0/tests/test_llm_scan.py +192 -0
  98. agent_audit_kit-0.2.0/tests/test_llm_scan_mod.py +212 -0
  99. agent_audit_kit-0.2.0/tests/test_mcp_config.py +101 -0
  100. agent_audit_kit-0.2.0/tests/test_owasp_report.py +100 -0
  101. agent_audit_kit-0.2.0/tests/test_owasp_report_output.py +156 -0
  102. agent_audit_kit-0.2.0/tests/test_pinning.py +228 -0
  103. agent_audit_kit-0.2.0/tests/test_pinning_mod.py +263 -0
  104. agent_audit_kit-0.2.0/tests/test_proxy.py +357 -0
  105. agent_audit_kit-0.2.0/tests/test_sarif_output.py +147 -0
  106. agent_audit_kit-0.2.0/tests/test_scoring.py +188 -0
  107. agent_audit_kit-0.2.0/tests/test_secret_exposure.py +88 -0
  108. agent_audit_kit-0.2.0/tests/test_supply_chain.py +300 -0
  109. agent_audit_kit-0.2.0/tests/test_taint_analysis.py +273 -0
  110. agent_audit_kit-0.2.0/tests/test_tool_poisoning.py +304 -0
  111. agent_audit_kit-0.2.0/tests/test_transport_security.py +257 -0
  112. agent_audit_kit-0.2.0/tests/test_trust_boundary.py +74 -0
  113. agent_audit_kit-0.2.0/tests/test_verification.py +484 -0
  114. agent_audit_kit-0.2.0/tests/test_verification_mod.py +213 -0
  115. agent_audit_kit-0.2.0/tests/test_vuln_db.py +170 -0
  116. agent_audit_kit-0.2.0/vscode-extension/.vscodeignore +7 -0
  117. agent_audit_kit-0.2.0/vscode-extension/README.md +75 -0
  118. agent_audit_kit-0.2.0/vscode-extension/package.json +64 -0
  119. agent_audit_kit-0.2.0/vscode-extension/src/extension.ts +331 -0
  120. agent_audit_kit-0.2.0/vscode-extension/tsconfig.json +21 -0
@@ -0,0 +1,22 @@
1
+ # AgentAuditKit Configuration
2
+ # Place this file at your project root to customize scanning behavior.
3
+ # CLI flags override these values.
4
+
5
+ # Minimum severity to report
6
+ severity: low
7
+
8
+ # Fail CI if any finding at this severity or above (critical, high, medium, low, none)
9
+ fail-on: high
10
+
11
+ # Paths to exclude from scanning
12
+ ignore-paths:
13
+ - vendor/
14
+ - third_party/
15
+
16
+ # Rules to skip (uncomment as needed)
17
+ # exclude-rules:
18
+ # - AAK-MCP-007 # We intentionally don't pin npx versions
19
+ # - AAK-SUPPLY-005 # Large dependency tree is expected
20
+
21
+ # Scan user-level agent configs (~/.claude/, etc.)
22
+ include-user-config: false
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Report a bug or incorrect behavior
4
+ title: "[BUG] "
5
+ labels: bug
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Describe the bug
10
+
11
+ A clear and concise description of what the bug is.
12
+
13
+ ## To reproduce
14
+
15
+ Steps to reproduce the behavior:
16
+
17
+ 1. Run `agent-audit-kit scan ...`
18
+ 2. With this config: ...
19
+ 3. See error
20
+
21
+ ## Expected behavior
22
+
23
+ A clear description of what you expected to happen.
24
+
25
+ ## Environment
26
+
27
+ - **OS:** (e.g., macOS 14.5, Ubuntu 22.04)
28
+ - **Python version:** (e.g., 3.11.9)
29
+ - **AgentAuditKit version:** (run `agent-audit-kit --version`)
30
+ - **Installation method:** (pip, Docker, GitHub Action)
31
+
32
+ ## Additional context
33
+
34
+ Add any other context, logs, or screenshots about the problem here.
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest a new feature or improvement
4
+ title: "[FEATURE] "
5
+ labels: enhancement
6
+ assignees: ''
7
+ ---
8
+
9
+ ## Problem description
10
+
11
+ A clear description of the problem this feature would solve.
12
+
13
+ ## Proposed solution
14
+
15
+ Describe how you'd like this to work.
16
+
17
+ ## Alternatives considered
18
+
19
+ Any alternative solutions or features you've considered.
20
+
21
+ ## Additional context
22
+
23
+ Add any other context, mockups, or references here.
@@ -0,0 +1,22 @@
1
+ ## Summary
2
+
3
+ Brief description of what changed and why.
4
+
5
+ ## Motivation
6
+
7
+ Why is this change needed? Link to related issues if applicable.
8
+
9
+ ## Test plan
10
+
11
+ How was this tested?
12
+
13
+ - [ ] Unit tests added/updated
14
+ - [ ] `pytest -v` passes
15
+ - [ ] Self-scan passes: `agent-audit-kit scan . --fail-on critical`
16
+
17
+ ## Checklist
18
+
19
+ - [ ] Tests pass locally
20
+ - [ ] No secrets or credentials committed
21
+ - [ ] Documentation updated (if applicable)
22
+ - [ ] CHANGELOG.md updated (if user-facing change)
@@ -0,0 +1,19 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+
8
+ - package-ecosystem: "github-actions"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "weekly"
12
+
13
+ - package-ecosystem: "docker"
14
+ directory: "/"
15
+ schedule:
16
+ interval: "weekly"
17
+ ignore:
18
+ - dependency-name: "python"
19
+ update-types: ["version-update:semver-major"]
@@ -0,0 +1,51 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install -e ".[dev]"
28
+
29
+ - name: Run linting
30
+ run: ruff check agent_audit_kit/ tests/
31
+
32
+ - name: Run type checking
33
+ run: mypy agent_audit_kit/ --ignore-missing-imports
34
+
35
+ - name: Run tests
36
+ run: pytest -v --tb=short
37
+
38
+ - name: Self-scan (verify CLI works)
39
+ run: agent-audit-kit scan . --format json --score --fail-on none --ignore-paths tests/fixtures,benchmarks/sample_configs
40
+
41
+ - name: Self-scan SARIF
42
+ run: agent-audit-kit scan . --format sarif -o self-scan.sarif --fail-on none --ignore-paths tests/fixtures,benchmarks/sample_configs
43
+
44
+ - name: Verify OWASP report
45
+ run: agent-audit-kit scan . --owasp-report --fail-on none --ignore-paths tests/fixtures,benchmarks/sample_configs
46
+
47
+ - name: Verify discovery
48
+ run: agent-audit-kit discover
49
+
50
+ - name: Verify score
51
+ run: agent-audit-kit score .
@@ -0,0 +1,40 @@
1
+ name: "CodeQL"
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: "0 6 * * 1"
10
+
11
+ jobs:
12
+ analyze:
13
+ name: Analyze
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ security-events: write
17
+ actions: read
18
+ contents: read
19
+
20
+ strategy:
21
+ fail-fast: false
22
+ matrix:
23
+ language: [python]
24
+
25
+ steps:
26
+ - name: Checkout repository
27
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28
+
29
+ - name: Initialize CodeQL
30
+ uses: github/codeql-action/init@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
31
+ with:
32
+ languages: ${{ matrix.language }}
33
+
34
+ - name: Autobuild
35
+ uses: github/codeql-action/autobuild@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
36
+
37
+ - name: Perform CodeQL Analysis
38
+ uses: github/codeql-action/analyze@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
39
+ with:
40
+ category: "/language:${{ matrix.language }}"
@@ -0,0 +1,147 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ permissions:
9
+ contents: write
10
+ packages: write
11
+ id-token: write
12
+ attestations: write
13
+
14
+ jobs:
15
+ # --------------------------------------------------------------------------
16
+ # 1. Publish to PyPI using trusted publishing (OIDC)
17
+ # --------------------------------------------------------------------------
18
+ pypi:
19
+ name: Publish to PyPI
20
+ runs-on: ubuntu-latest
21
+ environment:
22
+ name: pypi
23
+ url: https://pypi.org/p/agent-audit-kit
24
+ permissions:
25
+ id-token: write
26
+ steps:
27
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28
+
29
+ - name: Set up Python
30
+ uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
31
+ with:
32
+ python-version: '3.11'
33
+
34
+ - name: Install build tools
35
+ run: python -m pip install --upgrade pip build
36
+
37
+ - name: Build package
38
+ run: python -m build
39
+
40
+ - name: Publish to PyPI
41
+ uses: pypa/gh-action-pypi-publish@v1.13.0
42
+
43
+ # --------------------------------------------------------------------------
44
+ # 2. Build, scan, and push Docker image to GHCR
45
+ # --------------------------------------------------------------------------
46
+ docker:
47
+ name: Push Docker image to GHCR
48
+ runs-on: ubuntu-latest
49
+ permissions:
50
+ contents: read
51
+ packages: write
52
+ id-token: write
53
+ attestations: write
54
+ steps:
55
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
56
+
57
+ - name: Set up Docker Buildx
58
+ uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
59
+
60
+ - name: Log in to GHCR
61
+ uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
62
+ with:
63
+ registry: ghcr.io
64
+ username: ${{ github.actor }}
65
+ password: ${{ secrets.GITHUB_TOKEN }}
66
+
67
+ - name: Extract version from tag
68
+ id: version
69
+ run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
70
+
71
+ - name: Build image for scanning
72
+ uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
73
+ with:
74
+ context: .
75
+ load: true
76
+ tags: agent-audit-kit:scan
77
+
78
+ - name: Scan Docker image with Trivy
79
+ uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
80
+ with:
81
+ image-ref: agent-audit-kit:scan
82
+ format: sarif
83
+ output: trivy-results.sarif
84
+ severity: CRITICAL,HIGH
85
+
86
+ - name: Build and push
87
+ id: push
88
+ uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
89
+ with:
90
+ context: .
91
+ push: true
92
+ tags: |
93
+ ghcr.io/sattyamjjain/agent-audit-kit:${{ steps.version.outputs.version }}
94
+ ghcr.io/sattyamjjain/agent-audit-kit:latest
95
+ labels: |
96
+ org.opencontainers.image.title=AgentAuditKit
97
+ org.opencontainers.image.description=Security scanner for MCP-connected AI agent pipelines
98
+ org.opencontainers.image.version=${{ steps.version.outputs.version }}
99
+ org.opencontainers.image.source=https://github.com/sattyamjjain/agent-audit-kit
100
+ org.opencontainers.image.licenses=MIT
101
+ cache-from: type=gha
102
+ cache-to: type=gha,mode=max
103
+
104
+ - name: Generate SLSA provenance attestation
105
+ uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
106
+ with:
107
+ subject-name: ghcr.io/sattyamjjain/agent-audit-kit
108
+ subject-digest: ${{ steps.push.outputs.digest }}
109
+ push-to-registry: true
110
+
111
+ # --------------------------------------------------------------------------
112
+ # 3. Create GitHub Release with auto-generated notes
113
+ # --------------------------------------------------------------------------
114
+ github-release:
115
+ name: Create GitHub Release
116
+ runs-on: ubuntu-latest
117
+ needs: [pypi, docker]
118
+ permissions:
119
+ contents: write
120
+ steps:
121
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
122
+
123
+ - name: Create release
124
+ uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
125
+ with:
126
+ generate_release_notes: true
127
+ body: |
128
+ ## Installation
129
+
130
+ **pip:**
131
+ ```bash
132
+ pip install agent-audit-kit==${{ github.ref_name }}
133
+ ```
134
+
135
+ **Docker:**
136
+ ```bash
137
+ docker pull ghcr.io/sattyamjjain/agent-audit-kit:${{ github.ref_name }}
138
+ ```
139
+
140
+ **GitHub Action:**
141
+ ```yaml
142
+ - uses: sattyamjjain/agent-audit-kit@${{ github.ref_name }}
143
+ with:
144
+ fail-on: high
145
+ ```
146
+ env:
147
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,36 @@
1
+ name: "Scorecard"
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ schedule:
7
+ - cron: "0 6 * * 1"
8
+
9
+ permissions: read-all
10
+
11
+ jobs:
12
+ analysis:
13
+ name: Scorecard analysis
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ security-events: write
17
+ id-token: write
18
+ contents: read
19
+
20
+ steps:
21
+ - name: Checkout repository
22
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
23
+ with:
24
+ persist-credentials: false
25
+
26
+ - name: Run OSSF Scorecard
27
+ uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
28
+ with:
29
+ results_file: results.sarif
30
+ results_format: sarif
31
+ publish_results: true
32
+
33
+ - name: Upload SARIF results
34
+ uses: github/codeql-action/upload-sarif@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
35
+ with:
36
+ sarif_file: results.sarif
@@ -0,0 +1,43 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.egg-info/
6
+ *.egg
7
+ dist/
8
+ build/
9
+ .eggs/
10
+
11
+ # Virtual environments
12
+ .venv/
13
+ venv/
14
+ env/
15
+
16
+ # IDE
17
+ .idea/
18
+ .vscode/
19
+ *.swp
20
+ *.swo
21
+
22
+ # Test/Coverage
23
+ .pytest_cache/
24
+ .coverage
25
+ htmlcov/
26
+ .tox/
27
+ .mypy_cache/
28
+ .ruff_cache/
29
+
30
+ # OS
31
+ .DS_Store
32
+ Thumbs.db
33
+
34
+ # Environment
35
+ .env
36
+ .env.*
37
+
38
+ # Agent Audit Kit cache
39
+ .agent-audit-kit/
40
+
41
+ # Benchmark data (downloaded configs)
42
+ benchmarks/data/
43
+ benchmarks/results.json
@@ -0,0 +1,10 @@
1
+ - id: agent-audit-kit
2
+ name: AgentAuditKit Security Scan
3
+ description: Scan MCP agent configs, hooks, and dependencies for security issues
4
+ entry: agent-audit-kit scan
5
+ language: python
6
+ types: [json, yaml]
7
+ files: '(\.mcp\.json|mcp.*\.json|settings\.json|\.env|package\.json|pyproject\.toml)'
8
+ args: ['--ci']
9
+ pass_filenames: false
10
+ always_run: false
@@ -0,0 +1,28 @@
1
+ # Changelog
2
+
3
+ All notable changes to AgentAuditKit are 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
+ ## [0.2.0] - 2026-04-05
9
+
10
+ Initial public release.
11
+
12
+ ### Added
13
+
14
+ - **74 security rules** across 11 scanner categories: MCP configuration, hook injection, trust boundaries, secret exposure, supply chain, agent config, tool poisoning, taint analysis, transport security, A2A protocol, and legal compliance.
15
+ - **11 scanners** with full coverage of MCP-connected AI agent pipelines.
16
+ - **9 CLI commands**: `scan`, `discover`, `pin`, `verify`, `fix`, `score`, `update`, and CI-mode shortcuts.
17
+ - **SARIF 2.1.0** output with GitHub Security tab integration and inline PR annotations.
18
+ - **GitHub Action** (`sattyamjjain/agent-audit-kit@v1`) for zero-install CI scanning.
19
+ - **Pre-commit hook** for local scanning before every commit.
20
+ - **OWASP coverage**: full mapping to OWASP Agentic Top 10 (10/10), OWASP MCP Top 10, and Adversa AI Top 25.
21
+ - **Compliance mapping** for EU AI Act, SOC2, ISO 27001, HIPAA, and NIST AI RMF via `--compliance` flag.
22
+ - **Tool pinning** (`pin` and `verify` commands) to detect rug-pull and supply chain drift.
23
+ - **Taint analysis** tracking `@tool` parameter flows to shell, eval, SQL, SSRF, file, and deserialization sinks.
24
+ - **Security scoring** with letter grades and embeddable badges via `score` command.
25
+ - **Auto-fix** with `fix --dry-run` for safe remediation of common findings.
26
+ - **Agent discovery** supporting Claude Code, Cursor, VS Code Copilot, Windsurf, Amazon Q, Gemini CLI, Goose, Continue, Roo Code, and Kiro.
27
+
28
+ [0.2.0]: https://github.com/sattyamjjain/agent-audit-kit/releases/tag/v0.2.0
@@ -0,0 +1,54 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to a positive environment:
15
+
16
+ * Using welcoming and inclusive language
17
+ * Being respectful of differing viewpoints and experiences
18
+ * Gracefully accepting constructive criticism
19
+ * Focusing on what is best for the community
20
+ * Showing empathy towards other community members
21
+
22
+ Examples of unacceptable behavior:
23
+
24
+ * The use of sexualized language or imagery, and sexual attention or advances
25
+ * Trolling, insulting or derogatory comments, and personal or political attacks
26
+ * Public or private harassment
27
+ * Publishing others' private information without explicit permission
28
+ * Other conduct which could reasonably be considered inappropriate
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of
33
+ acceptable behavior and will take appropriate and fair corrective action in
34
+ response to any behavior that they deem inappropriate, threatening, offensive,
35
+ or harmful.
36
+
37
+ ## Scope
38
+
39
+ This Code of Conduct applies within all community spaces, and also applies when
40
+ an individual is officially representing the community in public spaces.
41
+
42
+ ## Enforcement
43
+
44
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
45
+ reported to the community leaders responsible for enforcement at
46
+ **security@agentauditkit.io**.
47
+
48
+ All complaints will be reviewed and investigated promptly and fairly.
49
+
50
+ ## Attribution
51
+
52
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
53
+ version 2.1, available at
54
+ <https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
@@ -0,0 +1,99 @@
1
+ # Contributing to AgentAuditKit
2
+
3
+ Thank you for your interest in making AI agent pipelines safer. This guide covers everything you need to start contributing.
4
+
5
+ ## Development Setup
6
+
7
+ **Prerequisites:** Python 3.9+ and Git.
8
+
9
+ ```bash
10
+ git clone https://github.com/sattyamjjain/agent-audit-kit.git
11
+ cd agent-audit-kit
12
+ pip install -e ".[dev]"
13
+ ```
14
+
15
+ This installs AgentAuditKit in editable mode along with testing, linting, and type-checking tools.
16
+
17
+ Verify the install:
18
+
19
+ ```bash
20
+ agent-audit-kit scan .
21
+ ```
22
+
23
+ ## Running Tests
24
+
25
+ ```bash
26
+ pytest -v
27
+ ```
28
+
29
+ With coverage:
30
+
31
+ ```bash
32
+ pytest -v --cov=agent_audit_kit --cov-report=term-missing
33
+ ```
34
+
35
+ ## Linting
36
+
37
+ ```bash
38
+ ruff check .
39
+ ```
40
+
41
+ Auto-fix issues:
42
+
43
+ ```bash
44
+ ruff check . --fix
45
+ ```
46
+
47
+ ## Type Checking
48
+
49
+ ```bash
50
+ mypy agent_audit_kit
51
+ ```
52
+
53
+ ## Code Conventions
54
+
55
+ - **Python 3.9+** compatibility is required. Do not use features exclusive to 3.10+.
56
+ - Add `from __future__ import annotations` at the top of every module.
57
+ - Use **type hints** on all function signatures and return types.
58
+ - Keep functions under 50 lines. Extract helpers if longer.
59
+ - Use `click` for CLI commands, `pyyaml` for config parsing.
60
+ - No hardcoded secrets, tokens, or API keys in source code.
61
+
62
+ ## Adding a New Rule
63
+
64
+ 1. Create the rule in the appropriate scanner module under `agent_audit_kit/`.
65
+ 2. Assign a unique rule ID following the pattern `AAK-<CATEGORY>-<NNN>`.
66
+ 3. Include `severity`, `message`, `remediation`, and `owasp_ref` fields.
67
+ 4. Add tests in `tests/` that cover both detection and non-detection cases.
68
+ 5. Update `docs/rules.md` with the new rule.
69
+
70
+ ## Pull Request Process
71
+
72
+ 1. **Fork** the repository and create a branch from `main`:
73
+ - `feature/<short-description>` for new features
74
+ - `fix/<short-description>` for bug fixes
75
+ - `chore/<short-description>` for maintenance
76
+ 2. Make your changes. Ensure all checks pass:
77
+ ```bash
78
+ pytest -v
79
+ ruff check .
80
+ mypy agent_audit_kit
81
+ ```
82
+ 3. Write a clear commit message in imperative mood (e.g., "Add taint analysis for pickle.loads sink").
83
+ 4. Open a pull request against `main`. Fill out the PR template completely.
84
+ 5. A maintainer will review your PR. Address feedback promptly.
85
+
86
+ ## What Makes a Good PR
87
+
88
+ - Solves one problem. Keep the diff focused.
89
+ - Includes tests that prove the change works.
90
+ - Updates documentation if user-facing behavior changes.
91
+ - Does not introduce secret values, `.env` files, or credentials.
92
+
93
+ ## Reporting Issues
94
+
95
+ Use [GitHub Issues](https://github.com/sattyamjjain/agent-audit-kit/issues) for bugs and feature requests. For security vulnerabilities, see [SECURITY.md](SECURITY.md).
96
+
97
+ ## License
98
+
99
+ By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE).
@@ -0,0 +1,21 @@
1
+ # Pin to specific digest for supply chain security
2
+ FROM python:3.11-slim@sha256:9358444059ed78e2975ada2c189f1c1a3144a5dab6f35bff8c981afb38946634 AS base
3
+
4
+ LABEL maintainer="AgentAuditKit"
5
+ LABEL org.opencontainers.image.source="https://github.com/sattyamjjain/agent-audit-kit"
6
+ LABEL org.opencontainers.image.description="Security scanner for MCP-connected AI agent pipelines"
7
+
8
+ COPY . /app
9
+ WORKDIR /app
10
+ RUN pip install --no-cache-dir .
11
+
12
+ # Create non-root user for security
13
+ RUN groupadd -r scanner && useradd -r -g scanner -d /home/scanner -s /sbin/nologin scanner
14
+ RUN mkdir -p /home/scanner && chown -R scanner:scanner /home/scanner
15
+
16
+ COPY entrypoint.sh /entrypoint.sh
17
+ RUN chmod +x /entrypoint.sh
18
+
19
+ USER scanner
20
+
21
+ ENTRYPOINT ["/entrypoint.sh"]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AgentAuditKit Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.