Continuous, audit-ready security design review for cloud and agentic systems
Project description
Attestral
Continuous, audit-ready security design review for cloud and agentic systems.
Attestral ingests your infrastructure-as-code and agent/MCP configurations, builds a unified system model, runs a deterministic rule pack (plus optional LLM threat elicitation), and produces a design review with a tamper-evident evidence chain you can hand to reviewers, auditors, and customers.
pip install attestral
attestral scan ./my-project
Why
- Legacy threat modeling platforms are questionnaire-driven, consultant-heavy, and priced for the Fortune 500. In practice most teams do this work in a spreadsheet.
- The fastest-growing attack surface (AI agents, MCP servers, tool permissions) is the one legacy tools understand least.
- Review output is only worth what you can prove. Every Attestral run emits a SHA-256 hash chain over its findings, and altering any past entry invalidates the chain head.
What it does today (v0.3)
| Layer | Status |
|---|---|
| Terraform ingestion (design-level) | ✅ dependency-free scanner |
| MCP server config ingestion | ✅ mcp.json / claude_desktop_config.json |
| Deterministic rule pack | ✅ 10 rules: cloud misconfig + agentic tool risk |
| Framework mapping | ✅ NIST 800-53, ASVS, SOC 2, OWASP Agentic refs per finding |
| Evidence chain + verification | ✅ attestral verify report.json |
| SARIF output for GitHub Code Scanning | ✅ --format sarif → Security tab + PR annotations |
| Fail-closed CI gate | ✅ --fail-on high |
| Baseline + waivers | ✅ documented, expiring exceptions kept in the evidence chain |
| LLM threat elicitation | ✅ optional, --llm + ANTHROPIC_API_KEY, findings tagged separately |
Design→policy compiler (attestral compile) |
✅ mcp-guard default-deny policy, bound to the review chain head |
Design-runtime drift detection (attestral drift) |
✅ JSONL telemetry diffed against the attested design |
| PR design-diff (GitHub App) | 🔜 roadmap |
| IriusRisk/ThreatModeler import | 🔜 roadmap |
Usage
# Scan a project (Terraform + MCP configs discovered automatically)
attestral scan ./my-project
# Markdown + JSON evidence report
attestral scan ./my-project -o review --format both
# CI gate: fail the pipeline on high/critical design findings
attestral scan . --fail-on high
# Emit SARIF for GitHub Code Scanning (Security tab + inline PR annotations)
attestral scan . --format sarif -o attestral
# then upload attestral.sarif via github/codeql-action/upload-sarif@v3
# (ready-made workflow: examples/github-actions/code-scanning.yml)
# Accept a known risk without disabling the gate: add a documented waiver.
# A waived finding is suppressed from --fail-on but stays in the evidence
# chain with its justification. See examples/attestral-waivers.example.yaml
attestral scan . --fail-on high # auto-discovers attestral-waivers.yaml
# Add LLM design-review reasoning on top of the deterministic layer
export ANTHROPIC_API_KEY=...
attestral scan ./my-project --llm
# Prove a report hasn't been altered
attestral verify review.json
# Close the loop: compile the attested design into a runtime policy...
attestral compile ./my-project -o policy.yaml
# ...and diff runtime telemetry (mcp-guard JSONL) against it
attestral drift policy.yaml events.jsonl --fail-on-drift
Try it on the included demo:
attestral scan examples/demo-project
Architecture
- Ingest → unified
SystemModel(components, edges, trust boundaries) from Terraform and MCP configs. - Deterministic layer → typed matchers in YAML rules (
attestral/rules/core_rules.yaml). Noeval, unknown matchers fail closed. - LLM layer (optional) → design-level threat elicitation over the model JSON; findings tagged
origin: llm, never silently mixed with deterministic results. - Evidence layer → hash-chained findings, markdown/JSON export, offline verification.
Writing custom rules
rules:
- id: ORG-001
title: Internal service exposed without auth attribute
severity: high
target: aws_lb
match: { attr_missing: auth }
description: ...
recommendation: ...
frameworks: ["NIST AC-3"]
attestral scan . # core pack
python -c "from attestral.rules import RuleEngine; RuleEngine(['org_rules.yaml'])"
Development
pip install -e ".[dev]"
pytest -q
ruff check attestral tests
License
Apache 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file attestral-0.3.0.tar.gz.
File metadata
- Download URL: attestral-0.3.0.tar.gz
- Upload date:
- Size: 36.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8686594970e3c22e301d0b0f5114db983716e99c7ddd00ad06cdc93e3aad5d4
|
|
| MD5 |
8b7e84684acfac9823fd23996775856a
|
|
| BLAKE2b-256 |
c2437d19a68ee294e0f301b170f7af8c8530970891700e2796c974373ad03ea1
|
Provenance
The following attestation bundles were made for attestral-0.3.0.tar.gz:
Publisher:
publish.yml on attestral-labs/attestral
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
attestral-0.3.0.tar.gz -
Subject digest:
e8686594970e3c22e301d0b0f5114db983716e99c7ddd00ad06cdc93e3aad5d4 - Sigstore transparency entry: 2146701283
- Sigstore integration time:
-
Permalink:
attestral-labs/attestral@16603a97c470b4c9cf81fce220875bdb339bbecc -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/attestral-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@16603a97c470b4c9cf81fce220875bdb339bbecc -
Trigger Event:
release
-
Statement type:
File details
Details for the file attestral-0.3.0-py3-none-any.whl.
File metadata
- Download URL: attestral-0.3.0-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97d193f7518d2ad38e1395c7d7e9f3a496343ea6fbdf4c852ce09b50a708d4cc
|
|
| MD5 |
a20410622674d282c396ba64ea6ee636
|
|
| BLAKE2b-256 |
3715dd4a189ece274e1efff0b98fd66cef0eda7c74bdb9e686f15c78b7116b90
|
Provenance
The following attestation bundles were made for attestral-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on attestral-labs/attestral
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
attestral-0.3.0-py3-none-any.whl -
Subject digest:
97d193f7518d2ad38e1395c7d7e9f3a496343ea6fbdf4c852ce09b50a708d4cc - Sigstore transparency entry: 2146701316
- Sigstore integration time:
-
Permalink:
attestral-labs/attestral@16603a97c470b4c9cf81fce220875bdb339bbecc -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/attestral-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@16603a97c470b4c9cf81fce220875bdb339bbecc -
Trigger Event:
release
-
Statement type: