Featured image of post How I integrated Wiz Security Scanning into our Infrastructure Workflow

How I integrated Wiz Security Scanning into our Infrastructure Workflow

๐Ÿง™โ€โ™‚๏ธ How I integrated Wiz Security Scanning into our Infrastructure Workflow

1. ๐Ÿ’ป Local Testing: Shifting Security Left To help developers identify and remediate vulnerabilities before committing code, I introduced a local scanning workflow. This allows the team to catch and fix misconfigurations early in the development cycle.

  • ๐Ÿ› ๏ธ Created a central Makefile and helper script (scripts/wiz-scan-tfplan/wiz-scan-tfplan.sh).
  • ๐Ÿš€ Developers can simply run make wiz-scan env=[PATH_TO_TERRAFORM_DIRECTORY] to initialize, plan, and scan their Terraform modules locally.
  • ๐Ÿ” The script utilizes wizcli iac scan to authenticate and evaluate the generated .tfplanjson against our security baselines.

2. ๐Ÿค– CI/CD Integration: Atlantis Automation To ensure continuous security and centralized visibility, we integrated wizcli directly into our Atlantis pull request workflow.

  • ๐Ÿณ Custom Environment: Built and deployed a custom Atlantis Docker image pre-configured with wizcli.
  • ๐Ÿ”„ Automated Pipeline: During the PR plan phase, Atlantis generates the plan, parses it via terraform show -json, and executes our custom wiz-atlantis-scan.sh script.
  • ๐Ÿ’ฌ Actionable PR Feedback: Scan results are emitted to the Wiz platform for central tracking, while a clean, formatted summary is automatically posted back to the GitHub PR as a standalone comment.
  • ๐Ÿงน All temporary plan and JSON files are securely removed immediately after the scan completes.

3. ๐Ÿšง Next Steps: Policy Enforcement & Blocking Our next phase focuses on establishing a firm security baseline and enforcing compliance on all new infrastructure:

  • ๐Ÿ“‹ Triage & Baseline: Review current scan results and apply global policy exclusions.
  • ๐Ÿ“œ Policy Configuration: Create a dedicated IaC policy in the Wiz Portal targeting the “Build” lifecycle to define our exact security thresholds.
  • ๐Ÿ›‘ Block Deployments: Update the Atlantis workflow script to exit with a non-zero status upon detecting new policy violations (e.g., CRITICAL or HIGH findings), effectively failing the plan step and blocking terraform apply.
Licensed under CC BY-NC-SA 4.0
Last updated on Oct 20, 2026 15:50 +0100
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy