20 DevOps Tools for Secure Code Delivery

20 tools to secure code from commit to cluster: Gitleaks, Semgrep, CodeQL, Trivy, Syft, Cosign, SLSA, Harbor, Vault, Kyverno, ZAP and more.

Dec 31, 2025 - 17:00
Nov 8, 2026 - 11:08
 0  199
TOPICDevOps ToolsPractical guide
20 DevOps Tools for Secure Code Delivery

Secure code delivery means every change is checked, built, signed and deployed in a way you can verify later. Twenty tools cover that path: Gitleaks, TruffleHog, pre-commit, Semgrep, CodeQL, SonarQube, Dependabot, Renovate, OWASP Dependency-Check, Trivy, Grype, Syft, Checkov, Cosign, SLSA provenance generators, Harbor, HashiCorp Vault, Kyverno, OPA Gatekeeper and ZAP, with Falco as a runtime bonus.

Our 12 DevSecOps tools for secure CI/CD guide covers scanners stage by stage. This post follows a single change from a developer's laptop to a running pod and asks, at each hop, what proves the artifact is the one you reviewed. That makes it a software supply chain view: secrets, code, dependencies, the build, signatures, the registry and the cluster. Every tool name and command was checked against the project's own docs in November 2026.

Key takeaways

  • Scanning finds problems; signing and provenance prove that what runs is what you built. You need both.
  • Stop secrets before they reach Git. Pre-commit hooks with Gitleaks are cheaper than rotating a leaked key.
  • Generate an SBOM for every image (Syft, Trivy) and keep it with the artifact so you can answer "are we affected?" in minutes.
  • Sign images with Cosign and verify the signature at admission with Kyverno or a similar policy engine. Unsigned images should not run in production.
  • Pin dependencies and let Dependabot or Renovate raise update pull requests, so patches arrive through review instead of all at once.
  • Runtime detection (Falco) covers what the pipeline cannot predict.

The delivery path and where each tool fits

StageRiskTools in this guide
Developer workstationSecrets committed, unsafe codepre-commit, Gitleaks, Semgrep
Pull requestVulnerable code and dependenciesCodeQL, SonarQube, Dependency-Check, Dependabot, Renovate, TruffleHog
Infrastructure codeMisconfigured cloud and KubernetesCheckov, Trivy config scanning
BuildTampered build, unknown contentsSyft, Trivy, Grype, SLSA provenance
Sign and storeImage swapped after buildCosign, Harbor
DeployUnsigned or non-compliant workloadsKyverno, OPA Gatekeeper, Vault
RunningRuntime attacks, exposed endpointsZAP, Falco

Stage 1: before the commit

1. pre-commit

pre-commit is a framework that installs Git hooks from a .pre-commit-config.yaml file. Every developer runs the same checks before a commit is created, and the same file can run in CI to catch anyone who skipped the hooks.

repos:
  - repo: https://github.com/gitleaks/gitleaks
    rev: vX.Y.Z   # pin to the latest released tag
    hooks:
      - id: gitleaks

Pin rev to a released tag and update it like any other dependency.

2. Gitleaks

Gitleaks scans Git history, staged changes or directories for secrets using regex and entropy rules. In CI, gitleaks git scans the repository history, and gitleaks dir scans a folder. It exits non-zero when it finds a leak, which fails the job.

3. Semgrep

Semgrep is a fast static analysis tool with rules that look like the code they match. It runs locally in seconds and in CI on changed files. Semgrep's community rules cover common injection, crypto and framework mistakes, and writing your own rule for an internal API is quick.

semgrep scan --config auto --error

Stage 2: the pull request

4. CodeQL

CodeQL, from GitHub, builds a database from your code and runs queries that trace data flow from untrusted input to dangerous sinks. It powers GitHub code scanning and posts alerts on pull requests. It is free for public repositories; private repositories need GitHub Code Security (previously part of GitHub Advanced Security).

5. SonarQube

SonarQube (Server, or SonarQube Cloud as a service) combines code quality and security rules and applies a quality gate to new code. Teams use it to block merges that add bugs, vulnerabilities or untested code, while older code is cleaned up over time.

6. Dependabot

Dependabot is built into GitHub. It raises alerts for dependencies with known vulnerabilities and can open pull requests for security fixes and version updates, configured in .github/dependabot.yml.

version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
  - package-ecosystem: "docker"
    directory: "/"
    schedule:
      interval: "weekly"

7. Renovate

Renovate does the same job across GitHub, GitLab, Bitbucket and Azure DevOps, with more control: grouping updates, automerging patch releases that pass tests, and pinning Docker image digests. It suits monorepos and teams not on GitHub.

8. OWASP Dependency-Check

