Quickstart¶
Five minutes from zero to your first scan finding.
What you'll do¶
- Install Efterlev.
- Initialize a workspace in a sample Terraform repo.
- Run
efterlev scanand see findings. - (Optional) Run the Gap Agent for an LLM-classified report.
- (Optional) Use
efterlev report runto chain everything into one command, with--watchfor re-runs on file changes.
What you won't need: an account, a credit card, a SaaS dashboard, or a procurement approval. Efterlev runs locally on your machine.
Prerequisites¶
- Python 3.12 or later. Check with
python3 --version. -
A Terraform repository to scan against. If you don't have one handy, clone the demo repo we use throughout this guide:
1. Install¶
pipx keeps Efterlev isolated from your system Python while giving you a globally-callable efterlev CLI.
Full per-platform install instructions →
2. Initialize the workspace¶
This creates a .efterlev/ directory with:
- The vendored FedRAMP FRMR catalog.
- The vendored NIST 800-53 Rev 5 catalog.
- A SQLite-backed provenance store.
- A
config.tomlrecording the baseline + LLM backend choices.
Output:
Initialized .efterlev/
baseline: fedramp-20x-moderate
FRMR: v0.9.43-beta (2026-04-08, 11 themes, 60 indicators)
NIST SP 800-53 Rev 5: 324 controls (+872 enhancements)
load receipt: sha256:4dad52a9...
3. Scan¶
This runs 43 deterministic detectors against your Terraform (and .github/workflows/ for CI/supply-chain KSIs). No LLM calls, no network — pure local rules over your source files.
Expected output for the govnotes demo:
Scanning .
✓ aws.encryption_s3_at_rest — 4 evidence records
✓ aws.tls_on_lb_listeners — 1 evidence record
✓ aws.security_group_open_ingress — 2 findings
...
66 detectors run, 73 evidence records, 14 findings.
HTML report: .efterlev/reports/scan-20260425T140530Z.html
Open the HTML report in your browser:
You'll see every finding with the .tf file and line number that produced it. Click any finding to walk back through the provenance chain.
4. (Optional) Run the Gap Agent¶
The Gap Agent uses Claude to classify each KSI as implemented / partial / not_implemented / not_applicable / evidence_layer_inapplicable, grounded in the scanner's evidence. The fifth status (SPEC-57.1) is for KSIs the scanner cannot evidence from infrastructure-as-code by design — procedural commitments like the FedRAMP Security Inbox — distinct from KSIs the CSP doesn't implement. This is the LLM step — it requires an API key.
First reconfigure your workspace to use Bedrock:
efterlev init --force \
--baseline fedramp-20x-moderate \
--llm-backend bedrock \
--llm-region us-east-1 \
--llm-model us.anthropic.claude-opus-4-7-v1:0
Then ensure AWS credentials are available (aws configure list or via instance profile). The Bedrock backend uses your existing AWS auth.
For GovCloud, follow the GovCloud deploy tutorial →
The Gap Agent produces a second HTML report with each KSI classified and explained, every claim citing the underlying evidence by content-addressed ID.
Gap Agent: classified 60 KSIs in 47 seconds.
HTML report: .efterlev/reports/gap-20260425T140617Z.html
Cost: $1.24 (claude-opus-4-7 via anthropic-direct)
Every claim carries a DRAFT — requires human review marker. The agent never claims authorization.
5. (Optional) One command for the full pipeline¶
Once you're past the first-run mental overhead, efterlev report run chains every stage into one invocation:
This runs init → scan → agent gap → agent document → poam in sequence, with stage headers so you can see progress. Add --watch to keep running and re-execute the pipeline on file changes (debounced 2 seconds):
Edit a .tf file and save — the pipeline re-runs automatically. Ctrl-C exits.
For comparing two scans (CI gating, drift detection):
Exits with code 2 if any KSI regressed since prior — useful for blocking PRs in CI on posture regressions.
6. (Optional) Troubleshoot configuration¶
If something feels off — agent hangs, weird errors, missing files — run:
It checks Python version, .efterlev/ initialization state, FRMR cache freshness, ANTHROPIC_API_KEY shape, and AWS Bedrock credentials. Each check has a one-line remediation hint.
What's next¶
- Drafting attestations → — the Documentation Agent turns gap classifications into FRMR-compatible JSON.
- Proposing remediations → — the Remediation Agent generates Terraform diffs for findings.
- Wire it into CI → — three lines of YAML and every PR shows a compliance delta.
- Run inside a GovCloud boundary → — the Bedrock backend keeps inference inside the FedRAMP-authorized boundary.
Troubleshooting¶
efterlev: command not found after pipx install — make sure ~/.local/bin is on your PATH. pipx ensurepath adds it.
error: ANTHROPIC_API_KEY is missing or invalid — set ANTHROPIC_API_KEY to a real key from https://console.anthropic.com (or switch to the Bedrock backend in .efterlev/config.toml). Run efterlev doctor to verify.
Init fails with baseline ... is not supported — current Efterlev supports fedramp-20x-moderate only. Other baselines land as customer demand surfaces.
Scan finds zero evidence — your detectors may not match your stack (we ship 66 detectors covering AWS Terraform + GitHub Actions workflows; non-AWS stacks see less coverage today). Check the detector reference for what's covered.
Anything else: open an issue — broken first-runs are bugs we want to hear about.