Skip to content

Releases: alphacrack/iac-scanner

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 22 Jul 20:34
b8ce1e2

Changed

  • Versioning is now tag-driven via setuptools-scm. The package version is derived from the latest signed annotated vX.Y.Z git tag. pyproject.toml no longer has a hardcoded version = ...; it uses dynamic = ["version"]. iac_scanner.__version__ reads from _version.py (written at build time by setuptools-scm) and falls back to importlib.metadata for installed wheels.
  • Release flow is now make release-{patch,minor,major}. The new scripts/release.py promotes CHANGELOG.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 legacy scripts/bump_version.py, scripts/check_version.py, and the check-version pre-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 a vX.Y.Z tag is pushed. Rejects lightweight tags. The release: published event then triggers the existing publish-pypi.yml.
  • .github/workflows/scorecard.yml — OpenSSF Scorecard runs weekly + on push to main. Results posted to the Security tab and to scorecard.dev (badge in README).
  • .github/workflows/codeql.yml — CodeQL static analysis (Python, security-and-quality query 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.shgh-based, idempotent applier for the main-branch protection rules described in GOVERNANCE.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_engines entry-point group. Install e.g. iac-scanner-cdk-nag and the cdk-nag engine is auto-discovered — no core changes required. Core engine dispatcher in src/iac_scanner/rules/engine.py. New available_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 to cdk synth, parses AwsSolutions / HIPAA / NIST-800-53 / PCI-DSS nag annotations, and returns them as iac-scanner Findings. Released via a dedicated publish-nag-pypi.yml workflow on nag-v* tags.
  • PEP 561 py.typed marker on iac_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

Choose a tag to compare

@alphacrack alphacrack released this 19 Apr 06:05
3b2ccab

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-nag companion 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.json now carries provider, analysis_model, fix_model, prompt_version, iac_scanner_version for reproducibility.
  • scan-report.sarif emits 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 applying banner.

Deprecations

  • --analysis-ai and --fix-ai are deprecated in favor of --provider. Legacy flags still work in v0.4 with a DeprecationWarning; they'll be removed in v1.0.
  • IAC_ANALYSIS_AI / IAC_FIX_AI env vars — same treatment. Use IAC_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 with IAC_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

Choose a tag to compare

@alphacrack alphacrack released this 06 Mar 13:37
0c2cefd

metadata update

metadata update

Choose a tag to compare

@alphacrack alphacrack released this 06 Mar 10:51
1b1a740

updated metadata for the code and initial draft for blog

Initial functional version

Choose a tag to compare

@alphacrack alphacrack released this 01 Mar 15:51

updated contributions and readme and fixed the versioning mechanism; implemented precommit hook.

Initial functional version

Choose a tag to compare

@alphacrack alphacrack released this 01 Mar 15:25

updated contributions and readme

test release

Choose a tag to compare

@alphacrack alphacrack released this 27 Feb 10:59
v0.1.0

fixing pipeline stuffs