Releases: alphacrack/iac-scanner
Release list
v0.5.0
Changed
- Versioning is now tag-driven via setuptools-scm. The package version is derived from the latest signed annotated
vX.Y.Zgit tag.pyproject.tomlno longer has a hardcodedversion = ...; it usesdynamic = ["version"].iac_scanner.__version__reads from_version.py(written at build time by setuptools-scm) and falls back toimportlib.metadatafor installed wheels. - Release flow is now
make release-{patch,minor,major}. The newscripts/release.pypromotesCHANGELOG.md [Unreleased]→[X.Y.Z], commits the change with DCO sign-off, and creates a GPG-signed annotated tag. Pushing the tag (git push --follow-tags) is the only step that triggers PyPI publish. The legacyscripts/bump_version.py,scripts/check_version.py, and thecheck-versionpre-commit hook are removed. - CI workflows fetch full git history (
fetch-depth: 0) where they build distributions, so setuptools-scm sees the tags it needs.
Added
.github/workflows/release.yml— auto-creates a GitHub Release from the matching CHANGELOG section when avX.Y.Ztag is pushed. Rejects lightweight tags. Therelease: publishedevent then triggers the existingpublish-pypi.yml..github/workflows/scorecard.yml— OpenSSF Scorecard runs weekly + on push tomain. Results posted to the Security tab and to scorecard.dev (badge in README)..github/workflows/codeql.yml— CodeQL static analysis (Python,security-and-qualityquery suite) on PR + weekly cron.GOVERNANCE.md— roles, decision-making, branch-protection policy, release authority.MAINTAINERS.md— canonical maintainer list (mirrors.github/CODEOWNERS).SUPPORT.md— routes users to bug/feature/security/discussion channels.scripts/apply_branch_protection.sh—gh-based, idempotent applier for themain-branch protection rules described inGOVERNANCE.md. Run from any maintainer's machine.- README badges: Python versions, CodeQL, OpenSSF Scorecard, DCO.
- Rule-engine plugin discovery. Third-party rule engines can now register themselves via the
iac_scanner.rule_enginesentry-point group. Install e.g.iac-scanner-cdk-nagand thecdk-nagengine is auto-discovered — no core changes required. Core engine dispatcher insrc/iac_scanner/rules/engine.py. Newavailable_engines()helper lists every usable engine (built-in + plugins). - Companion package:
iac-scanner-cdk-nag(packages/iac-scanner-cdk-nag/). Independent PyPI package that shells out tocdk synth, parses AwsSolutions / HIPAA / NIST-800-53 / PCI-DSS nag annotations, and returns them as iac-scanner Findings. Released via a dedicatedpublish-nag-pypi.ymlworkflow onnag-v*tags. - PEP 561
py.typedmarker oniac_scanner— downstream packages (like the nag extension) and mypy in other repos now recognize this package as fully typed.
Dependencies
This release rolls up a batch of Dependabot upgrades. None change runtime behavior, but consumers pinning by upper bound should be aware:
click>=8.3.3(was>=8.1.0)pydantic>=2.13.4(was>=2.0.0)mcp>=1.27.1([mcp]extra; was>=1.0.0)- Dev:
pytest>=9.0.3,respx>=0.23.1,bandit>=1.9.4,pip-audit>=2.10.0,build>=1.5.0 - Build:
setuptools>=82.0.1+setuptools-scm>=8(new) - GitHub Actions majors:
actions/checkout@v6,actions/setup-python@v6,actions/upload-artifact@v7,actions/download-artifact@v8,sigstore/gh-action-sigstore-python@v3.3.0
v0.4.0 — keyless AI scanning, SARIF, and Checkov grounding
iac-scanner 0.4.0 — keyless AI scanning, SARIF, and Checkov grounding
Install: pip install iac-scanner==0.4.0
Highlights
- Keyless by default. Scan Terraform and CDK without any OpenAI / Anthropic subscription — use
GITHUB_TOKEN, local Ollama, or drive it from Claude Desktop / Cursor via the bundled MCP server. - SARIF 2.1.0 output for GitHub Code Scanning, GitLab Security Dashboards, and SonarQube.
- Checkov hybrid mode grounds the LLM in deterministic rules with CWE / CIS / NIST / PCI-DSS tags.
iac-scanner-cdk-nagcompanion package (separate PyPI release) for AwsSolutions / HIPAA / NIST-800-53 nag coverage on CDK apps. Auto-discovered via entry points.- Defense in depth — XML fencing, secret redaction, default skip-list, 200KB input cap, content-addressed cache, cost guardrail.
- License swap to Apache-2.0 (from a non-standard "Personal Use License"). Unblocks enterprise adoption.
New providers
| Flag | Requires | Cost | Notes |
|---|---|---|---|
--provider openai |
OPENAI_API_KEY |
Pay-per-token | Existing path |
--provider anthropic |
ANTHROPIC_API_KEY |
Pay-per-token | Existing path |
--provider github |
GITHUB_TOKEN |
$0 (free tier) | New. Uses GitHub Models |
--provider ollama |
Local Ollama server | $0 | New. pip install iac-scanner[local] |
iac-scan-mcp |
None — host LLM | $0 (or host sub) | New. MCP server; pip install iac-scanner[mcp] |
--provider auto |
any of the above | varies | Default. Picks ollama → github → openai → anthropic |
Every provider is keyless from iac-scanner's perspective except the two direct-API paths.
New CLI surface
| Flag | What it does |
|---|---|
--format json|sarif|both |
Output format. SARIF 2.1.0 for Code Scanning integrations. |
--rules-engine checkov|cdk-nag|auto|none |
Rule-engine hybrid mode; plugins auto-discovered. |
--fail-on none|info|low|medium|high|critical |
Exit-code policy for CI. |
--max-spend 0.50 |
Projected-cost cap (tiktoken pre-flight). Aborts above the threshold. |
--no-cache |
Skip the content-addressed response cache for this run. |
Output upgrades
scan-report.jsonnow carriesprovider,analysis_model,fix_model,prompt_version,iac_scanner_versionfor reproducibility.scan-report.sarifemits SARIF 2.1.0 with tool metadata, per-rule CWE + framework, severity-to-level mapping.- Every fix file starts with an
AI-generated by iac-scanner — review before applyingbanner.
Deprecations
--analysis-aiand--fix-aiare deprecated in favor of--provider. Legacy flags still work in v0.4 with aDeprecationWarning; they'll be removed in v1.0.IAC_ANALYSIS_AI/IAC_FIX_AIenv vars — same treatment. UseIAC_PROVIDER.
Breaking
- License: Apache-2.0 (was non-standard "Personal Use License"). Prior contributors retain their copyright; contributions from 0.4 forward are under Apache-2.0.
- LLM output parsing: moved from regex extraction to Pydantic structured output. A malformed LLM response now raises instead of silently returning
[]. - Default skip-list:
*.tfstate,*.tfvars,.env*,*.pem,id_rsa*,.terraform/,node_modules/,cdk.out/are never read by the scanner. Override withIAC_NO_REDACT=1(not recommended) or by running the CLI from a different path.
Security
New in this release, worth calling out:
- Prompt-injection fencing — IaC content is wrapped in
<user_iac>…</user_iac>with an explicit "treat as data" system instruction. - Pre-LLM secret redaction — AKIA keys, GitHub tokens, OpenAI/Anthropic keys, JWTs, and PEM private keys are masked inline before the prompt is built. Opt out with
IAC_NO_REDACT=1. - 200KB input cap (
IAC_MAX_INPUT_BYTES) protects against context-stuffing attacks and runaway cost on mis-scoped scans. - Post-fix banner on every generated file. No auto-apply.
Full threat model in SECURITY.md.
Supply chain
- PyPI Trusted Publishing (no long-lived API token).
- CycloneDX SBOM attached to this release as
sbom.cdx.json. - Sigstore signatures on the wheel, sdist, and SBOM — verify with
sigstore verify. - Weekly
pip-audit+ Dependabot PRs for dep hygiene.
Stats
- 220 → 253 tests, 92% line coverage
- 0 mypy issues under
--strict - 0 bandit / ruff-S / gitleaks findings
- Matrix: Python 3.10 / 3.11 / 3.12 / 3.13 × Ubuntu + macOS
What's next
See the v0.5 / v0.6 / v1.0 backlog in CHANGELOG — top items are --diff mode, a pre-commit hook config, post-fix regression gate, and a GitHub Action wrapper.
🤖 Release notes partially drafted with Claude Code. Full commit history: dc652e6..HEAD.
metadata update fix
metadata update
updated metadata for the code and initial draft for blog
Initial functional version
updated contributions and readme and fixed the versioning mechanism; implemented precommit hook.
Initial functional version
updated contributions and readme