Skip to main content

Integration with CI/CD Pipelines

🌟 Objective​

Guarantee that SBOM, SCA and dependency governance practices are applied in an automated and traceable way in the applications' build, test and release pipelines.

🚀 Automating these practices ensures consistent application, early detection of risks and controlled blocking of releases with serious findings.


🛠️ Expected actions in CI/CD pipelines​

CI/CD PhaseExpected actionResult
BuildAutomatic generation of the SBOM (e.g. Syft, CycloneDX)Versioned .json or .xml artefact
Security analysisExecution of SCA with an open source or commercial scannerFindings report (SARIF/JSON/HTML)
ValidationChecks the severity of findings and applies policiesBlocker or warning + record
ReleaseAttaches the SBOM and findings to the final artefactTraceability per version

💡 Integration examples (pseudocode)​

steps:
- name: Generate SBOM
run: syft . -o cyclonedx-json > sbom.json

- name: Run SCA
run: grype sbom:sbom.json -o sarif > results.sarif

- name: Validate findings
run: ./scripts/validate-findings.sh results.sarif

Can be integrated into GitHub Actions, Azure DevOps, GitLab CI, Jenkins, etc.


🔐 Blocking policies (examples)​

CriterionAction
CVSS >= 9.0 and not mitigatedBlocks the pipeline
Vulnerability with a known exploitRequires formal approval
"Medium" finding with a patch availableGenerates a warning + task

The rules may be maintained in a versioned file (policy.yaml) or in a central system.


🔧 Integration with the backlog and traceability​

  • Findings must automatically generate:
    • A task in Jira/Azure DevOps
    • An association with the commit/PR
    • A cross-reference to the SBOM and the release artefact

📄 The use of formats such as SARIF is suggested, to allow automatic import by IDEs and ALM platforms.


🔒 Recommended practices by risk​

Application riskMandatory CI/CD practice
L1 (low)SBOM generation + lightweight SCA (e.g. npm audit)
L2 (medium)Formal SCA + blocking of critical findings
L3 (high)Complete SBOM, automated SCA, recording and approval of exceptions

🔗 Links to other files​

DocumentRelationship with the pipeline
01-inventario-sbom.mdMandatory input source
02-analise-sca.mdIntegrated scanner and validation
09-excecoes-e-aceitacao-risco.mdControl of findings with documented justification

🚀 Integrating SBOM and SCA into pipelines is the bridge between theory and execution. It ensures that the policies defined by the security team are effectively applied, auditable and repeatable.