Skip to main content

Regulatory compliance scoring for any codebase

Project description

grc-engine

Regulatory compliance scoring for any codebase in under 60 seconds.

pip install grc-engine
grc scan .

Quickstart

# Install
pip install grc-engine

# Scan your codebase
grc scan .

# Output:
#   GRC Engine v0.1.0 — Compliance Scorecard
#   ─────────────────────────────────────────
#   DORA          ████████░░  72%  (5/7 controls matched)
#   ISO 27001     ████░░░░░░  45%  (3/6 controls matched)
#   AI Act        ███░░░░░░░  31%  (2/6 controls matched)
#
#   Top Gaps:
#   1. DORA:Article_9 (critical) — No ICT incident reporting detected
#   2. ISO27001:A.8.25 (critical) — No secure development lifecycle

Features

  • 62 compliance patterns across 3 regulations (DORA, ISO 27001, AI Act)
  • Zero external dependencies — SQLite + regex, no API keys, no config
  • < 60 second scans — regex-based pattern matching, not LLM inference
  • CI/CD readygrc scan . --fail-under 80 as a quality gate
  • Three output formats — Rich terminal scorecard, JSON, Markdown

Supported Regulations

Regulation Patterns Status
DORA (EU Digital Operational Resilience Act) 27 Supported
ISO 27001 (Annex A 2022) 16 Supported
AI Act (EU Artificial Intelligence Act) 19 Supported
GDPR Coming soon
NIS2 Coming soon

CLI Reference

# Scan with options
grc scan .                              # All 3 regulations
grc scan . --regulation DORA            # Single regulation
grc scan src/ --extensions .py,.yaml    # Filter by file type
grc scan . --output report.json         # Save report
grc scan . --format json                # json | markdown | text
grc scan . --fail-under 80             # CI/CD quality gate (exit 1 if below)

# Evidence tracking
grc evidence init                       # Create evidence.db
grc evidence list                       # Show recorded evidence
grc evidence export --format json       # Export for auditors

# Inspect patterns
grc patterns list                       # All patterns
grc patterns list --regulation DORA     # Filter by regulation
grc patterns show DORA:Article_9        # Detail for one control

Python API

from grc_engine import scan, Score

# One-liner: scan and get scores
result = scan("/path/to/code")
print(result.scores)
# {"DORA": Score(pct=72.0, matched=5, total=7),
#  "ISO 27001": Score(pct=45.0, matched=3, total=6)}

# Per-regulation scan
result = scan("/path/to/code", regulation="DORA")
print(result.gaps)          # [Gap(control_id="DORA:Article_9", ...)]
print(result.to_json())     # Full JSON report
print(result.to_markdown()) # Markdown for docs/PRs

# Evidence store (optional, for tracking over time)
from grc_engine.evidence import EvidenceStore

store = EvidenceStore("./evidence.db")
store.record(result)

How It Works

grc-engine scans your source code with 62 regex patterns that detect compliance-relevant constructs:

  • Risk management frameworks, incident response procedures
  • Authentication mechanisms, access controls, encryption
  • CI/CD pipelines, code review enforcement, vulnerability scanning
  • AI model governance, bias detection, audit logging

Each pattern maps to a specific regulatory control (e.g., DORA:Article_9). The scoring engine calculates per-regulation compliance percentages using a weighted model (70% completeness + 30% critical control coverage).

License

MIT

Project details


Download files

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

Source Distribution

grc_engine-0.1.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

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

grc_engine-0.1.0-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file grc_engine-0.1.0.tar.gz.

File metadata

  • Download URL: grc_engine-0.1.0.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for grc_engine-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9491d4b1a93ffb64f7e6104fd82030ef22db9aeaf4cb419965209324fbecee6f
MD5 44b286c7c93b26c0f8712df202c1d56c
BLAKE2b-256 84960c1bdfe907f0745d4b35f24089204401ac607d6c74cb719e7d8593755868

See more details on using hashes here.

Provenance

The following attestation bundles were made for grc_engine-0.1.0.tar.gz:

Publisher: publish.yml on timidgit/grc-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file grc_engine-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: grc_engine-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for grc_engine-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fbd8edaec0f47c9d33d53d74034918725ea7aed099a8388197b44191b4949d1
MD5 68b11bc90709bdc49c0be111eda6778b
BLAKE2b-256 0e1c922f8e88d0f65971eb383a6171a35653f30f81186809be3e8e6dc321ce83

See more details on using hashes here.

Provenance

The following attestation bundles were made for grc_engine-0.1.0-py3-none-any.whl:

Publisher: publish.yml on timidgit/grc-engine

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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