grc-evidence
Turns scans, repo settings and change history into SOC 2 Type 2 evidence over an audit window. Code decides status. An LLM drafts prose. A person signs.
This is a work in progress.
An Open Knowledge Format
(OKF) knowledge bundle, plain Markdown that any OKF tool can read, grounds a
compliance engine (the grc-evidence package and its grc CLI) and an agent skill.
Together they scan an app, map each finding to a SOC 2 / NIST SP 800-53,
ISO/IEC 42001, or EU AI Act control, emit OSCAL, and write an auditor-facing
report.
Organize knowledge → derive intelligence → take action.
See it on a real app: grc-evidence-boutique
applies the released engine to Google’s
microservices-demo,
included unmodified: 422 findings mapped to controls (7 not satisfied), 42 of 47
coverage-gap rules triaged into controls, a compliance gate on every pull
request and a nightly scan, and an agent’s draft shown with the review that
corrected it. The one-page case study
has the figures and what the review changed in the engine.
app/ is intentionally vulnerable. It exists only as a scan target, with
seeded issues listed in app/SEEDED.yaml. Do not deploy it.
Clean-room Everything here is generic and self-contained: the sample app,
the Rego policies, and the OSCAL output. No proprietary data, configuration,
or control text is included.
What it does
- Scan the target with four pinned scanners: Semgrep, Trivy, Checkov,
Conftest.
- Map each finding to a control, only through a
rule_ids declaration a
person reviewed in the bundle.
- Report: OSCAL component definition, assessment plan, and assessment
results; an auditor-facing
report.md; and run.json, which records the
commit, the versions, and the sha256 of every output.
- Optionally add an LLM summary per control and LLM proposals for coverage
gaps. Neither ever changes a status.
How grounding works
A finding reaches a control only through a rule_ids declaration in the bundle.
A finding with no declaration is reported as a coverage gap, never mapped by
guesswork. The scan surfaces dozens of such gaps; each one is a rule the bundle
has not yet claimed for any control.
Here is what a sample report looks like after running a scan,
with its OSCAL documents. Both are generated by make examples
(which runs make scan against the sample app). Its LLM lines come from
make examples-llm, which narrates that same scan (LLM_MODE=anthropic or
claude-cli); a plain make examples drops them. CVE counts change as Trivy’s vulnerability
database updates.
Set up and run
Requires uv; make bootstrap installs Python 3.14 dependencies and the pinned scanners.
make bootstrap # uv sync + install pinned scanners into .tools/
make scan # grc run: out/findings.json, mapping.json, oscal/*.json, report.md, run.json
make render # out/knowledge-viz.html — the OKF graph, interactive (okflib)
make graph-image # docs/screenshots/knowledge-graph.png — the picture below (Graphviz)
make narrate # optional: LLM prose per control, validated, then re-render and update run.json (LLM_MODE=anthropic)
make triage # optional: LLM proposals for coverage gaps → out/proposals.json (review only)
make propose # after triage: draft concepts → out/agent/mapping.patch, other gaps → out/agent/gaps.md
make eval-triage # optional: score triage variants on labeled gaps (tune + holdout) via the Batch API
make audit # supply chain: the engine's dependencies (Trivy) and workflows (zizmor)
make examples-h # Type 2 examples, offline, from the recorded demo responses
make test # unit + Rego + Semgrep rule tests
make test-integration # full scan; asserts every seeded issue lands where expected
make clean # remove out/
Supported platforms: macOS arm64 and Linux x86_64 (the pinned scanner binaries).
Type 2 evidence over a window
A SOC 2 Type 2 audit asks whether controls operated over an observation window,
not on one day. With a window and a list of GitHub repos in grc.yaml, grc run
also reads each repo through the GitHub API (no clone) and keeps a dated record:
window: {start: 2026-10-01, end: 2026-12-31}
people: pseudonymous # or real (the default): logins in outputs become p-<HMAC>
github:
scanner_jobs: [semgrep, trivy]
repos:
- {name: acme/api, tier: in-scope, collect: [scm, changes]}
- Repo settings (
scm): required reviews, required checks, who can bypass
them, and whether each scanner job can fail the build. Rules the token cannot
read are reported as unreadable, never as a pass.
- Change population (
changes): every change merged in the window, with its
author, merger and independent approvers, and the count of all merged changes
beside it. A change with no approval, or merged by its author with none, is a
finding on CC8.1.
- Evidence ledger: every collection and every clean run appends a line to
evidence/ledger.jsonl, hash-chained; grc ledger verify checks it.
grc sample --list sample.csv gives the evidence for the changes an auditor
sampled, and grc window the history of each control over the window, with
its gaps.
The token is read-only and comes from GITHUB_TOKEN or GH_TOKEN. Collect on a schedule; pull request runs use
grc run --no-collect, which needs no token and writes no ledger. grc gate never fails on a change-*
finding: it comes from merge history, not from the change under review. See
docs/outputs.md for the files, docs/limits.md
for what is not covered, and examples/collect/ for a
population and a sample from Google’s microservices-demo, pseudonymized.
Use it
- With a coding agent: the
grc-continuous-compliance skill (grc install-skill adds it to another repo)
runs the pipeline and summarizes it, and leaves every status, mapping, and
suppression decision to a person. See docs/using-the-skill.md.
- From any MCP-capable agent:
grc mcp serves the repo’s results (scan, control status, findings, gaps,
suppressions, the gate), with scanner text marked untrusted. See docs/mcp.md.
- As an agent workflow:
grc agent posture drafts a summary for the repository’s owner with only
read tools, and writes it only if every number and status checks out against the tool results.
See docs/agents.md.
- In another repo: install the engine,
grc init, then grc run. See
docs/new-repo.md for what it brings in and what you write.
- In CI: how this repo tests and releases itself, and a starting point for
your pipeline: docs/ci.md.
Knowledge graph

