Skip to main content

audit-packs

PyPI version Python Downloads License GitHub Repository

Audit-Packs Banner

An evidence-first Compliance Intelligence Engine that transforms security scanner findings into standardized, evidence-backed compliance artifacts (inline PR comments, OSCAL assessment results, SARIF, and control coverage reports).


🔍 The Problem

Modern security scanners (such as Checkov, Semgrep, Trivy, tfsec, and gitleaks) are highly effective at identifying infrastructure-as-code (IaC) misconfigurations and software vulnerabilities. However, they are scanner-centric and do not directly answer the critical questions that governance, risk, and compliance (GRC) teams or auditors ask:

  • Which compliance controls (e.g., NIST 800-53, SOC 2, HIPAA, GDPR) are affected by this finding?
  • Where is the exact code/configuration evidence to prove compliance or violation?
  • How do we avoid false-positive alerts bloating our engineering workflows?

💡 The Solution

audit-packs bridges the gap by providing a scanner-agnostic mapping, enrichment, and consensus layer. Rather than replacing existing detection tools, it takes their output (typically via SARIF), normalizes it, enriches it with codebase/git evidence context, maps the findings to GRC control requirements, and optionally filters noise using an AI consensus ensemble.


📦 Installation

To run audit-packs locally as a CLI tool:

# Install audit-packs CLI via pip
pip install audit-packs

# Or install in an isolated environment via pipx (recommended)
pipx install audit-packs

Note: Detection is delegated to best-in-class open-source engines. For the scanners to run, ensure they are installed on your system path, or inject them into the pipx environment:

pipx inject audit-packs checkov semgrep

🚀 Quick Start

1. Initialize Configuration

Bootstrap your repository with a default configuration and download local compliance packs:

audit-packs --init

2. Run a Compliance Scan

Scan your workspace and map findings to NIST 800-53 and SOC 2 frameworks:

audit-packs --frameworks nist-800-53,soc2

📋 CLI Command Matrix & Flags

Flag Default Description
--frameworks Required Comma-separated list of framework pack IDs to evaluate (e.g., nist-800-53,soc2).
--fail-on high Minimum finding severity to exit with a non-zero status. Options: low, medium, high, critical.
--scan-mode both Scan scope: diff (PR-changed lines only), full (entire posture), or both.
--base-ref origin/main Target base git reference for diff-only scanning.
--packs-dir bundled Path to custom compliance pack YAML directory.
--rules-path bundled Path to Semgrep rule files.
--emit-oscal true Generate an OSCAL assessment-results JSON document (oscal.json).
--emit-coverage true Generate markdown/HTML control coverage matrix files (coverage.md/coverage.html).
--emit-sarif true Generate an aggregated SARIF report file (audit-packs.sarif).
--adjudication-mode off AI consensus adjudication: off (disabled), advisory (score findings), or enforce (suppress low-confidence findings).
--min-confidence 0.70 Composite confidence score threshold (0.0 to 1.0) under enforce mode.
--init N/A Interactive config bootstrapper wizard.
--validate-policy N/A Syntax validation command for custom compliance pack YAMLs.

🌐 GitHub Action Integration

audit-packs is designed to run seamlessly in GitHub Action pipelines to block compliance regressions on pull requests.

# .github/workflows/compliance-audit.yml
name: Compliance Audit

on:
  pull_request:

jobs:
  audit:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      pull-requests: write # Required to post inline review comments

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0 # Required for diff-only scanning

      - name: Run Audit Packs compliance check
        uses: prakharsingh/audit-packs@v1
        with:
          frameworks: nist-800-53,soc2
          fail-on: high

📊 Supported Compliance Frameworks

Compliance frameworks are defined as declarative YAML packs. The following packs are supported:

Framework Pack ID Automated Controls
NIST SP 800-53 Rev 5 nist-800-53 20 (Canonical baseline)
SOC 2 Type II soc2 17 (Technical criteria)
ISO/IEC 27001:2022 iso27001 10
PCI-DSS v4.0 pci-dss 8
FedRAMP Moderate fedramp 8
HIPAA Security Rule hipaa 6
GDPR gdpr 5
Custom Org-Policy org-policy Configurable

📤 Output Artifacts

  • Inline PR Comments: Posts targeted comments containing control mappings and cryptographic/configuration evidence on changed lines of a PR.
  • OSCAL Assessment Results: Machine-readable oscal.json compliant with NIST SP 800-53 GRC tooling workflows.
  • Coverage Reports: Beautiful coverage.md and coverage.html containing an audit-ready compliance matrix.
  • Aggregated SARIF: A combined audit-packs.sarif file containing all scanner findings mapped to controls.

📦 Ecosystem Architecture

audit-packs is built as a modular ecosystem consisting of five Python packages:

Package PyPI Link Role Standalone?
audit-packs PyPI Main CLI & Action entrypoint Yes
audit-packs-core PyPI Primitives, diff parsing, normalization No
audit-packs-mapping PyPI Compliance pack loader & OSCAL exporter No
audit-packs-evidence PyPI Evidence collectors & heuristic agents No
audit-packs-ai PyPI LLM consensus & confidence scoring No

🤝 Contributing & Backtrack Links

📄 License

This project is licensed under the Apache-2.0 License. See the LICENSE file in the main repository for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

audit_packs-0.6.1.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audit_packs-0.6.1-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file audit_packs-0.6.1.tar.gz.

File metadata

  • Download URL: audit_packs-0.6.1.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for audit_packs-0.6.1.tar.gz
Algorithm Hash digest
SHA256 d71f48bb209e6b45c8b60a2259b2f34a2a05e67deaf09326863303a24311f6f2
MD5 f6b6e7a3160b1b11e9d33ca5881352d6
BLAKE2b-256 9f95a5dfcfab48d94bd8491da2d539a9a841f24ca8c43517457f2b2eb0c9a82d

See more details on using hashes here.

File details

Details for the file audit_packs-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: audit_packs-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 39.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for audit_packs-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dabe4c94a52155a3f202c83976bfc239fc2b4dee77371a4f1f197fb0b2a12d97
MD5 d3c89582e72e944b10b7276a4119c8f6
BLAKE2b-256 1f7f3b5042f0f73885a6f7350d43abc5325a85c9c6ada608b196ec09f6b38907

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page