Security Checks for Every Build: Useful Gates and Reviewable Evidence
Choose meaningful CI/CD security checks for secrets, dependencies, code, configuration and permissions. Set release gates, triage ownership and exception reviews.
Security checks in CI/CD should identify actionable problems early and provide evidence for a release decision. A pipeline that runs many tools without clear ownership can accumulate warnings while still allowing the same defects into production.
Choose checks that match the application's languages, dependencies, deployment model and important abuse cases. Treat tool execution, successful analysis and a reviewed security outcome as separate events.
Build a proportionate check set
| Check | Purpose | Limitation to review |
|---|---|---|
| Secret detection | Find likely credentials in relevant changes. | Patterns can miss transformed values and non-file exposure. |
| Dependency analysis | Identify known issues in included components. | Alerts need version, reachability and deployment context. |
| Static analysis | Detect suspicious implementation patterns. | A tool may not understand application-specific permissions. |
| Configuration review | Identify unsafe infrastructure or runtime settings. | Deployed state can drift from source. |
| Security regression tests | Exercise previously defined negative cases. | Coverage is limited to the cases maintained. |
| Build provenance | Relate an artefact to source and build activity. | Provenance does not establish that the source is secure. |
Keep ordinary unit and integration tests in the programme. Validation, permission and transaction rules are often best checked through application-specific tests.
Test important permission failures
Use controlled users and tenants to verify that an ordinary user cannot perform administrative actions or retrieve another tenant's records. Test direct API requests as well as interface journeys.
For a bulk update, assert that unauthorised records are unchanged. For a failed payment or approval, assert that the business state remains consistent. A test that checks only an error response can miss a side effect that happened before rejection.
Define release decisions explicitly
State which findings block a release, who triages uncertain results and how exceptions are approved. Consider severity alongside affected functionality, exposure, exploitability and existing controls.
Do not quietly treat a broken scanner, missing report or authentication failure as a clean result. Decide whether the check is mandatory and make its execution status visible. Where a temporary exception is necessary, give it an owner, expiry and review trigger.
Keep pull request feedback useful
Focus comments on the relevant change and link to the supporting evidence. Avoid repeating the entire historic backlog on every build. Separate newly introduced issues from existing accepted work while keeping both visible to their owners.
Review false positives through a recorded process. A broad permanent suppression can hide later genuine defects in the same file or rule category.
Protect the checks themselves
Restrict who can remove required jobs, alter thresholds or change deployment permissions. Review third-party actions, runners and credentials used by security tooling. A privileged scanner can become another route into the delivery environment.
Verify the deployed service too
After release, confirm important runtime settings and representative security behaviour. Headers, network rules, secrets and identity integration can differ from the build environment.
Use manual assessment for questions that require investigation and business context. Build checks reduce repeatable mistakes; they do not establish complete penetration testing coverage.
Further reading: OWASP CI/CD guidance.
Related resources
Read our testing methodology or discuss your assessment.