← Dashboard

devops / devsecops

DevSecOps: Securing the Pipeline and the Software Supply Chain

A guide for the engineer who owns the pipeline: which scanner belongs at which stage, how a CI workflow itself gets attacked, and what signing, SBOMs and SLSA add. Licenses and free-tier limits were checked on each project's own pages in October 2026.

updated Nov 2026·a 13-minute read·for DevOps and platform engineers

DevSecOps is often described as "shifting security left", meaning problems are caught while the code is still being written instead of after release. This page takes the platform engineer's view of that idea. You do not write the application, but you own the pipeline that builds and ships it, which gives you two jobs. First, put the right automated checks at the right stage so findings reach developers fast. Second, protect the pipeline itself, because a CI system holds deploy credentials and runs code from many sources, which makes it an attractive target. If your goal is to test an application's behavior for security bugs by hand, that is a different discipline, covered on the QA security testing page.

01 · SCANNER PLACEMENT

Which scan runs where, and what it can and cannot find

Free scanners by pipeline stage, licenses checked October 2026
StageScan typeLooks forFree options
Before commit and on every pushSecret detectionPasswords, API keys and tokens in code and git historyGitleaks (MIT license), which also ships a pre-commit hook; GitHub secret scanning, which runs automatically for free on public repositories
On pull requestStatic analysis (SAST)Bug patterns in your own source codeCodeQL, available on public GitHub repositories; Semgrep (LGPL-2.1)
On pull request and on a scheduleDependency analysis (SCA)Known, publicly disclosed vulnerabilities in the libraries you useDependabot alerts; OWASP Dependency-Check
After the image buildContainer and config scanVulnerable packages in the image, plus misconfigurations and secretsTrivy (Apache-2.0), which lists containers, Kubernetes, repositories and clouds as targets
Against a deployed test environmentDynamic scan (DAST)Missing headers, insecure cookies and similar issues in a running appZAP baseline scan (Apache License 2.0), a passive scan that its docs say is designed for CI

Two limits are worth stating. Scanners report possibilities, not proof: SAST tools produce false positives, and SCA reports a vulnerable library even when your code never calls the vulnerable function. Also, none of these replaces a person thinking about how the application can be abused. Start with secret detection and dependency alerts, because they have the highest signal and the lowest noise, then add SAST once the team will actually triage results.

CodeQL's availability is narrower than it looks. GitHub's documentation lists public repositories on GitHub.com, and organization-owned repositories on Team or Enterprise plans with GitHub Code Security enabled. Private repositories on a personal free account are not on that list.

02 · ATTACKS ON THE PIPELINE

A workflow is code with credentials: three failure modes

Mutable action references. In March 2025 the third-party action tj-actions/changed-files was compromised (CVE-2025-30066). CISA's alert says the compromise allowed disclosure of secrets including access keys, personal access tokens, npm tokens and private RSA keys, and that a compromise of reviewdog/action-setup (CVE-2025-30154) may have enabled it. GitHub's secure-use guide recommends pinning actions to a full-length commit SHA, noting that an attacker would need a SHA-1 collision to forge a valid object. The same page now says a workflow dependency lockfile is the strongest protection and supersedes SHA pinning for repositories that adopt it.

pinning and keeping pins freshpattern
# In the workflow: a full commit SHA, with the version as a comment
- uses: actions/checkout@<full-length-commit-sha> # v7.0.1

# .github/dependabot.yml: let Dependabot propose action updates
version: 2
updates:
  - package-ecosystem: github-actions
    directory: /
    schedule:
      interval: weekly

GitHub's guide describes Dependabot version updates as the way to keep action references current, which removes the usual objection that pinned SHAs go stale.

Script injection. If a workflow pastes untrusted text, such as a pull request title, straight into a shell script, the author of that text can run commands on your runner. GitHub's guidance is to pass the value through an intermediate environment variable instead of expanding it in the script:

script injection: before and afterfrom GitHub's secure-use guide, shortened
# Risky: the expression is expanded into the shell script itself
- run: echo "Title: ${{ github.event.pull_request.title }}"

