Skip to main content

Compliance Core (compliance-core)

Universal, multi-stack codebase compliance and security auditing engine. Scans Python, TypeScript, JavaScript, Docker, Kubernetes, and dependencies (pip, npm), automatically mapping findings to ISO 27001, ISO 42001 (AI Management), GDPR, DPDP Act (India), and SOX Section 404.


⚡ Quickstart

1. Installation

pip install compliance-core
# Or in editable mode from source:
pip install -e ./packages/compliance_core

2. CLI Usage

# Scan current directory and print console summary
compliance-scan .

# Generate a JSON report matching the Compliance Cockpit UI schema
compliance-scan . --format json --output compliance-report.json

# Generate a self-contained HTML executive audit report
compliance-scan . --format html --output audit-report.html

3. Python SDK Usage

from compliance_core import ComplianceEngine

# Initialize scanner on any repository path
engine = ComplianceEngine(root_path=".")
report = engine.scan()

print(f"Overall Regulatory Readiness: {report.readiness_score}%")
print(f"Standards Passing: {report.standards_passing}")
print(f"Total Findings: {len(report.findings)}")

4. Drop-in FastAPI Integration

Expose /api/v1/compliance/summary in your existing FastAPI service with just two lines of code:

from fastapi import FastAPI
from compliance_core.integrations.fastapi import get_compliance_router

app = FastAPI()

# Mount compliance router directly
app.include_router(get_compliance_router(scan_root="."), prefix="/api/v1")

🛡️ Scanned Vectors & Standards Coverage

  1. Python Backend SAST: Unsafe deserialization, shell injection, weak cryptography, insecure ciphers.
  2. Frontend SAST: DOM XSS (innerHTML, bypassSecurityTrustHtml), insecure eval, localStorage token storage.
  3. Dual Supply Chain Audit: pip-audit / requirements.txt and package.json against the Google OSV (Open Source Vulnerability) database.
  4. Secret & Key Detection: High-entropy analysis and 50+ token regex patterns across all code files.
  5. SQL Injection: AST and regex detection of string interpolation in SQL statements.
  6. Container & IaC: Root execution, unpinned tags, exposed sensitive ports, security context issues.
  7. Tamper-Proof Audit Chain: Computes sequential SHA-256 Merkle hashes for audit report provenance.

Metadata

Release files for compliance-core 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for compliance-core 1.0.4
File Size Uploaded Provenance Actions
compliance_core-1.0.4.tar.gz 62.0 kB Without provenance Details for compliance_core-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for compliance-core 1.0.4
File Interpreter ABI Platform Actions
compliance_core-1.0.4-py3-none-any.whl Python 3 none any Details for compliance_core-1.0.4-py3-none-any.whl

Total release size: 135.8 kB

Release files / compliance_core-1.0.4.tar.gz

Download URL compliance_core-1.0.4.tar.gz
Size 62.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7de5951f94cc84d0f16e9fa28cb6d2d7c4f906acdbd4f9c03247f2c4bf1c7d5d
BLAKE2b-256 checksum
How to use checksums
58d8aa1cf87297ebdf9ce3bc4302f85b17f118dfb6f324abd3b12a8ab1501c43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Release files / compliance_core-1.0.4-py3-none-any.whl

Download URL compliance_core-1.0.4-py3-none-any.whl
Size 73.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c86119b15226216f60a8e3868f627521af013f6fdd6c6cba894676c5af27f4e8
BLAKE2b-256 checksum
How to use checksums
d5549b62b5a9b5ddf3357ad506970752bf6fce4d25c20dc0f51e007c6a24b774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Security for compliance-core 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page