Dependency-Check is an OWASP software composition analysis tool. It identifies project dependencies and reports known CVEs against them, with plugins for Maven, Gradle, Jenkins and a command-line interface. It is a free option for Java-heavy shops.

9. TruffleHog

TruffleHog finds secrets in Git, file systems, S3 buckets and more, and can verify many credential types by testing them against the provider's API. Verification reduces false positives, so a finding marked verified should be treated as an incident: revoke and rotate the key, then clean history.

Stage 3: infrastructure as code

10. Checkov

Checkov scans Terraform, CloudFormation, Kubernetes manifests, Helm charts and Dockerfiles for misconfigurations such as public buckets, missing encryption or containers running as root.

checkov -d infra/ --framework terraform --compact

The tfsec project has moved into Trivy, so teams that used tfsec should switch to trivy config.

Stage 4: the build

11. Trivy

Trivy, from Aqua Security, scans container images, file systems, Git repositories and Kubernetes clusters for vulnerabilities, misconfigurations, secrets and licences. It can also produce SBOMs in CycloneDX or SPDX format.

trivy image --severity HIGH,CRITICAL --exit-code 1 registry.example.com/shop/api:1.4.2
trivy image --format cyclonedx --output sbom.cdx.json registry.example.com/shop/api:1.4.2

12. Grype

Grype, from Anchore, is a vulnerability scanner for images and file systems. It can scan an SBOM directly, so you can generate the SBOM once with Syft and re-scan it daily as new CVEs are published, without pulling the image again.

13. Syft

Syft generates SBOMs from images and directories in SPDX, CycloneDX and its own JSON format. An SBOM lists every package in the artifact, which is what you search when a new vulnerability like Log4Shell is announced. More on why it matters: how SBOMs support DevOps compliance.

syft registry.example.com/shop/api:1.4.2 -o spdx-json > sbom.spdx.json
grype sbom:./sbom.spdx.json --fail-on high

14. SLSA provenance generators

SLSA (Supply-chain Levels for Software Artifacts) is an OpenSSF framework that defines build levels. Provenance is a signed statement of how an artifact was built: source repository, commit, builder and parameters. The slsa-github-generator project produces provenance for GitHub Actions builds, and GitHub artifact attestations offer a built-in way to create signed provenance. Read more in why artifact provenance matters.

Stage 5: sign and store

15. Cosign (Sigstore)

Cosign signs and verifies container images and other OCI artifacts. With keyless signing, a CI job proves its identity through OIDC, Sigstore's Fulcio issues a short-lived certificate, and the signature is recorded in the Rekor transparency log. No long-lived signing key has to be stored.

# In CI, sign by digest (keyless, using the workflow's OIDC identity)
cosign sign --yes registry.example.com/shop/api@sha256:3f1c...

# Verify before deploy
cosign verify registry.example.com/shop/api@sha256:3f1c... \
  --certificate-identity-regexp 'https://github.com/example/shop/.github/workflows/.*' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

Always sign and deploy by digest, not tag; tags can be moved. Cosign can also attach SBOMs and provenance as attestations (cosign attest).

16. Harbor

Harbor is a CNCF graduated open source registry. It adds role-based access, vulnerability scanning with Trivy, replication between registries, and policies that prevent pulling images with critical vulnerabilities. It stores signatures and SBOMs next to the image. See our container registry security practices.

Stage 6: deploy

17. HashiCorp Vault

Vault keeps secrets out of pipelines and manifests. CI jobs and pods authenticate (through JWT/OIDC, Kubernetes service accounts or cloud IAM) and receive short-lived credentials. Dynamic database credentials that expire after a deploy are much safer than a shared password in a CI variable.

18. Kyverno

Kyverno is a Kubernetes policy engine with policies written in YAML. Its verifyImages rule checks Cosign signatures and attestations at admission, so an image that was not signed by your pipeline is rejected.

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: require-signed-images
spec:
  validationFailureAction: Enforce
  webhookTimeoutSeconds: 30
  rules:
    - name: verify-signature
      match:
        any:
          - resources:
              kinds: ["Pod"]
      verifyImages:
        - imageReferences:
            - "registry.example.com/shop/*"
          attestors:
            - entries:
                - keyless:
                    subject: "https://github.com/example/shop/.github/workflows/*"
                    issuer: "https://token.actions.githubusercontent.com"

Newer Kyverno releases also offer CEL-based policy types; check the docs for the version you run.

19. OPA Gatekeeper

Gatekeeper brings Open Policy Agent to Kubernetes admission control, with policies written in Rego as ConstraintTemplates. Teams that already use OPA for APIs or Terraform plans often prefer it so one policy language covers everything. Use it to block privileged pods, enforce resource limits or restrict registries.

Stage 7: running

20. ZAP

