Skip to content

feat(ci): add Terraform security analysis workflow with Docker + Gemini integration#1

Merged
wellingtoong merged 12 commits into
mainfrom
develop
Feb 20, 2026
Merged

feat(ci): add Terraform security analysis workflow with Docker + Gemini integration#1
wellingtoong merged 12 commits into
mainfrom
develop

Conversation

@wellingtoong
Copy link
Copy Markdown
Owner

🚀 Overview

This PR introduces a GitHub Actions workflow to automatically:

  • Run Terraform init, validate and plan
  • Convert the plan output to JSON format
  • Execute the Cloud Security Analyzer via Docker
  • Generate a structured HTML security report
  • Upload artifacts (plan.json + HTML report)

The workflow is designed to support infrastructure security analysis before applying changes.


🔍 What This Adds

  • New workflow: .github/workflows/terraform-security-analysis.yml
  • Manual execution via workflow_dispatch
  • Terraform plan exported as JSON
  • Docker-based execution of the Cloud Security Analyzer
  • Gemini-powered vulnerability analysis
  • HTML report artifact generation

🧠 Purpose

This enables infrastructure security validation as part of the CI process, supporting:

  • Shift-left security practices
  • Terraform plan inspection before apply
  • Automated vulnerability detection
  • Standardized reporting format

🔐 Security Considerations

  • Uses GEMINI_API_KEY from GitHub Secrets
  • No AWS credentials required (local plan analysis only)
  • Read-only repository permissions

🧪 How to Run

  1. Go to Actions
  2. Select Terraform + Cloud Security Analyzer
  3. Click Run workflow
  4. Provide the Terraform directory input

📦 Output

The workflow generates:

  • terraform-plan-json artifact
  • terraform-security-report-html artifact

@wellingtoong wellingtoong merged commit b9fddaf into main Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant