Application Security & Developer Vulnerability Management (AppSec)3 min readUpdated September 2026

Scanning Infrastructure Code: A Worked Example for DevOps Consultants

A DevOps consultancy's real product is often infrastructure-as-code: Terraform modules, Helm charts, CI/CD pipeline definitions, sitting alongside whatever application code the client already has. Dependency scanning built for application packages doesn't automatically cover a misconfigured Terraform module, which is where Snyk vs GitHub Advanced Security for technical cloud & devops consultancies gets more specific than a general comparison would suggest.

Here's a worked walkthrough of what scanning actually looks like on a typical client engagement: a Terraform repo provisioning cloud infrastructure, a set of Helm charts for a Kubernetes deployment, and a container pipeline pushing images to a registry.

Vendors Covered in this Article

Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.

Starting Point: The Terraform Repo

Say a client engagement starts with a Terraform repo that provisions a VPC, a handful of managed services, and an S3-style storage bucket. Snyk's infrastructure-as-code scanning reads the Terraform plan and flags misconfigurations before they're applied, such as a storage bucket left open to public read access or a security group with an overly broad inbound rule. That check runs at pull request time, catching the mistake before terraform apply ever runs against the client's account.

Catching it here, rather than after the resource already exists in the client's account, saves the awkward cleanup step of tearing down and rebuilding something that's already live.

Next: The Helm Charts

Once the Terraform layer provisions a Kubernetes cluster, the Helm charts defining what runs inside it carry their own risk: a container running as root by default, a resource limit left unset, a secret mounted more broadly than it needs to be. Both tools can catch dependency issues in the application code packaged into those containers, but the chart configuration itself benefits from the same infrastructure-as-code scanning applied to the Terraform layer, so treat the two as one continuous review rather than separate steps.

Then: The Container Pipeline

The pipeline that builds and pushes images to a registry is where a stale base image usually hides. If the client's build process pulls a base image tagged 'latest' rather than a pinned version, a fix that landed in the base image upstream months ago might never actually reach the running container. Pin base image versions, rebuild on a schedule even without a code change, and scan the built image, not just the Dockerfile, since a vulnerability can enter through a layer the Dockerfile doesn't directly reference.

This is also the stage where an engagement most often reveals it never had a rebuild schedule at all, just a pipeline that ran once at launch and hasn't been touched since.

Comparing Coverage for This Kind of Work

Snyk's infrastructure-as-code and container scanning are built for exactly this stack, and because it isn't tied to GitHub, a consultant can run the same scanning approach whether the client hosts on GitHub, GitLab, or a self-hosted Git server. GitHub Advanced Security's code scanning is strong for the application layer sitting on top of the infrastructure, but it wasn't built primarily as an infrastructure-as-code tool, so a consultancy whose main deliverable is the Terraform and Helm layer will likely still want a dedicated IaC scanner regardless of what the client uses for application code.

Handing the Client a Pipeline They Can Maintain

A consultant who builds a secure pipeline and then leaves is only half finished. Document which scans run at which stage, who gets notified on a failed check, and what the fix process looks like for a common finding like an open storage bucket. Teams with a mature deployment pipeline tend to see fewer failed changes reach production than teams without one, a pattern the DORA research tracks across performance clusters1, which is worth mentioning to a client who's deciding whether the extra pipeline steps are worth the friction.

A pipeline runbook the client can maintain should record:

  • Which scans run at each stage of the pipeline, so the client knows what is checked before an image is pushed.
  • Who gets notified when a check fails, named by role so alerts do not depend on the consultant who built the pipeline.
  • What the fix process looks like for a common finding, such as an open storage bucket.
  • What a typical failure looks like, so the client's team can tell a real problem from noise.

What to Leave Behind When the Engagement Ends

A pipeline that only the consultant who built it understands is a liability the moment that person moves on to the next engagement. Leave the client with a short runbook: what each scanning stage checks, what a typical failure looks like, and who on the client's side should be notified first when something breaks. Walk one of the client's own engineers through a deliberately triggered failure before you leave, so the first real failure they hit after you're gone isn't also the first time they've seen the process work.

Clients who inherit a pipeline they understand tend to keep the security checks running long after the consultant is gone; clients who inherit a pipeline they don't understand tend to quietly disable the checks the first time one blocks a release they're in a hurry to ship.

Executive Capability Standard

What Good Looks Like

Good infrastructure security for a DevOps consultancy means every Terraform and Helm change gets scanned before it's applied, container images are pinned and rebuilt on a schedule rather than pulled as 'latest', and the client receives documentation on how the pipeline works before the engagement ends.

Building The Capability (5-Stage Skill Ladder)

1. Learn:Run an infrastructure-as-code scan against a client's existing Terraform repo before making any changes, just to see what's already there.
2. Do Manually:Review new Terraform and Helm pull requests manually against a short checklist of common misconfigurations until scanning is wired into the pipeline.
3. Delegate:Give one engineer on the engagement ownership of the pipeline's security checks, separate from whoever is writing the infrastructure code itself.
4. Automate:Wire infrastructure-as-code and container scanning into the CI pipeline so every pull request runs the check automatically, with a failed check blocking merge for critical findings.
5. Buy:Once you're running this pattern across several clients, a shared scanning platform with a portfolio view saves rebuilding the same pipeline checks from scratch on every new engagement.

How to Get Started

Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.

Frequently Asked Questions

Does infrastructure-as-code scanning replace a manual cloud security review?

No, but it catches the common, repeatable mistakes before they're applied, which removes most of the low-hanging findings a manual review would otherwise spend time on. A periodic manual review still makes sense for architecture-level decisions that a scanner isn't built to judge.

What if the client's Terraform code was written before we arrived?

Scan it as a first step of the engagement, before making any changes, so you have a baseline of pre-existing findings you didn't introduce. That baseline also protects you if a client later asks why a particular misconfiguration existed before you started.

How do we handle a container base image the client insists on using?

Explain the specific risk in writing (an unmaintained image, a known vulnerability, whatever applies) and offer a pinned or patched alternative. If the client still insists, document the decision so it's clear the recommendation was made and declined.

Should Helm chart scanning happen separately from Terraform scanning?

They can run as separate checks in the pipeline, but treat them as one review discipline covering the whole infrastructure layer. Splitting them into unrelated processes makes it easier for one to quietly stop running while the other continues.

Sources

Where we quote a benchmark, we show its source. Other figures in this guide are estimates or general guidance, so check them against your own numbers.

  1. Change failure rate by DORA performance cluster. DORA Accelerate State of DevOps 2024 (Google Cloud), cluster table via Octopus Deploy analysis, 2024.

Related Guides