# Safer: the value arrives as data in an environment variable
- env:
    TITLE: ${{ github.event.pull_request.title }}
  run: echo "Title: $TITLE"

Untrusted code with trusted permissions. The same guide warns that the pull_request_target and workflow_run triggers, combined with checking out untrusted pull request code, expose a repository to security risks, because those triggers run with more privileges than a normal pull_request run. Avoid combining them unless you have read the linked guidance.

03 · CREDENTIAL HYGIENE

Fewer long-lived keys: tokens, OIDC and the leaked-secret drill

The cheapest security win in most pipelines is deleting standing credentials. GitHub's OpenID Connect support lets a workflow exchange a short-lived token directly with a cloud provider, so you no longer duplicate cloud credentials as long-lived GitHub secrets. Set up the trust relationship on the cloud side, then have the workflow request a token at run time. Pair that with a read-only default for GITHUB_TOKEN, which GitHub's guide recommends, and raise permissions for individual jobs only where needed.

WATCHRemoving a secret from the latest commit does not un-leak it. The key is still in git history and in every clone and fork. The drill is: revoke and rotate the credential first, then clean history if you want to, and last check the provider's audit log for use of the old key. Run a history scan with gitleaks git to find others.

04 · SUPPLY CHAIN

Signing, SBOMs and SLSA in plain terms

Four supply-chain terms, as defined by their own projects
TermWhat it isPractical use
SBOMA software bill of materials: a list of the components inside a build. CycloneDX and SPDX are the two best-known formats.When a new vulnerability is announced, search your SBOMs to learn which products contain the library
SigstoreAn open source project for signing and verifying software artifacts such as container images and SBOMs, using ephemeral signing keys so there are no long-term keys to manageSign images in CI; verify before deploy
SLSA"Supply-chain Levels for Software Artifacts": incrementally adoptable guidelines for supply chain security, set by industry consensusA maturity ladder for build integrity and provenance
NIST SSDF (SP 800-218)The Secure Software Development Framework from NISTA catalog of secure-development practices to map your pipeline controls against

You do not need all four on day one. A realistic order is: pin and update actions, add secret detection, turn on dependency alerts, scan the built image, then generate an SBOM and sign images. Each step is useful alone, and you can describe the one you stopped at honestly in an interview.

05 · FREE LEARNING

Guides and official documentation

06 · PRACTICE

Audit a workflow you already have

TRY ITAn hour, one repository: open the workflow files in a repo you own and list every uses: line that points at a tag instead of a SHA. Add the Dependabot configuration above. Search the files for ${{#123;{ inside run: blocks and move anything that comes from user input into an env: variable. Then run gitleaks git against the repository history. Write down what you found; that list is the start of a real security backlog.

07 · FAQ

Frequently asked questions

What is DevSecOps?

DevSecOps builds security checks into the same automated pipeline that builds and ships software, so vulnerabilities are found while code is being written and reviewed rather than after release. It also covers securing the pipeline itself, since CI systems hold deploy credentials.

What does shift left mean in security?

Shift left means moving security checks earlier in the development timeline, toward the developer's keyboard and the pull request, instead of leaving them to a late audit. Findings are cheaper to fix when the author still remembers the code.

Which security scanners should I add to a pipeline first?

Start with secret detection and dependency vulnerability alerts, which give the most useful findings with the least noise. Add container image scanning after the build, then static analysis once the team will triage the results.

Should I pin GitHub Actions to a commit SHA?

For third-party actions, yes. GitHub recommends a full-length commit SHA because tags can be moved, and Dependabot can keep the pinned versions up to date. GitHub now also describes workflow dependency lockfiles as the strongest option.

What is an SBOM?

A software bill of materials is a list of the components inside a piece of software. When a new library vulnerability is announced, SBOMs let you find which of your products include it. CycloneDX and SPDX are two common formats.

Related reading

Security sits across the whole toolchain and the wider security curriculum.