iac-scan

Analyzes infrastructure-as-code declarations to report provisioning coverage, environments, and hardening posture.

3|1|Updated Aug 26, 2026
One-click install
npx skills add https://github.com/zeljkoobrenovic/sokrates-skills --skill iac-scan-zeljkoobrenovic
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iac-scan
Source: https://github.com/zeljkoobrenovic/sokrates-skills/tree/main/skills/scanners/iac-scan
Command: npx skills add https://github.com/zeljkoobrenovic/sokrates-skills --skill iac-scan-zeljkoobrenovic

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Infrastructure code decides what can go wrong in production, yet it is often reviewed less than application code. This Skill reads a repository's Terraform, Kubernetes, Helm, Docker, compose, devcontainer, and other IaC files to answer what environment could be rebuilt from the repo alone, what is missing, and where the declared infrastructure is weaker than the application it hosts. ## Core Features & Use Cases - IaC inventory and coverage: Classifies every infrastructure file by tool, counts declared resources, and states honestly what the runtime environment needs that nothing declares — including infrastructure CI mutates by name but the repo never defines. - Hardening review: Judges image pinning, root users, privileged containers, exposed ports, public access, resource limits, and build-secret surfaces with calibrated severity levels. - Environment and state analysis: Maps how staging differs from production, where Terraform state lives, and whether the apply path is a pipeline, manual, or absent. - Use Case: Point it at a repository with Dockerfiles and a Kubernetes deploy directory to receive a structured findings report covering workloads, ingress, environment variants, and a posture summary of what could be rebuilt from the repo. ## Quick Start Ask the AI to run an IaC scan on this repository and report what infrastructure is declared, what is missing, and any hardening risks.

Frequently Asked Questions about iac-scan

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Terraform and Kubernetes files in a repository?

Run the IaC scan, which classifies every infrastructure file by tool, counts declared resources per provider and Kubernetes kinds, then reads the definitions by resource family. It produces findings on inventory, coverage, environments, state, and hardening.

How to check Dockerfiles for security issues like root users and unpinned images?

The scan reads each Dockerfile stage by stage, recording base images, the final stage's user, exposed ports, and build args. It flags mutable or unpinned tags, root users, whole-context copies without a .dockerignore, and remote content fetched into images.

Does this work if my repo has no Terraform or Kubernetes?

Yes. For repositories with only containers or dev environments, the scan reports honestly that no provisioning IaC exists, covers the container and dev-environment definitions, and states what could not be rebuilt from the repo.

What is the difference between this and a CI/CD pipeline scan?

The CI/CD scan owns when and by whom infrastructure is applied, such as the workflow running terraform apply. This scan owns what the applied definitions contain: the resources, images, users, limits, and exposure declared in the IaC files themselves.

Can it detect infrastructure that CI uses but the repo never declares?

Yes. The counting script scans CI workflows and scripts for named resources like S3 buckets, CloudFront distributions, and registries that nothing in the repo declares, surfacing them as coverage-gap evidence.