audit-packs 0.5.6__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.
- audit_packs-0.5.6/PKG-INFO +689 -0
- audit_packs-0.5.6/README.md +657 -0
- audit_packs-0.5.6/pyproject.toml +67 -0
- audit_packs-0.5.6/setup.cfg +4 -0
- audit_packs-0.5.6/src/audit_packs.egg-info/PKG-INFO +689 -0
- audit_packs-0.5.6/src/audit_packs.egg-info/SOURCES.txt +19 -0
- audit_packs-0.5.6/src/audit_packs.egg-info/dependency_links.txt +1 -0
- audit_packs-0.5.6/src/audit_packs.egg-info/entry_points.txt +2 -0
- audit_packs-0.5.6/src/audit_packs.egg-info/requires.txt +11 -0
- audit_packs-0.5.6/src/audit_packs.egg-info/top_level.txt +1 -0
- audit_packs-0.5.6/src/audit_packs_action/__init__.py +1 -0
- audit_packs-0.5.6/src/audit_packs_action/cli.py +2121 -0
- audit_packs-0.5.6/src/audit_packs_action/engines.py +685 -0
- audit_packs-0.5.6/src/audit_packs_action/report.py +589 -0
- audit_packs-0.5.6/src/audit_packs_action/rules/hardcoded-credential.yaml +27 -0
- audit_packs-0.5.6/src/audit_packs_action/rules/insecure-config.yaml +33 -0
- audit_packs-0.5.6/src/audit_packs_action/rules/missing-audit-log.yaml +49 -0
- audit_packs-0.5.6/src/audit_packs_action/rules/no-tls-verify.yaml +23 -0
- audit_packs-0.5.6/src/audit_packs_action/rules/overpermissive-iam.yaml +31 -0
- audit_packs-0.5.6/src/audit_packs_action/rules/pii-fields.yaml +22 -0
- audit_packs-0.5.6/src/audit_packs_action/rules/weak-cipher.yaml +10 -0
|
@@ -0,0 +1,689 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: audit-packs
|
|
3
|
+
Version: 0.5.6
|
|
4
|
+
Summary: GitHub Action that maps IaC security findings to compliance framework controls and posts evidence-backed inline PR review comments. Supports Checkov, Semgrep, CodeQL, Trivy, tfsec, and gitleaks.
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Project-URL: Homepage, https://github.com/prakharsingh/audit-packs
|
|
7
|
+
Project-URL: Repository, https://github.com/prakharsingh/audit-packs.git
|
|
8
|
+
Project-URL: Bug Tracker, https://github.com/prakharsingh/audit-packs/issues
|
|
9
|
+
Keywords: compliance,security,nist-800-53,soc2,gdpr,hipaa,iso27001,pci-dss,fedramp,checkov,semgrep,codeql,trivy,tfsec,gitleaks,github-action,iac,sast,oscal,grc,evidence,secrets-detection
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: System Administrators
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Security
|
|
19
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Requires-Dist: audit-packs-core>=0.1.1
|
|
23
|
+
Requires-Dist: audit-packs-mapping>=0.1.1
|
|
24
|
+
Requires-Dist: audit-packs-evidence>=0.1.1
|
|
25
|
+
Requires-Dist: audit-packs-ai>=0.1.1
|
|
26
|
+
Requires-Dist: PyYAML>=6.0
|
|
27
|
+
Requires-Dist: requests>=2.31
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
30
|
+
Requires-Dist: pre-commit>=3.5.0; extra == "dev"
|
|
31
|
+
Requires-Dist: python-semantic-release>=9.0.0; extra == "dev"
|
|
32
|
+
|
|
33
|
+
# audit-packs
|
|
34
|
+
|
|
35
|
+
[](LICENSE)
|
|
36
|
+
[](pyproject.toml)
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<img src="cover.jpg" alt="Audit-Packs Banner" width="100%" />
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
> An evidence-first Compliance Intelligence Engine that transforms security scanner findings into standardized, evidence-backed compliance artifacts — inline PR comments, OSCAL, SARIF, and coverage reports.
|
|
43
|
+
|
|
44
|
+
Detection is delegated entirely to best-in-class OSS engines (Checkov, Semgrep, CodeQL, Trivy, and more). The core engine is scanner-agnostic: any tool that emits SARIF can feed it. What audit-packs adds is the **normalization → compliance mapping → evidence generation → output** layer: reviewers see not just "S3 bucket unencrypted" but:
|
|
45
|
+
|
|
46
|
+
> **NIST 800-53 / SC-13 — Cryptographic Protection**
|
|
47
|
+
> Severity: `high` | Engine: `checkov` (`CKV_AWS_19`)
|
|
48
|
+
> Evidence: `server_side_encryption_configuration is not set`
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Supported Scanners
|
|
53
|
+
|
|
54
|
+
| Scanner | Status |
|
|
55
|
+
|---------|--------|
|
|
56
|
+
| Checkov | Supported |
|
|
57
|
+
| Semgrep | Supported |
|
|
58
|
+
| CodeQL | Supported (SARIF dir input) |
|
|
59
|
+
| Trivy | Supported |
|
|
60
|
+
| tfsec | Supported |
|
|
61
|
+
| gitleaks | Supported |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Why this exists
|
|
66
|
+
|
|
67
|
+
Checkov and Semgrep are excellent at finding IaC misconfigurations. They are not designed to answer the question auditors and GRC teams actually ask: *which compliance controls are affected, and where is the evidence?* audit-packs bridges that gap by wrapping detection output in a compliance control mapping layer, confidence scoring, and audit-grade evidence packaging — without replacing or re-implementing any detection engine.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Quick start
|
|
72
|
+
|
|
73
|
+
Refer to the complete [Setup & Integration Guide](docs/SETUP.md) for detailed CLI, VS Code extension, and notification configuration.
|
|
74
|
+
|
|
75
|
+
```yaml
|
|
76
|
+
# .github/workflows/audit.yml
|
|
77
|
+
name: Audit Packs
|
|
78
|
+
|
|
79
|
+
on:
|
|
80
|
+
pull_request:
|
|
81
|
+
|
|
82
|
+
jobs:
|
|
83
|
+
audit:
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
permissions:
|
|
86
|
+
contents: read
|
|
87
|
+
pull-requests: write # required to post inline review comments
|
|
88
|
+
|
|
89
|
+
steps:
|
|
90
|
+
- uses: actions/checkout@v4
|
|
91
|
+
with:
|
|
92
|
+
fetch-depth: 0 # required for diff-only scanning
|
|
93
|
+
|
|
94
|
+
- uses: prakharsingh/audit-packs@v1
|
|
95
|
+
with:
|
|
96
|
+
frameworks: nist-800-53,soc2
|
|
97
|
+
fail-on: high
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The action posts inline review comments on changed lines only, writes an OSCAL assessment-results JSON, a control coverage matrix, and an aggregate SARIF file, then exits non-zero if any finding meets or exceeds `fail-on`.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Inputs
|
|
105
|
+
|
|
106
|
+
| Input | Default | Description |
|
|
107
|
+
|---|---|---|
|
|
108
|
+
| `frameworks` | **required** | Comma- or newline-separated pack IDs to evaluate. See [Framework coverage](#framework-coverage). |
|
|
109
|
+
| `fail-on` | `high` | Minimum severity that fails the check. One of `low`, `medium`, `high`, `critical`. |
|
|
110
|
+
| `base-ref` | `origin/main` | Base git ref to diff against. Change for non-standard default branch names. |
|
|
111
|
+
| `scan-mode` | `both` | `diff` — PR comments + gate only. `full` — posture outputs only. `both` — all paths (recommended). |
|
|
112
|
+
| `emit-oscal` | `true` | Write OSCAL assessment-results JSON to `oscal.json`. |
|
|
113
|
+
| `emit-coverage` | `true` | Write a control coverage matrix to `coverage.md` / `coverage.html` and append to the job summary. |
|
|
114
|
+
| `seo-title` | `Audit Packs Control Coverage Matrix` | HTML `<title>`, Open Graph title, and JSON-LD name for `coverage.html`. |
|
|
115
|
+
| `seo-description` | `Compliance control coverage report generated by audit-packs.` | Meta description, Open Graph description, and JSON-LD description for `coverage.html`. |
|
|
116
|
+
| `seo-canonical-url` | `""` | Optional canonical URL for `coverage.html` when publishing the report. |
|
|
117
|
+
| `emit-sarif` | `true` | Write an aggregate SARIF file to `audit-packs.sarif`. |
|
|
118
|
+
| `adjudication-mode` | `off` | LLM adjudication: `off` (disabled), `advisory` (score and log, no filtering), `enforce` (suppress findings below `min-confidence`). |
|
|
119
|
+
| `min-confidence` | `0.70` | Composite confidence threshold (0.0–1.0). Findings below this are suppressed in `enforce` mode. |
|
|
120
|
+
| `models-config` | `audit-models.yaml` | Repo-relative path to a model routing YAML that maps roles to providers. Falls back to built-in defaults if absent. |
|
|
121
|
+
| `detector-model` | `""` | Override the `detector` role's model (sets `DETECTOR_MODEL` env). |
|
|
122
|
+
| `verifier-model` | `""` | Override the `verifier` role's model (sets `VERIFIER_MODEL` env). |
|
|
123
|
+
| `adversarial-model` | `""` | Override the `adversarial` role's model (sets `ADVERSARIAL_MODEL` env). |
|
|
124
|
+
| `judge-model` | `""` | Override the `judge` role's model (sets `JUDGE_MODEL` env). |
|
|
125
|
+
| `codeql-sarif` | `""` | Repo-relative path to directory of CodeQL SARIF files. Gracefully skipped if absent. |
|
|
126
|
+
| `ast-rules` | `ast-rules` | Path to Tree-sitter AST rule scripts directory (reserved for Phase 2; ignored in Phase 1). |
|
|
127
|
+
| `trivy-enabled` | `true` | Enable Trivy filesystem + image scanning. Requires trivy binary ≥ v0.69.2 on the runner. |
|
|
128
|
+
| `trivy-image` | `""` | Docker image reference for `trivy image` scan. Skipped when empty. Only used when `trivy-enabled` is `true`. |
|
|
129
|
+
| `tfsec-enabled` | `true` | Enable tfsec Terraform security checks. |
|
|
130
|
+
| `gitleaks-enabled` | `true` | Enable gitleaks secret detection. |
|
|
131
|
+
|
|
132
|
+
## Outputs
|
|
133
|
+
|
|
134
|
+
| Output | Path | Description |
|
|
135
|
+
|---|---|---|
|
|
136
|
+
| `oscal-path` | `oscal.json` | OSCAL assessment-results document for audit evidence packages. |
|
|
137
|
+
| `coverage-md-path` | `coverage.md` | Markdown control coverage matrix. |
|
|
138
|
+
| `coverage-html-path` | `coverage.html` | HTML control coverage matrix. |
|
|
139
|
+
| `sarif-path` | `audit-packs.sarif` | Aggregate SARIF file for upload to GitHub Code Scanning. |
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Outputs in depth
|
|
144
|
+
|
|
145
|
+
### Inline PR comments
|
|
146
|
+
|
|
147
|
+
For every finding on a changed line, the action posts a review comment:
|
|
148
|
+
|
|
149
|
+
> **Compliance control touched: `nist-800-53` / SC-13 — Cryptographic Protection**
|
|
150
|
+
>
|
|
151
|
+
> - Severity: `high`
|
|
152
|
+
> - Engine: `checkov` (`CKV_AWS_19`)
|
|
153
|
+
> - Finding: Ensure S3 bucket has encryption enabled
|
|
154
|
+
>
|
|
155
|
+
> Evidence:
|
|
156
|
+
> ```
|
|
157
|
+
> server_side_encryption_configuration is not set
|
|
158
|
+
> ```
|
|
159
|
+
|
|
160
|
+
Comments are **diff-filtered**: only findings on lines added or modified in the PR are posted. Findings on unchanged lines are silently dropped.
|
|
161
|
+
|
|
162
|
+
### OSCAL assessment-results
|
|
163
|
+
|
|
164
|
+
When `emit-oscal: true`, the action writes an [OSCAL assessment-results](https://pages.nist.gov/OSCAL/) document to `oscal.json`. This is the machine-readable format GRC tools and FedRAMP / NIST 800-53 evidence packages expect.
|
|
165
|
+
|
|
166
|
+
```yaml
|
|
167
|
+
- uses: prakharsingh/audit-packs@v1
|
|
168
|
+
id: audit
|
|
169
|
+
|
|
170
|
+
- name: Upload OSCAL evidence
|
|
171
|
+
uses: actions/upload-artifact@v4
|
|
172
|
+
with:
|
|
173
|
+
name: oscal-assessment-results
|
|
174
|
+
path: ${{ steps.audit.outputs.oscal-path }}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Control coverage matrix
|
|
178
|
+
|
|
179
|
+
When `emit-coverage: true`, the action writes `coverage.md` and `coverage.html` and appends the matrix to the Actions job summary. The matrix lists every control in the selected frameworks, whether it is automatically assessable via IaC checks, and its current pass / fail / not-applicable status.
|
|
180
|
+
|
|
181
|
+
`coverage.html` is a complete SEO-ready document with description, robots, Open Graph, Twitter card, optional canonical URL, and JSON-LD metadata. Set `seo-title`, `seo-description`, and `seo-canonical-url` when publishing the report as a static page.
|
|
182
|
+
|
|
183
|
+
### Aggregate SARIF and GitHub Code Scanning
|
|
184
|
+
|
|
185
|
+
When `emit-sarif: true`, findings across all engines are merged into a single SARIF file. Upload it to GitHub Code Scanning for a unified security overview:
|
|
186
|
+
|
|
187
|
+
```yaml
|
|
188
|
+
- uses: prakharsingh/audit-packs@v1
|
|
189
|
+
|
|
190
|
+
- uses: github/codeql-action/upload-sarif@v3
|
|
191
|
+
with:
|
|
192
|
+
sarif_file: audit-packs.sarif
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Framework coverage
|
|
198
|
+
|
|
199
|
+
| Framework | Pack ID | Type | Automated controls |
|
|
200
|
+
|---|---|---|---|
|
|
201
|
+
| NIST SP 800-53 Rev 5 | `nist-800-53` | Canonical | 20 |
|
|
202
|
+
| SOC 2 Type II (AICPA 2017) | `soc2` | Crosswalk → NIST 800-53 | 17 of 39 (22 are governance-only) |
|
|
203
|
+
| ISO/IEC 27001:2022 | `iso27001` | Crosswalk → NIST 800-53 | 10 |
|
|
204
|
+
| PCI-DSS v4.0 | `pci-dss` | Crosswalk → NIST 800-53 | 8 |
|
|
205
|
+
| FedRAMP Moderate | `fedramp` | Crosswalk → NIST 800-53 | 8 |
|
|
206
|
+
| HIPAA Security Rule | `hipaa` | Crosswalk → NIST 800-53 | 6 |
|
|
207
|
+
| GDPR (technical controls) | `gdpr` | Crosswalk → NIST 800-53 | 5 |
|
|
208
|
+
| Org-policy (custom) | `org-policy` | Crosswalk → NIST 800-53 | 6 (configurable) |
|
|
209
|
+
|
|
210
|
+
NIST 800-53 is the canonical pack. Every other framework is a crosswalk pack: each control maps to one or more NIST controls, which resolve to engine check IDs. Adding a new framework never requires touching detection logic — you add a YAML pack.
|
|
211
|
+
|
|
212
|
+
### Detailed Control Mapping Matrix
|
|
213
|
+
|
|
214
|
+
Below is a detailed matrix of supported/automated controls across all frameworks, resolved to their underlying static engine rules (Checkov, Semgrep) and custom Phase 2 detection agents.
|
|
215
|
+
|
|
216
|
+
<!-- MATRIX_START -->
|
|
217
|
+
#### FedRAMP Moderate Baseline (`fedramp`)
|
|
218
|
+
|
|
219
|
+
**Reference Ruleset / Standard:** [FedRAMP Moderate Baseline](https://www.fedramp.gov/)
|
|
220
|
+
|
|
221
|
+
| Control ID | Control Title | Automation Status | Mapped Rules / Heuristics |
|
|
222
|
+
| --- | --- | --- | --- |
|
|
223
|
+
| SC-13 | Cryptographic Protection (FedRAMP Moderate) | ✅ **Automated** | `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`) |
|
|
224
|
+
| SC-28 | Protection of Information at Rest (FedRAMP Moderate) | ✅ **Automated** | `SC-28` (*checkov*: `CKV_AWS_17`, `CKV_AWS_27`, `CKV_AWS_77`, `CKV_AWS_84`, `CKV_AWS_189`, `CKV_AWS_211`; *dataflow-agent*: `DFA-001`; *gdpr-agent*: `GDPR-001`; *hipaa-agent*: `HIPAA-001`) |
|
|
225
|
+
| SC-8 | Transmission Confidentiality (FedRAMP Moderate) | ✅ **Automated** | `SC-8` (*checkov*: `CKV_AWS_2`, `CKV_AWS_86`, `CKV_AWS_68`; *semgrep*: [`no-tls-verify`](rules/no-tls-verify.yaml)) |
|
|
226
|
+
| SC-7 | Boundary Protection (FedRAMP Moderate) | ✅ **Automated** | `SC-7` (*checkov*: `CKV_AWS_24`, `CKV_AWS_25`, `CKV_AWS_88`, `CKV_AWS_130`) |
|
|
227
|
+
| AC-3 | Access Enforcement (FedRAMP Moderate) | ✅ **Automated** | `AC-3` (*checkov*: `CKV_AWS_53`, `CKV_AWS_54`, `CKV_AWS_55`, `CKV_AWS_56`, `CKV_AWS_62`; *hipaa-agent*: `HIPAA-002`) |
|
|
228
|
+
| AC-6 | Least Privilege (FedRAMP Moderate) | ✅ **Automated** | `AC-6` (*checkov*: `CKV_AWS_40`, `CKV_AWS_274`; *semgrep*: [`overpermissive-iam`](rules/overpermissive-iam.yaml)) |
|
|
229
|
+
| IA-5 | Authenticator Management (FedRAMP Moderate) | ✅ **Automated** | `IA-5` (*checkov*: `CKV_AWS_6`; *semgrep*: [`hardcoded-credential`](rules/hardcoded-credential.yaml)) |
|
|
230
|
+
| AU-2 | Audit Events (FedRAMP Moderate) | ✅ **Automated** | `AU-2` (*checkov*: `CKV_AWS_67`, `CKV_AWS_35`, `CKV_AWS_1`; *soc2-agent*: `SOC2-002`) |
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
#### EU General Data Protection Regulation (GDPR) (`gdpr`)
|
|
234
|
+
|
|
235
|
+
**Reference Ruleset / Standard:** [GDPR Articles & Technical Controls](https://gdpr-info.eu/)
|
|
236
|
+
|
|
237
|
+
| Control ID | Control Title | Automation Status | Mapped Rules / Heuristics |
|
|
238
|
+
| --- | --- | --- | --- |
|
|
239
|
+
| Art-25 | Data Protection by Design and by Default | ✅ **Automated** | `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`), `SC-28` (*checkov*: `CKV_AWS_17`, `CKV_AWS_27`, `CKV_AWS_77`, `CKV_AWS_84`, `CKV_AWS_189`, `CKV_AWS_211`; *dataflow-agent*: `DFA-001`; *gdpr-agent*: `GDPR-001`; *hipaa-agent*: `HIPAA-001`) |
|
|
240
|
+
| Art-30 | Records of Processing Activities | ✅ **Automated** | `AU-2` (*checkov*: `CKV_AWS_67`, `CKV_AWS_35`, `CKV_AWS_1`; *soc2-agent*: `SOC2-002`) |
|
|
241
|
+
| Art-32-a | Pseudonymisation and Encryption | ✅ **Automated** | `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`), `SC-28` (*checkov*: `CKV_AWS_17`, `CKV_AWS_27`, `CKV_AWS_77`, `CKV_AWS_84`, `CKV_AWS_189`, `CKV_AWS_211`; *dataflow-agent*: `DFA-001`; *gdpr-agent*: `GDPR-001`; *hipaa-agent*: `HIPAA-001`) |
|
|
242
|
+
| Art-32-b | Confidentiality and Integrity of Processing | ✅ **Automated** | `SC-8` (*checkov*: `CKV_AWS_2`, `CKV_AWS_86`, `CKV_AWS_68`; *semgrep*: [`no-tls-verify`](rules/no-tls-verify.yaml)), `SC-7` (*checkov*: `CKV_AWS_24`, `CKV_AWS_25`, `CKV_AWS_88`, `CKV_AWS_130`) |
|
|
243
|
+
| Art-32-d | Regular Testing and Evaluation | ✅ **Automated** | `AU-2` (*checkov*: `CKV_AWS_67`, `CKV_AWS_35`, `CKV_AWS_1`; *soc2-agent*: `SOC2-002`) |
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
#### HIPAA Security Rule (45 CFR Part 164) (`hipaa`)
|
|
247
|
+
|
|
248
|
+
**Reference Ruleset / Standard:** [HIPAA Security Rule Regulations](https://www.hhs.gov/hipaa/for-professionals/security/laws-regulations/index.html)
|
|
249
|
+
|
|
250
|
+
| Control ID | Control Title | Automation Status | Mapped Rules / Heuristics |
|
|
251
|
+
| --- | --- | --- | --- |
|
|
252
|
+
| §164.312(a)(1) | Access Control Standard | ✅ **Automated** | `AC-3` (*checkov*: `CKV_AWS_53`, `CKV_AWS_54`, `CKV_AWS_55`, `CKV_AWS_56`, `CKV_AWS_62`; *hipaa-agent*: `HIPAA-002`), `AC-6` (*checkov*: `CKV_AWS_40`, `CKV_AWS_274`; *semgrep*: [`overpermissive-iam`](rules/overpermissive-iam.yaml)) |
|
|
253
|
+
| §164.312(a)(2)(iv) | Encryption and Decryption | ✅ **Automated** | `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`), `SC-28` (*checkov*: `CKV_AWS_17`, `CKV_AWS_27`, `CKV_AWS_77`, `CKV_AWS_84`, `CKV_AWS_189`, `CKV_AWS_211`; *dataflow-agent*: `DFA-001`; *gdpr-agent*: `GDPR-001`; *hipaa-agent*: `HIPAA-001`) |
|
|
254
|
+
| §164.312(b) | Audit Controls | ✅ **Automated** | `AU-2` (*checkov*: `CKV_AWS_67`, `CKV_AWS_35`, `CKV_AWS_1`; *soc2-agent*: `SOC2-002`) |
|
|
255
|
+
| §164.312(d) | Person or Entity Authentication | ✅ **Automated** | `IA-5` (*checkov*: `CKV_AWS_6`; *semgrep*: [`hardcoded-credential`](rules/hardcoded-credential.yaml)) |
|
|
256
|
+
| §164.312(e)(1) | Transmission Security Standard | ✅ **Automated** | `SC-8` (*checkov*: `CKV_AWS_2`, `CKV_AWS_86`, `CKV_AWS_68`; *semgrep*: [`no-tls-verify`](rules/no-tls-verify.yaml)) |
|
|
257
|
+
| §164.312(e)(2)(ii) | Encryption of Data in Transit | ✅ **Automated** | `SC-8` (*checkov*: `CKV_AWS_2`, `CKV_AWS_86`, `CKV_AWS_68`; *semgrep*: [`no-tls-verify`](rules/no-tls-verify.yaml)), `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`) |
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
#### ISO/IEC 27001:2022 (Information Security Management) (`iso27001`)
|
|
261
|
+
|
|
262
|
+
**Reference Ruleset / Standard:** [ISO/IEC 27001:2022 Standards](https://www.iso.org/standard/27001)
|
|
263
|
+
|
|
264
|
+
| Control ID | Control Title | Automation Status | Mapped Rules / Heuristics |
|
|
265
|
+
| --- | --- | --- | --- |
|
|
266
|
+
| A.9.4.1 | Information Access Restriction | ✅ **Automated** | `AC-3` (*checkov*: `CKV_AWS_53`, `CKV_AWS_54`, `CKV_AWS_55`, `CKV_AWS_56`, `CKV_AWS_62`; *hipaa-agent*: `HIPAA-002`), `AC-6` (*checkov*: `CKV_AWS_40`, `CKV_AWS_274`; *semgrep*: [`overpermissive-iam`](rules/overpermissive-iam.yaml)) |
|
|
267
|
+
| A.10.1.1 | Policy on Use of Cryptographic Controls | ✅ **Automated** | `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`) |
|
|
268
|
+
| A.10.1.2 | Key Management | ✅ **Automated** | `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`) |
|
|
269
|
+
| A.12.4.1 | Event Logging | ✅ **Automated** | `AU-2` (*checkov*: `CKV_AWS_67`, `CKV_AWS_35`, `CKV_AWS_1`; *soc2-agent*: `SOC2-002`) |
|
|
270
|
+
| A.12.4.3 | Administrator and Operator Logs | ✅ **Automated** | `AU-2` (*checkov*: `CKV_AWS_67`, `CKV_AWS_35`, `CKV_AWS_1`; *soc2-agent*: `SOC2-002`) |
|
|
271
|
+
| A.13.1.1 | Network Controls | ✅ **Automated** | `SC-7` (*checkov*: `CKV_AWS_24`, `CKV_AWS_25`, `CKV_AWS_88`, `CKV_AWS_130`) |
|
|
272
|
+
| A.13.1.3 | Segregation in Networks | ✅ **Automated** | `SC-7` (*checkov*: `CKV_AWS_24`, `CKV_AWS_25`, `CKV_AWS_88`, `CKV_AWS_130`) |
|
|
273
|
+
| A.13.2.1 | Information Transfer Policies | ✅ **Automated** | `SC-8` (*checkov*: `CKV_AWS_2`, `CKV_AWS_86`, `CKV_AWS_68`; *semgrep*: [`no-tls-verify`](rules/no-tls-verify.yaml)) |
|
|
274
|
+
| A.14.1.2 | Securing Application Services | ✅ **Automated** | `SC-8` (*checkov*: `CKV_AWS_2`, `CKV_AWS_86`, `CKV_AWS_68`; *semgrep*: [`no-tls-verify`](rules/no-tls-verify.yaml)), `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`) |
|
|
275
|
+
| A.18.1.5 | Regulation of Cryptographic Controls | ✅ **Automated** | `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`), `SC-28` (*checkov*: `CKV_AWS_17`, `CKV_AWS_27`, `CKV_AWS_77`, `CKV_AWS_84`, `CKV_AWS_189`, `CKV_AWS_211`; *dataflow-agent*: `DFA-001`; *gdpr-agent*: `GDPR-001`; *hipaa-agent*: `HIPAA-001`) |
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
#### NIST SP 800-53 Rev 5 (`nist-800-53`)
|
|
279
|
+
|
|
280
|
+
**Reference Ruleset / Standard:** [NIST SP 800-53 Rev. 5 Controls Reference](https://csrc.nist.gov/projects/cprt/controls#/cprt/framework/SP80053R5)
|
|
281
|
+
|
|
282
|
+
| Control ID | Control Title | Automation Status | Mapped Rules / Heuristics |
|
|
283
|
+
| --- | --- | --- | --- |
|
|
284
|
+
| SC-5 | Denial of Service Protection | ✅ **Automated** | *checkov*: `CKV_AWS_86`, `CKV_AWS_310` |
|
|
285
|
+
| SC-7 | Boundary Protection | ✅ **Automated** | *checkov*: `CKV_AWS_24`, `CKV_AWS_25`, `CKV_AWS_88`, `CKV_AWS_130` |
|
|
286
|
+
| SC-8 | Transmission Confidentiality and Integrity | ✅ **Automated** | *checkov*: `CKV_AWS_2`, `CKV_AWS_86`, `CKV_AWS_68`<br>*semgrep*: [`no-tls-verify`](rules/no-tls-verify.yaml) |
|
|
287
|
+
| SC-12 | Cryptographic Key Establishment and Management | ✅ **Automated** | *checkov*: `CKV_AWS_7`, `CKV_AWS_145`, `CKV_AWS_211`<br>*fedramp-agent*: `FEDRAMP-002` |
|
|
288
|
+
| SC-13 | Cryptographic Protection | ✅ **Automated** | *checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`<br>*semgrep*: [`weak-cipher`](rules/weak-cipher.yaml)<br>*dataflow-agent*: `DFA-001`<br>*fedramp-agent*: `FEDRAMP-001` |
|
|
289
|
+
| SC-28 | Protection of Information at Rest | ✅ **Automated** | *checkov*: `CKV_AWS_17`, `CKV_AWS_27`, `CKV_AWS_77`, `CKV_AWS_84`, `CKV_AWS_189`, `CKV_AWS_211`<br>*dataflow-agent*: `DFA-001`<br>*gdpr-agent*: `GDPR-001`<br>*hipaa-agent*: `HIPAA-001` |
|
|
290
|
+
| AC-2 | Account Management | ✅ **Automated** | *checkov*: `CKV_AWS_9`, `CKV_AWS_10`, `CKV_AWS_11`, `CKV_AWS_12`, `CKV_AWS_13`, `CKV_AWS_14` |
|
|
291
|
+
| AC-3 | Access Enforcement | ✅ **Automated** | *checkov*: `CKV_AWS_53`, `CKV_AWS_54`, `CKV_AWS_55`, `CKV_AWS_56`, `CKV_AWS_62`<br>*hipaa-agent*: `HIPAA-002` |
|
|
292
|
+
| AC-6 | Least Privilege | ✅ **Automated** | *checkov*: `CKV_AWS_40`, `CKV_AWS_274`<br>*semgrep*: [`overpermissive-iam`](rules/overpermissive-iam.yaml) |
|
|
293
|
+
| AC-17 | Remote Access | ✅ **Automated** | *checkov*: `CKV_AWS_88`, `CKV_AWS_130`, `CKV_AWS_184` |
|
|
294
|
+
| IA-2 | Identification and Authentication (Organizational Users) | ✅ **Automated** | *checkov*: `CKV_AWS_9`, `CKV_AWS_10` |
|
|
295
|
+
| IA-5 | Authenticator Management | ✅ **Automated** | *checkov*: `CKV_AWS_6`<br>*semgrep*: [`hardcoded-credential`](rules/hardcoded-credential.yaml) |
|
|
296
|
+
| AU-2 | Audit Events | ✅ **Automated** | *checkov*: `CKV_AWS_67`, `CKV_AWS_35`, `CKV_AWS_1`<br>*soc2-agent*: `SOC2-002` |
|
|
297
|
+
| AU-3 | Content of Audit Records | ✅ **Automated** | *checkov*: `CKV_AWS_252`<br>*semgrep*: [`missing-audit-log`](rules/missing-audit-log.yaml)<br>*gdpr-agent*: `GDPR-002`<br>*soc2-agent*: `SOC2-001` |
|
|
298
|
+
| AU-9 | Protection of Audit Information | ✅ **Automated** | *checkov*: `CKV_AWS_66` |
|
|
299
|
+
| CM-2 | Baseline Configuration | ✅ **Automated** | *checkov*: `CKV_AWS_8`, `CKV_AWS_79` |
|
|
300
|
+
| CM-6 | Configuration Settings | ✅ **Automated** | *checkov*: `CKV_AWS_34`, `CKV_AWS_95`, `CKV_AWS_150` |
|
|
301
|
+
| CM-7 | Least Functionality | ✅ **Automated** | *checkov*: `CKV_AWS_50`, `CKV_AWS_115`, `CKV_AWS_120` |
|
|
302
|
+
| SI-2 | Flaw Remediation | ✅ **Automated** | *checkov*: `CKV_AWS_130`, `CKV_AWS_161` |
|
|
303
|
+
| SI-3 | Malware Protection | ✅ **Automated** | *checkov*: `CKV_AWS_149`, `CKV_AWS_32` |
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
#### Internal Organization Security Policy (`org-policy`)
|
|
307
|
+
|
|
308
|
+
**Reference Ruleset / Standard:** Internal Acme Corp Security Policy
|
|
309
|
+
|
|
310
|
+
| Control ID | Control Title | Automation Status | Mapped Rules / Heuristics |
|
|
311
|
+
| --- | --- | --- | --- |
|
|
312
|
+
| ORG-ENC-1 | All Data Must Be Encrypted at Rest | ✅ **Automated** | `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`), `SC-28` (*checkov*: `CKV_AWS_17`, `CKV_AWS_27`, `CKV_AWS_77`, `CKV_AWS_84`, `CKV_AWS_189`, `CKV_AWS_211`; *dataflow-agent*: `DFA-001`; *gdpr-agent*: `GDPR-001`; *hipaa-agent*: `HIPAA-001`) |
|
|
313
|
+
| ORG-TLS-1 | All Transmissions Must Use TLS 1.2+ | ✅ **Automated** | `SC-8` (*checkov*: `CKV_AWS_2`, `CKV_AWS_86`, `CKV_AWS_68`; *semgrep*: [`no-tls-verify`](rules/no-tls-verify.yaml)), `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`) |
|
|
314
|
+
| ORG-NET-1 | No Unrestricted Inbound Network Access | ✅ **Automated** | `SC-7` (*checkov*: `CKV_AWS_24`, `CKV_AWS_25`, `CKV_AWS_88`, `CKV_AWS_130`) |
|
|
315
|
+
| ORG-ACC-1 | Enforce Least-Privilege Access Controls | ✅ **Automated** | `AC-3` (*checkov*: `CKV_AWS_53`, `CKV_AWS_54`, `CKV_AWS_55`, `CKV_AWS_56`, `CKV_AWS_62`; *hipaa-agent*: `HIPAA-002`), `AC-6` (*checkov*: `CKV_AWS_40`, `CKV_AWS_274`; *semgrep*: [`overpermissive-iam`](rules/overpermissive-iam.yaml)) |
|
|
316
|
+
| ORG-IAM-1 | Rotate and Expire Credentials Regularly | ✅ **Automated** | `IA-5` (*checkov*: `CKV_AWS_6`; *semgrep*: [`hardcoded-credential`](rules/hardcoded-credential.yaml)) |
|
|
317
|
+
| ORG-LOG-1 | Enable Audit Logging for All Services | ✅ **Automated** | `AU-2` (*checkov*: `CKV_AWS_67`, `CKV_AWS_35`, `CKV_AWS_1`; *soc2-agent*: `SOC2-002`) |
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
#### PCI DSS v4.0 (Payment Card Industry Data Security Standard) (`pci-dss`)
|
|
321
|
+
|
|
322
|
+
**Reference Ruleset / Standard:** [PCI DSS v4.0 Resource Center](https://www.pcisecuritystandards.org/)
|
|
323
|
+
|
|
324
|
+
| Control ID | Control Title | Automation Status | Mapped Rules / Heuristics |
|
|
325
|
+
| --- | --- | --- | --- |
|
|
326
|
+
| Req-2.2 | System Security Configuration | ✅ **Automated** | `SC-7` (*checkov*: `CKV_AWS_24`, `CKV_AWS_25`, `CKV_AWS_88`, `CKV_AWS_130`), `AC-3` (*checkov*: `CKV_AWS_53`, `CKV_AWS_54`, `CKV_AWS_55`, `CKV_AWS_56`, `CKV_AWS_62`; *hipaa-agent*: `HIPAA-002`) |
|
|
327
|
+
| Req-3.4 | Render PAN Unreadable Anywhere It Is Stored | ✅ **Automated** | `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`), `SC-28` (*checkov*: `CKV_AWS_17`, `CKV_AWS_27`, `CKV_AWS_77`, `CKV_AWS_84`, `CKV_AWS_189`, `CKV_AWS_211`; *dataflow-agent*: `DFA-001`; *gdpr-agent*: `GDPR-001`; *hipaa-agent*: `HIPAA-001`) |
|
|
328
|
+
| Req-4.1 | Strong Cryptography for Data in Transit | ✅ **Automated** | `SC-8` (*checkov*: `CKV_AWS_2`, `CKV_AWS_86`, `CKV_AWS_68`; *semgrep*: [`no-tls-verify`](rules/no-tls-verify.yaml)), `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`) |
|
|
329
|
+
| Req-7.1 | Limit Access to System Components | ✅ **Automated** | `AC-3` (*checkov*: `CKV_AWS_53`, `CKV_AWS_54`, `CKV_AWS_55`, `CKV_AWS_56`, `CKV_AWS_62`; *hipaa-agent*: `HIPAA-002`), `AC-6` (*checkov*: `CKV_AWS_40`, `CKV_AWS_274`; *semgrep*: [`overpermissive-iam`](rules/overpermissive-iam.yaml)) |
|
|
330
|
+
| Req-8.2 | Proper Identification and Authentication | ✅ **Automated** | `IA-5` (*checkov*: `CKV_AWS_6`; *semgrep*: [`hardcoded-credential`](rules/hardcoded-credential.yaml)) |
|
|
331
|
+
| Req-10.1 | Implement Audit Trails | ✅ **Automated** | `AU-2` (*checkov*: `CKV_AWS_67`, `CKV_AWS_35`, `CKV_AWS_1`; *soc2-agent*: `SOC2-002`) |
|
|
332
|
+
| Req-10.3 | Protect Audit Trails from Destruction | ✅ **Automated** | `AU-2` (*checkov*: `CKV_AWS_67`, `CKV_AWS_35`, `CKV_AWS_1`; *soc2-agent*: `SOC2-002`) |
|
|
333
|
+
| Req-6.4 | Address Common Security Vulnerabilities | ✅ **Automated** | `SC-7` (*checkov*: `CKV_AWS_24`, `CKV_AWS_25`, `CKV_AWS_88`, `CKV_AWS_130`), `SC-8` (*checkov*: `CKV_AWS_2`, `CKV_AWS_86`, `CKV_AWS_68`; *semgrep*: [`no-tls-verify`](rules/no-tls-verify.yaml)) |
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
#### SOC 2 Type II (Trust Services Criteria — AICPA 2017) (`soc2`)
|
|
337
|
+
|
|
338
|
+
**Reference Ruleset / Standard:** [AICPA SOC 2 Trust Services Criteria](https://www.aicpa-cima.com/resources/download/trust-services-criteria)
|
|
339
|
+
|
|
340
|
+
| Control ID | Control Title | Automation Status | Mapped Rules / Heuristics |
|
|
341
|
+
| --- | --- | --- | --- |
|
|
342
|
+
| CC1.1 | COSO Principle 1 — Integrity and Ethical Values | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
343
|
+
| CC1.2 | COSO Principle 2 — Board Independence and Oversight | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
344
|
+
| CC1.3 | COSO Principle 3 — Organizational Structure | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
345
|
+
| CC1.4 | COSO Principle 4 — Commitment to Competence | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
346
|
+
| CC1.5 | COSO Principle 5 — Accountability | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
347
|
+
| CC2.1 | COSO Principle 13 — Information Quality | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
348
|
+
| CC2.2 | COSO Principle 14 — Internal Communication | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
349
|
+
| CC2.3 | COSO Principle 15 — External Communication | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
350
|
+
| CC3.1 | COSO Principle 6 — Specify Objectives | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
351
|
+
| CC3.2 | COSO Principle 7 — Risk Identification | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
352
|
+
| CC3.3 | COSO Principle 8 — Risk Analysis | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
353
|
+
| CC3.4 | COSO Principle 9 — Risk Assessment | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
354
|
+
| CC4.1 | COSO Principle 16 — Ongoing Monitoring | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
355
|
+
| CC4.2 | COSO Principle 17 — Evaluation of Monitoring Results | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
356
|
+
| CC5.1 | COSO Principle 10 — Select and Develop Controls | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
357
|
+
| CC5.2 | COSO Principle 11 — Technology Controls | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
358
|
+
| CC5.3 | COSO Principle 12 — Deploy Control Activities | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
359
|
+
| CC6.1 | Logical Access — Encryption at Rest | ✅ **Automated** | `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`), `SC-28` (*checkov*: `CKV_AWS_17`, `CKV_AWS_27`, `CKV_AWS_77`, `CKV_AWS_84`, `CKV_AWS_189`, `CKV_AWS_211`; *dataflow-agent*: `DFA-001`; *gdpr-agent*: `GDPR-001`; *hipaa-agent*: `HIPAA-001`) |
|
|
360
|
+
| CC6.2 | Logical Access — Account Provisioning and Management | ✅ **Automated** | `AC-2` (*checkov*: `CKV_AWS_9`, `CKV_AWS_10`, `CKV_AWS_11`, `CKV_AWS_12`, `CKV_AWS_13`, `CKV_AWS_14`) |
|
|
361
|
+
| CC6.3 | Network Access — Boundary Protection | ✅ **Automated** | `SC-7` (*checkov*: `CKV_AWS_24`, `CKV_AWS_25`, `CKV_AWS_88`, `CKV_AWS_130`) |
|
|
362
|
+
| CC6.4 | Logical Access — Authentication | ✅ **Automated** | `IA-2` (*checkov*: `CKV_AWS_9`, `CKV_AWS_10`), `IA-5` (*checkov*: `CKV_AWS_6`; *semgrep*: [`hardcoded-credential`](rules/hardcoded-credential.yaml)) |
|
|
363
|
+
| CC6.5 | Logical Access — Credential Disposal | ✅ **Automated** | `IA-5` (*checkov*: `CKV_AWS_6`; *semgrep*: [`hardcoded-credential`](rules/hardcoded-credential.yaml)) |
|
|
364
|
+
| CC6.6 | Transmission Security | ✅ **Automated** | `SC-8` (*checkov*: `CKV_AWS_2`, `CKV_AWS_86`, `CKV_AWS_68`; *semgrep*: [`no-tls-verify`](rules/no-tls-verify.yaml)), `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`) |
|
|
365
|
+
| CC6.7 | Logical Access — Least Privilege | ✅ **Automated** | `AC-3` (*checkov*: `CKV_AWS_53`, `CKV_AWS_54`, `CKV_AWS_55`, `CKV_AWS_56`, `CKV_AWS_62`; *hipaa-agent*: `HIPAA-002`), `AC-6` (*checkov*: `CKV_AWS_40`, `CKV_AWS_274`; *semgrep*: [`overpermissive-iam`](rules/overpermissive-iam.yaml)) |
|
|
366
|
+
| CC6.8 | Malware and Unauthorized Software Protection | ✅ **Automated** | `CM-7` (*checkov*: `CKV_AWS_50`, `CKV_AWS_115`, `CKV_AWS_120`), `SI-3` (*checkov*: `CKV_AWS_149`, `CKV_AWS_32`) |
|
|
367
|
+
| CC7.1 | Configuration Baseline and Monitoring | ✅ **Automated** | `CM-2` (*checkov*: `CKV_AWS_8`, `CKV_AWS_79`), `CM-6` (*checkov*: `CKV_AWS_34`, `CKV_AWS_95`, `CKV_AWS_150`) |
|
|
368
|
+
| CC7.2 | System Monitoring and Audit Logging | ✅ **Automated** | `AU-2` (*checkov*: `CKV_AWS_67`, `CKV_AWS_35`, `CKV_AWS_1`; *soc2-agent*: `SOC2-002`), `AU-3` (*checkov*: `CKV_AWS_252`; *semgrep*: [`missing-audit-log`](rules/missing-audit-log.yaml); *gdpr-agent*: `GDPR-002`; *soc2-agent*: `SOC2-001`) |
|
|
369
|
+
| CC7.3 | Evaluation of Security Events | ✅ **Automated** | `AU-3` (*checkov*: `CKV_AWS_252`; *semgrep*: [`missing-audit-log`](rules/missing-audit-log.yaml); *gdpr-agent*: `GDPR-002`; *soc2-agent*: `SOC2-001`), `AU-9` (*checkov*: `CKV_AWS_66`) |
|
|
370
|
+
| CC7.4 | Incident Response and Recovery | ✅ **Automated** | `SI-2` (*checkov*: `CKV_AWS_130`, `CKV_AWS_161`), `AU-3` (*checkov*: `CKV_AWS_252`; *semgrep*: [`missing-audit-log`](rules/missing-audit-log.yaml); *gdpr-agent*: `GDPR-002`; *soc2-agent*: `SOC2-001`) |
|
|
371
|
+
| CC7.5 | Incident Response — Post-Incident Review | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
372
|
+
| CC8.1 | Change Management — Authentication and Integrity | ✅ **Automated** | `IA-5` (*checkov*: `CKV_AWS_6`; *semgrep*: [`hardcoded-credential`](rules/hardcoded-credential.yaml)), `CM-2` (*checkov*: `CKV_AWS_8`, `CKV_AWS_79`) |
|
|
373
|
+
| CC8.2 | Change Management — Approval and Segregation of Duties | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
374
|
+
| CC9.1 | Risk Mitigation Strategy | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
375
|
+
| CC9.2 | Vendor and Business Partner Risk | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
376
|
+
| A1.1 | Availability — Denial of Service Protection | ✅ **Automated** | `SC-5` (*checkov*: `CKV_AWS_86`, `CKV_AWS_310`) |
|
|
377
|
+
| A1.2 | Availability — Boundary and Environmental Controls | ✅ **Automated** | `SC-7` (*checkov*: `CKV_AWS_24`, `CKV_AWS_25`, `CKV_AWS_88`, `CKV_AWS_130`) |
|
|
378
|
+
| A1.3 | Availability — Recovery and Backup Testing | ❌ **Manual** | *Governance control (requires manual evidence review)* |
|
|
379
|
+
| C1.1 | Confidentiality — Encryption of Confidential Data | ✅ **Automated** | `SC-13` (*checkov*: `CKV_AWS_19`, `CKV_AWS_5`, `CKV_AWS_145`; *semgrep*: [`weak-cipher`](rules/weak-cipher.yaml); *dataflow-agent*: `DFA-001`; *fedramp-agent*: `FEDRAMP-001`), `SC-28` (*checkov*: `CKV_AWS_17`, `CKV_AWS_27`, `CKV_AWS_77`, `CKV_AWS_84`, `CKV_AWS_189`, `CKV_AWS_211`; *dataflow-agent*: `DFA-001`; *gdpr-agent*: `GDPR-001`; *hipaa-agent*: `HIPAA-001`) |
|
|
380
|
+
| C1.2 | Confidentiality — Disposal of Confidential Data | ✅ **Automated** | `SC-28` (*checkov*: `CKV_AWS_17`, `CKV_AWS_27`, `CKV_AWS_77`, `CKV_AWS_84`, `CKV_AWS_189`, `CKV_AWS_211`; *dataflow-agent*: `DFA-001`; *gdpr-agent*: `GDPR-001`; *hipaa-agent*: `HIPAA-001`) |
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
<!-- MATRIX_END -->
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## Scan modes
|
|
388
|
+
|
|
389
|
+
| Mode | What runs | Use case |
|
|
390
|
+
|---|---|---|
|
|
391
|
+
| `diff` | PR inline comments + severity gate | Fast PR feedback; no posture outputs |
|
|
392
|
+
| `full` | Coverage matrix, OSCAL, aggregate SARIF | Scheduled compliance snapshots; no PR gate |
|
|
393
|
+
| `both` | All of the above (default) | Recommended for PRs — gate on every push, posture on every merge |
|
|
394
|
+
|
|
395
|
+
---
|
|
396
|
+
|
|
397
|
+
## How it works
|
|
398
|
+
|
|
399
|
+
```
|
|
400
|
+
git diff ──────────────────────────────────────────────────────────────────────┐
|
|
401
|
+
│ diff-filter
|
|
402
|
+
Checkov ──────────► SARIF ─┐ │ (PR-changed
|
|
403
|
+
Semgrep ──────────► SARIF ─┤ │ lines only)
|
|
404
|
+
CodeQL (optional) ► SARIF ─┤ │
|
|
405
|
+
Detection agents ► SARIF ─┴──► normalize ──► Finding[] │
|
|
406
|
+
(GDPR, HIPAA, │ │
|
|
407
|
+
SOC2, FedRAMP, enrich (evidence + │
|
|
408
|
+
OrgPolicy, doc context) │
|
|
409
|
+
DataFlow) │ │
|
|
410
|
+
data-flow analysis │
|
|
411
|
+
│ │
|
|
412
|
+
└──── diff-filtered ─────────┤
|
|
413
|
+
│
|
|
414
|
+
┌────────────────────────────────────────┘
|
|
415
|
+
▼
|
|
416
|
+
map to framework controls
|
|
417
|
+
│
|
|
418
|
+
adjudicate (AI ensemble,
|
|
419
|
+
if enabled)
|
|
420
|
+
│
|
|
421
|
+
confidence gate
|
|
422
|
+
│
|
|
423
|
+
┌─────────────────┼──────────────────────┐
|
|
424
|
+
▼ ▼ ▼
|
|
425
|
+
PR inline comments severity gate posture outputs
|
|
426
|
+
(control-tagged, (exit 1 if ≥ (OSCAL, coverage
|
|
427
|
+
evidence-backed) fail-on threshold) matrix, SARIF)
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
**Detection is never re-implemented.** Checkov, Semgrep, and CodeQL run as subprocesses and emit SARIF. Framework-specific detection agents (`GDPRAgent`, `HIPAAAgent`, `SOC2Agent`, `FedRAMPAgent`, `OrgPolicyAgent`, `DataFlowAgent`) apply heuristics for controls that engines cannot observe directly — they also emit SARIF. `normalize.py` converts all SARIF to a common `Finding` model. Pack YAML files map `(engine, check_id)` pairs to control IDs.
|
|
431
|
+
|
|
432
|
+
### Authored Semgrep rules
|
|
433
|
+
|
|
434
|
+
Seven rules ship alongside the action to cover gaps not detectable by Checkov:
|
|
435
|
+
|
|
436
|
+
| Rule ID | What it catches |
|
|
437
|
+
|---|---|
|
|
438
|
+
| `weak-cipher` | DES / RC4 / MD5 usage in Python |
|
|
439
|
+
| `hardcoded-credential` | Secrets assigned to variables |
|
|
440
|
+
| `no-tls-verify` | TLS verification disabled |
|
|
441
|
+
| `overpermissive-iam` | Wildcard IAM actions or resources |
|
|
442
|
+
| `missing-audit-log` | Logging / audit trail not configured |
|
|
443
|
+
| `insecure-config` | Insecure configuration flags (debug mode, plaintext storage) |
|
|
444
|
+
| `pii-fields` | PII field names in data models and API schemas |
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
## AI adjudication
|
|
449
|
+
|
|
450
|
+
When `adjudication-mode` is `advisory` or `enforce`, each finding passes through a four-role LLM ensemble before the confidence gate:
|
|
451
|
+
|
|
452
|
+
1. **Detector** — establishes an initial confidence assessment, acting as a compliance auditor.
|
|
453
|
+
2. **Verifier** — argues why the finding is a genuine compliance violation.
|
|
454
|
+
3. **Adversarial** — argues why the finding is a false positive.
|
|
455
|
+
4. **Judge** — weighs both arguments and produces the final consensus score.
|
|
456
|
+
|
|
457
|
+
### Confidence scoring
|
|
458
|
+
|
|
459
|
+
The final composite score is a weighted average of six signals:
|
|
460
|
+
|
|
461
|
+
| Signal | Weight | Source |
|
|
462
|
+
|---|---|---|
|
|
463
|
+
| Rule confidence | 20% | Emitted by the engine or agent in SARIF |
|
|
464
|
+
| Data-flow confidence | 20% | Source-to-sink flow analysis (`dataflow.py`) |
|
|
465
|
+
| Model consensus | 25% | Judge's agreement score from the AI ensemble |
|
|
466
|
+
| Evidence confidence | 15% | Richness of code snippets and PR / commit file context |
|
|
467
|
+
| Control severity | 10% | Criticality rank of the mapped control |
|
|
468
|
+
| Historical precision | 10% | Long-term true-positive rate tracked per check ID |
|
|
469
|
+
|
|
470
|
+
A finding whose composite score falls below `min-confidence` (default `0.70`) is suppressed when `adjudication-mode: enforce`. In `advisory` mode the score is logged but no finding is filtered. In `off` mode (default) no LLM calls are made.
|
|
471
|
+
|
|
472
|
+
### Configuring model routing
|
|
473
|
+
|
|
474
|
+
Create `audit-models.yaml` in your repo root to map each role to a provider and model. The action falls back to built-in defaults if the file is absent.
|
|
475
|
+
|
|
476
|
+
```yaml
|
|
477
|
+
# audit-models.yaml
|
|
478
|
+
models:
|
|
479
|
+
detector:
|
|
480
|
+
provider: openai
|
|
481
|
+
model: gpt-4o
|
|
482
|
+
api_key_env: OPENAI_API_KEY
|
|
483
|
+
|
|
484
|
+
verifier:
|
|
485
|
+
provider: anthropic
|
|
486
|
+
model: claude-opus-4-5
|
|
487
|
+
api_key_env: ANTHROPIC_API_KEY
|
|
488
|
+
|
|
489
|
+
adversarial:
|
|
490
|
+
provider: google
|
|
491
|
+
model: gemini-1.5-pro
|
|
492
|
+
api_key_env: GOOGLE_API_KEY
|
|
493
|
+
|
|
494
|
+
judge:
|
|
495
|
+
provider: openai
|
|
496
|
+
model: gpt-4o
|
|
497
|
+
api_key_env: OPENAI_API_KEY
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
Supported providers: `openai`, `anthropic`, `google`, `ollama`, `openai-compatible`. Supply the corresponding API key secrets as environment variables on the step.
|
|
501
|
+
|
|
502
|
+
You can also override individual roles without a config file using per-role inputs:
|
|
503
|
+
|
|
504
|
+
```yaml
|
|
505
|
+
- uses: prakharsingh/audit-packs@v1
|
|
506
|
+
with:
|
|
507
|
+
frameworks: nist-800-53
|
|
508
|
+
adjudication-mode: enforce
|
|
509
|
+
judge-model: gpt-4o-mini # cheaper judge for high-volume repos
|
|
510
|
+
env:
|
|
511
|
+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
512
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
513
|
+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
---
|
|
517
|
+
|
|
518
|
+
## Custom org-policy pack
|
|
519
|
+
|
|
520
|
+
Edit `packs/org-policy/controls.yaml` to define internal controls and map them to NIST 800-53 controls:
|
|
521
|
+
|
|
522
|
+
```yaml
|
|
523
|
+
id: org-policy
|
|
524
|
+
title: Acme Corp Security Policy
|
|
525
|
+
crosswalk: nist-800-53
|
|
526
|
+
|
|
527
|
+
controls:
|
|
528
|
+
- { id: ACME-ENC-1, title: All data stores must be encrypted at rest, maps_to: [SC-13, SC-28] }
|
|
529
|
+
- { id: ACME-NET-1, title: No public S3 buckets permitted, maps_to: [SC-7] }
|
|
530
|
+
- { id: ACME-LOG-1, title: Enable audit logging for all services, maps_to: [AU-2] }
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
Any check ID already mapped in `packs/nist-800-53/controls.yaml` is automatically surfaced under your org control ID with no other changes required.
|
|
534
|
+
|
|
535
|
+
---
|
|
536
|
+
|
|
537
|
+
## CodeQL integration
|
|
538
|
+
|
|
539
|
+
audit-packs can consume CodeQL SARIF artifacts to combine SAST findings with IaC findings in a single compliance view. Run `codeql-action/analyze` with `upload: false`, then pass the output directory to audit-packs:
|
|
540
|
+
|
|
541
|
+
```yaml
|
|
542
|
+
- name: Initialize CodeQL
|
|
543
|
+
uses: github/codeql-action/init@v3
|
|
544
|
+
with:
|
|
545
|
+
languages: python,javascript
|
|
546
|
+
|
|
547
|
+
- name: Perform CodeQL Analysis
|
|
548
|
+
uses: github/codeql-action/analyze@v3
|
|
549
|
+
with:
|
|
550
|
+
output: codeql-results # write SARIF to this directory
|
|
551
|
+
upload: false # prevent double-upload; audit-packs handles it
|
|
552
|
+
|
|
553
|
+
- uses: prakharsingh/audit-packs@v1
|
|
554
|
+
with:
|
|
555
|
+
frameworks: nist-800-53,soc2
|
|
556
|
+
codeql-sarif: codeql-results
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
If `codeql-sarif` is absent or the directory is empty, CodeQL findings are silently skipped — the rest of the scan runs normally.
|
|
560
|
+
|
|
561
|
+
---
|
|
562
|
+
|
|
563
|
+
## Local development
|
|
564
|
+
|
|
565
|
+
For complete setup and configuration details, see the [Setup & Integration Guide](docs/SETUP.md).
|
|
566
|
+
|
|
567
|
+
**Prerequisites:** Python 3.11+, `git`, [`uv`](https://docs.astral.sh/uv/) (recommended for the workspace install)
|
|
568
|
+
|
|
569
|
+
### Install (choose one)
|
|
570
|
+
|
|
571
|
+
**For running the CLI against your own repos:**
|
|
572
|
+
```bash
|
|
573
|
+
pipx install audit-packs
|
|
574
|
+
pipx inject audit-packs checkov semgrep # optional scanners
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
**For contributing / running tests:**
|
|
578
|
+
```bash
|
|
579
|
+
# Clone the repo
|
|
580
|
+
git clone https://github.com/prakharsingh/audit-packs.git
|
|
581
|
+
cd audit-packs
|
|
582
|
+
|
|
583
|
+
# Install all workspace packages editably + dev deps via uv
|
|
584
|
+
uv sync
|
|
585
|
+
|
|
586
|
+
# Or install editably via pipx from source
|
|
587
|
+
pipx install ./packages/action --force
|
|
588
|
+
pipx inject audit-packs \
|
|
589
|
+
./packages/core ./packages/mapping ./packages/evidence ./packages/ai --force
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
### Running tests
|
|
593
|
+
|
|
594
|
+
```bash
|
|
595
|
+
# Run all tests
|
|
596
|
+
pytest -v
|
|
597
|
+
|
|
598
|
+
# Run a single test file
|
|
599
|
+
pytest tests/test_packs.py -v
|
|
600
|
+
|
|
601
|
+
# Run a single test
|
|
602
|
+
pytest tests/test_packs.py::test_map_findings_crosswalk_soc2 -v
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
### After editing a package (pipx installs)
|
|
606
|
+
|
|
607
|
+
```bash
|
|
608
|
+
# Reinstall only changed packages
|
|
609
|
+
pipx inject audit-packs ./packages/action ./packages/mapping --force
|
|
610
|
+
|
|
611
|
+
# Test from any git repo — uses bundled default rules for Semgrep if rules-path is omitted
|
|
612
|
+
audit-packs --frameworks nist-800-53,soc2 \
|
|
613
|
+
--packs-dir ~/projects/audit-packs/packs
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
**Build the Docker action image:**
|
|
617
|
+
|
|
618
|
+
```bash
|
|
619
|
+
docker build -t audit-packs:dev .
|
|
620
|
+
```
|
|
621
|
+
|
|
622
|
+
**Run the Docker smoke test:**
|
|
623
|
+
|
|
624
|
+
```bash
|
|
625
|
+
pytest tests/test_docker_smoke.py -v
|
|
626
|
+
# or directly:
|
|
627
|
+
./tests/docker_smoke.sh
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
### Project layout
|
|
631
|
+
|
|
632
|
+
The Python source is organized as a `uv` workspace of five packages under `packages/`. Each package is independently installable and declares its inter-package dependencies in its own `pyproject.toml`.
|
|
633
|
+
|
|
634
|
+
```
|
|
635
|
+
packages/
|
|
636
|
+
core/src/audit_packs_core/ # pure-Python primitives, no network/subprocess
|
|
637
|
+
models.py # Finding, ControlFinding, ControlStatus, AdjudicationResult dataclasses
|
|
638
|
+
diff.py # parse_unified_diff() → {file: set[line]}
|
|
639
|
+
normalize.py # sarif_to_findings(); extract_rule_confidences()
|
|
640
|
+
dataflow.py # extract_data_flows() (Python / HCL / YAML), flow_confidence()
|
|
641
|
+
|
|
642
|
+
mapping/src/audit_packs_mapping/ # depends on: core
|
|
643
|
+
packs.py # load_pack(), iter_controls(), map_findings() — control mapping + NIST crosswalk
|
|
644
|
+
coverage.py # compute_coverage() → list[ControlStatus]
|
|
645
|
+
oscal.py # to_assessment_results() — NIST OSCAL assessment-results JSON
|
|
646
|
+
|
|
647
|
+
evidence/src/audit_packs_evidence/ # depends on: core
|
|
648
|
+
evidence.py # enrich(), fetch_pr_context() [GitHub API], evidence_confidence()
|
|
649
|
+
agents.py # GDPRAgent, HIPAAAgent, SOC2Agent, FedRAMPAgent, OrgPolicyAgent, DataFlowAgent
|
|
650
|
+
|
|
651
|
+
ai/src/audit_packs_ai/ # depends on: core, mapping; optional LLM SDKs via [ai] extra
|
|
652
|
+
adjudicate.py # AI ensemble (detector → verifier → adversarial → judge) [LLM HTTP]
|
|
653
|
+
confidence.py # score_finding(), apply_confidence_gate(), DEFAULT_WEIGHTS
|
|
654
|
+
|
|
655
|
+
action/src/audit_packs_action/ # depends on: core, mapping, evidence, ai — top-level entrypoint
|
|
656
|
+
cli.py # analyze() (diff path) + assess() (full path) + main()
|
|
657
|
+
engines.py # CheckovEngine, SemgrepEngine, CodeQLEngine (async + sync fallback)
|
|
658
|
+
report.py # build_comments(), post_review(), build_coverage_matrix(), build_sarif()
|
|
659
|
+
|
|
660
|
+
packs/ # Framework YAML packs (data only — no detection logic)
|
|
661
|
+
nist-800-53/controls.yaml # canonical: (engine, check_id) → control
|
|
662
|
+
soc2/controls.yaml, gdpr/controls.yaml, hipaa/controls.yaml,
|
|
663
|
+
iso27001/controls.yaml, pci-dss/controls.yaml, fedramp/controls.yaml,
|
|
664
|
+
org-policy/controls.yaml # all crosswalk → nist-800-53
|
|
665
|
+
|
|
666
|
+
rules/ # Authored Semgrep rules bundled with the action
|
|
667
|
+
weak-cipher.yaml no-tls-verify.yaml pii-fields.yaml
|
|
668
|
+
insecure-config.yaml hardcoded-credential.yaml
|
|
669
|
+
overpermissive-iam.yaml missing-audit-log.yaml
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
The dependency graph is acyclic: `core` → `mapping` → `ai` and `core` → `evidence`, with `action` depending on all four. Only `ai` pulls optional LLM SDKs (via its `[ai]` extra).
|
|
673
|
+
|
|
674
|
+
**Key design constraints:**
|
|
675
|
+
- Detection is never re-implemented. Engines run as subprocesses; findings arrive as SARIF.
|
|
676
|
+
- Packs are data, not code. A framework pack is pure YAML mapping check IDs to controls.
|
|
677
|
+
- Network and subprocess I/O is confined to four modules: `engines.py`, `evidence.py`, `adjudicate.py`, `report.py`. Everything else is pure Python and testable without network access or installed tools.
|
|
678
|
+
|
|
679
|
+
---
|
|
680
|
+
|
|
681
|
+
## Contributing
|
|
682
|
+
|
|
683
|
+
Contributions are welcome! Please refer to [CONTRIBUTING.md](CONTRIBUTING.md) for local development setup, guidelines on adding framework packs or custom rules, and pull request requirements.
|
|
684
|
+
|
|
685
|
+
---
|
|
686
|
+
|
|
687
|
+
## License
|
|
688
|
+
|
|
689
|
+
[Apache-2.0](LICENSE)
|