ZAP (formerly OWASP ZAP, now maintained with Checkmarx sponsorship as "ZAP by Checkmarx") tests a running web application from the outside. The baseline scan runs passively and fits every deploy to staging; full scans run on a schedule. Run it only against applications you own. Our guide on integrating ZAP into CI/CD has a working pipeline.

Bonus: Falco

Falco, a CNCF graduated project, watches system calls and Kubernetes audit events and raises alerts for suspicious behaviour, such as a shell started in a container or a write to /etc. It is the safety net for problems no scanner predicted. We list it as a bonus because it protects running workloads rather than the delivery path itself.

A minimal secure delivery pipeline

# GitHub Actions sketch: build, scan, SBOM, sign
name: release
on:
  push:
    branches: [main]
permissions:
  contents: read
  id-token: write   # for keyless signing
  packages: write
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Secret scan
        run: gitleaks git --redact --exit-code 1
      - name: Build and push
        id: push
        run: |
          docker build -t ghcr.io/example/api:${{ github.sha }} .
          docker push ghcr.io/example/api:${{ github.sha }}
          echo "digest=$(docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/example/api:${{ github.sha }})" >> "$GITHUB_OUTPUT"
      - name: Scan image
        run: trivy image --severity CRITICAL --exit-code 1 ${{ steps.push.outputs.digest }}
      - name: SBOM
        run: syft ${{ steps.push.outputs.digest }} -o cyclonedx-json > sbom.json
      - name: Sign and attest
        run: |
          cosign sign --yes ${{ steps.push.outputs.digest }}
          cosign attest --yes --type cyclonedx --predicate sbom.json ${{ steps.push.outputs.digest }}

This assumes the tools are installed on the runner (each project publishes an official GitHub Action or install script). The deploy side then needs a Kyverno or Gatekeeper policy that rejects anything without that signature.

What to adopt first

  1. Secret scanning (Gitleaks in pre-commit and CI). It has the best effort-to-risk ratio.
  2. Dependency updates (Dependabot or Renovate) with a weekly schedule.
  3. Image scanning with Trivy, failing on critical issues that have a fix available.
  4. SBOM generation for every release.
  5. Image signing with Cosign, then enforcement at admission.
  6. Static analysis with Semgrep or CodeQL, starting with a small set of high-confidence rules.

For defending the pipeline itself (runner hardening, token scopes, protected branches), read securing a CI/CD pipeline against supply chain attacks.

Measuring whether delivery is getting safer

Tools are only useful if findings get fixed. Track a few numbers per repository or team: the share of production images that are signed and verified at admission, the share of releases with an SBOM stored next to the image, the median age of open critical vulnerabilities that have a fix available, and the number of secrets detected after commit rather than before it. Falling numbers in the last two show the earlier stages are working. Review exceptions (policy bypasses, ignored findings) on a schedule, because a bypass that never expires turns into a permanent gap.

Learn DevSecOps hands-on

Our DevSecOps training builds a pipeline like the one above with scanning, SBOMs, signing and admission policies. It runs in our Kharadi, Pune classroom and live online.

FAQ

What is secure code delivery?

It is a delivery process where every change is scanned, built in a controlled pipeline, signed and verified before deployment, so you can prove that what runs in production is what was reviewed.

What is the difference between SAST and SCA?

SAST tools such as Semgrep, CodeQL and SonarQube analyse your own source code. SCA tools such as Dependabot, Dependency-Check, Trivy and Grype check third-party dependencies for known vulnerabilities.

Why sign container images?

Signing proves who built an image and that it has not changed since. With Cosign signatures verified at admission, a cluster can refuse images that did not come from your pipeline.

Do I need both Syft and Trivy?

Not always. Trivy can scan and produce SBOMs. Some teams use Syft for SBOMs and Grype for scanning because Grype can re-scan stored SBOMs quickly. Pick one path and use it consistently.

What is SLSA?

SLSA is an OpenSSF framework for supply chain security. It defines build levels and requires signed provenance that records how, where and from which source an artifact was built.

Is tfsec still maintained?

tfsec has been folded into Trivy. Aqua Security recommends using trivy config for Terraform and other IaC scanning.

Where should I start with DevSecOps tools?

Start with secret scanning and dependency updates, then add image scanning, SBOMs and signing. Add SAST once the team can triage findings without blocking every pull request.

References

Interested in learning more?Get a callback from our training advisors.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0
Mridul I am a passionate technology enthusiast with a strong focus on DevOps, Cloud Computing, and Cybersecurity. Through my blogs at DevOps Training Institute, I aim to simplify complex concepts and share practical insights for learners and professionals. My goal is to empower readers with knowledge, hands-on tips, and industry best practices to stay ahead in the ever-evolving world of DevOps.