The OKF knowledge bundle (knowledge/), drawn with Graphviz (make graph-image) and
colored by folder. Each box is one concept file — a SOC 2, ISO/IEC 42001, or EU AI Act
control, a crosswalk, a guardrail policy, a scanner, a stack component, or a
suppression — and each arrow is a markdown link between them. To explore it,
make render writes an interactive view with search and a table
(okflib) to out/knowledge-viz.html. It is a browsing aid; the scan pipeline reads the same files
directly and does not use the graph.
Further reading
| Document |
What it covers |
| Architecture |
How the parts fit, a diagram, and the order to build the proposed features in |
| Outputs |
The output contract, the run manifest, and the OSCAL documents |
| OSCAL subset |
Exactly which OSCAL fields are emitted, and the placeholders |
| OKF extension fields |
The fields the bundle adds to OKF, their schemas, and what checks them |
| Suppressions |
Reviewed, expiring decisions about single findings |
| AI governance |
ISO/IEC 42001 and EU AI Act coverage, risk tiers, AI SDKs |
| LLM step and cost |
Narration and triage: validation, cost, and the triage evaluation |
| Limits |
What grc-evidence does not do, or does only partly |
| How this was built |
Specs, plans, human gates, measurements |
| Status and roadmap |
Where the project stands and what is next |
| Specs and plans |
The written record behind each change |
Layout
| Path |
What |
app/ |
clean-room Django/DRF sample app, Dockerfile, Kubernetes, Terraform |
knowledge/ |
the OKF bundle: controls, stack, guardrail policies, scanners |
policies/ |
Rego guardrails (+ tests) and a vendored Semgrep rule |
.claude/skills/grc-continuous-compliance/ |
the skill (SKILL.md), a copy of src/grc_evidence/data/skill/ |
src/grc_evidence/ |
the engine: the grc-evidence package and its grc CLI; data/ holds tools.lock, the scanner bootstrap, and the base bundle and policies that knowledge/ and policies/ copy |
docs/ |
design spec, implementation plan, OSCAL subset |
examples/ |
a sample report and OSCAL documents produced by make examples; triage eval results |
Pins
All external versions are pinned in tools.lock: Semgrep, Checkov,
Trivy, Conftest, and OSCAL 1.2.3; the OKF reader, okflib, is pinned in pyproject.toml. Trivy and
Conftest are checked against SHA-256 pins; Semgrep and Checkov, with every
dependency, install only from hash-pinned requirements in
src/grc_evidence/data/locks/ (make lock-scanners
regenerates them after a version change). The OSCAL output is a documented
subset: see docs/oscal-subset.md.
The engine’s runtime dependencies are PyYAML and okflib
(Apache-2.0), which checks each OKF concept. okflib is pinned exactly in pyproject.toml,
because uv tool install and uvx resolve from it and do not read uv.lock.
License
MIT
评论