Skip to main content

Continuous, audit-ready security design review for cloud and agentic systems

Project description

Attestral

PyPI CI Python License

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.2)

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
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)

# 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

  1. Ingest → unified SystemModel (components, edges, trust boundaries) from Terraform and MCP configs.
  2. Deterministic layer → typed matchers in YAML rules (attestral/rules/core_rules.yaml). No eval, unknown matchers fail closed.
  3. LLM layer (optional) → design-level threat elicitation over the model JSON; findings tagged origin: llm, never silently mixed with deterministic results.
  4. 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


Download files

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

Source Distribution

attestral-0.2.0.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

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

attestral-0.2.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file attestral-0.2.0.tar.gz.

File metadata

  • Download URL: attestral-0.2.0.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for attestral-0.2.0.tar.gz
Algorithm Hash digest
SHA256 18781f12e8e450f478c3fddbeb21bd562470cf787fd2c25d4dd7babc763371c4
MD5 689c484138b9942b5de1684328dff9e4
BLAKE2b-256 90db149ef2438add66c5eb674112014cfac940f6d064ddb7bdbb4c45cf0e8d8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for attestral-0.2.0.tar.gz:

Publisher: publish.yml on attestral-labs/attestral

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

File details

Details for the file attestral-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: attestral-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for attestral-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 572bce2aef3de9f4a22467d755fb957d29ef2752b372c60b6d08b1dd46f634ff
MD5 ebe73fd2f731522be974d8da5af9fc1c
BLAKE2b-256 bbc0e19c7517a9a64bcb67cb27768e7196e468b35a39c5b56ccf44cc8adb31b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for attestral-0.2.0-py3-none-any.whl:

Publisher: publish.yml on attestral-labs/attestral

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