---
title: "DevSecOps for small teams: add security checks to CI · CloudSat"
description: "Add security checks to CI without a security team: secret scanning, dependency and image scans, static analysis, IaC checks, SBOMs and a locked-down pipeline."
url: https://cloudsat.io/learn/devsecops-pipeline-security-checks
updated: 2026-11-18T12:00:00Z
source: CloudSat (https://cloudsat.io/). Prices in USD.
---

[Security](https://cloudsat.io/learn/topic/server-security)

# DevSecOps for small teams: add security checks to CI

Add security checks to CI without a security team: secret scanning, dependency and image scans, static analysis, IaC checks, SBOMs and a locked-down pipeline.

CloudSat team November 18, 2026 6 min read

DevSecOps means building security into the way software is delivered instead of adding a security gate at the very end. For a team without a dedicated security engineer, it comes down to two things: a handful of automated checks that run on every change and fail the build on serious findings, and a few rules that keep the pipeline itself from becoming the way in. 2025 made the second part hard to ignore. In March, a compromised version of the widely used `tj-actions/changed-files` GitHub Action dumped CI secrets into workflow logs. In September, the self-propagating Shai-Hulud malware spread through npm packages by stealing maintainers' publishing tokens.

## The checks, in pipeline order

| Stage | Check | Open-source tools | Fail the build when |
| --- | --- | --- | --- |
| Before commit | Secret scanning | gitleaks, TruffleHog | Any secret is found |
| Build | Dependency scanning | OSV-Scanner, Trivy | A high or critical vulnerability has a fix available |
| Build | Static analysis (SAST) | Semgrep, Opengrep, CodeQL | A high-confidence finding appears in new code |
| Build | Infrastructure as code | Trivy, Checkov | A rule such as "container runs as root" fails |
| Package | Image scanning | Trivy, Grype | A critical vulnerability with a fix is in the image |
| Package | SBOM | Syft, Trivy | Never: store it with the release |
| Release | Signing | Sigstore cosign | An unsigned artifact reaches deployment |
| Staging | Dynamic scan | ZAP baseline scan | A new high-risk alert appears |

You do not need all eight on day one. Secrets, dependencies and images catch the most for the least effort, so start there.

## Start with secrets

A leaked credential is the quickest route from a repository to production. Run gitleaks before commits reach the server and again in CI, because hooks can be skipped:

```bash
gitleaks git --redact -v .
gitleaks dir --redact ./config
```

The `git` mode scans commit history and the `dir` mode scans files on disk; `--redact` keeps the secret itself out of the output and the CI log. When a real secret is found in a pushed commit, rotate it first and clean the history second. Once a secret has left a laptop, treat it as known to others.

## Dependencies: the biggest attack surface

Most of the code you ship was written by someone else. Scan the lockfiles on every build:

```bash
osv-scanner scan source -r .
```

Then make installs reproducible and less exposed:

- Commit lockfiles and install exactly what they list: `npm ci`, `pip install --require-hashes -r requirements.txt`, or your ecosystem's equivalent.
- Add `--ignore-scripts` to `npm ci` where the project allows it. Install-time scripts are a favorite entry point for malicious packages.
- Automate updates with Dependabot or Renovate, and give new releases a short waiting period before adoption. Renovate's `minimumReleaseAge` setting does this, which gives the registry and the community time to catch and remove a hijacked version before it reaches you.

## Static analysis without drowning in noise

SAST tools read your source for injection flaws, unsafe deserialization and similar patterns. The risk is noise: a first scan on an old codebase can report hundreds of findings, and a team that sees hundreds of warnings ignores all of them. Scan only what changed:

```bash
semgrep scan --config p/default --baseline-commit "$(git merge-base origin/main HEAD)" --error
```

`--baseline-commit` reports only findings introduced since the branch point, and `--error` turns them into a failing exit code. Opengrep is a community fork of the Semgrep engine with the same rule format, and GitHub's CodeQL is free for public repositories. Whichever you use, start with a small rule set and add rules once the first ones run clean.

## Containers and infrastructure code

Scan the image you are about to ship, not just the source:

```bash
trivy image --severity HIGH,CRITICAL --ignore-unfixed --exit-code 1 registry.example.com/app:1.4.2
trivy config --exit-code 1 ./deploy
syft registry.example.com/app:1.4.2 -o cyclonedx-json > sbom.cdx.json
```

The first command fails on serious vulnerabilities that already have a fix, which keeps the build actionable. The second checks Dockerfiles, Compose files, Kubernetes manifests and Terraform for risky settings. The third writes a software bill of materials (SBOM), an inventory of every package in the image. When the next widely exploited library flaw is announced, the SBOM tells you in minutes whether you ship it.

Build on small base images, pin them by digest, and run containers as a non-root user. Each removes a whole class of findings before any scanner runs.

## Lock down the pipeline itself

The CI system holds deploy keys and cloud credentials, which makes it a target in its own right.

- **Pin third-party actions to a full commit SHA**, not a tag. Tags can be moved to malicious code, which is exactly what happened with `tj-actions/changed-files`. Dependabot can keep SHA pins current.
- **Grant the workflow token read-only access by default** and raise it per job only where needed:

```yaml
permissions:
  contents: read
```

- **Protect the main branch.** Require passing checks and an approving review before merge, and block direct pushes.
- **Scope secrets to environments**, so a pull-request build cannot read production credentials. Where your cloud supports it, exchange a short-lived OpenID Connect token for access instead of storing long-lived keys.
- **Keep self-hosted runners away from public repositories.** A pull request from a fork could run arbitrary code on them.

If you run your own forge or runners, for example [GitLab](https://cloudsat.io/apps/deploy-gitlab) or [Gitea](https://cloudsat.io/apps/deploy-gitea) on a CloudSat server, treat that server like production: it holds the keys to everything you deploy.

## A rollout plan that sticks

Turning everything on at once produces a red pipeline and a team that learns to ignore it. Spread the work over a month:

1. **Week one:** secret scanning in pre-commit hooks and CI, plus read-only workflow tokens.
2. **Week two:** dependency scanning that blocks only on fixable critical issues, and automated update pull requests.
3. **Week three:** image scanning and SBOM generation in the release job, with actions pinned to commit SHAs.
4. **Week four:** incremental static analysis on new code, and a nightly full scan that opens tickets instead of failing builds.

Raise the bar only when the current checks pass on most builds.

## Rules for the humans

Tools only help when the team agrees what a finding means. Write down three rules:

1. **What blocks a merge:** for example, any secret, and any critical or high vulnerability with an available fix.
2. **How fast the rest gets fixed:** a target per severity, tracked like any other bug.
3. **How exceptions work:** an ignore entry needs a reason, an owner and an expiry date, written next to it in the ignore file.

Track two numbers over time: how long critical findings stay open, and how many high findings are open today. If both fall, the program works.

## FAQ

### Do we need a commercial security platform?

Not to start. The open-source tools above cover secrets, dependencies, code, images and infrastructure. Commercial platforms add dashboards, triage workflows and support, which become worth paying for as the number of repositories grows.

### Will these scans slow down every build?

Secret, dependency and incremental SAST scans usually take seconds to a few minutes. Run those on every push, and schedule full-history scans and dynamic tests nightly.

### Why bother with an SBOM if nothing reads it?

Because the day a critical vulnerability is announced in a popular library, someone will ask whether you are affected. With SBOMs stored for every release, the answer is a search instead of an investigation.

**Run it on CloudSat.** Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. [See plans](https://cloudsat.io/plans) or [deploy a server](https://dash.cloudsat.io/console/deploy).

## Keep reading

[All guides in Security](https://cloudsat.io/learn/topic/server-security)

- [Cloud IAM for small teams: least privilege, MFA and tokens](https://cloudsat.io/learn/cloud-iam-least-privilege-checklist): Security Cloud IAM for small teams: least privilege, MFA and tokens 6 min read
- [Cybersecurity software explained: scanners, SIEM, EDR, IAM](https://cloudsat.io/learn/security-tool-categories-explained): Security Cybersecurity software explained: scanners, SIEM, EDR, IAM 6 min read
- [Put SafeLine WAF in front of a web app on a Linux VPS](https://cloudsat.io/learn/safeline-waf-reverse-proxy-setup): Security Put SafeLine WAF in front of a web app on a Linux VPS 6 min read
- [DDoS protection for a home network: what actually helps](https://cloudsat.io/learn/ddos-protection-for-a-home-connection): Security DDoS protection for a home network: what actually helps 6 min read
