Skip to main content

Applying in the Lifecycle - Dependencies, SBOM and SCA

🧭 When to apply​

The practices accompany the application from kick-off to post‑release.
Each event is a trigger that must produce objective evidence.

SDLC Phase / EventExpected actionArtefact/Evidence
Project startPublish the policy and configure internal repositoriesPolicy document + repo-config.yaml
New dependencyReview origin, licence, maintenance and CVEsApproval ticket + record
Build / CIGenerate the SBOM and run SCA with gatessbom.* + sca-report.* + logs
ReleaseReview findings/exceptions and decide go/no-goreleases.md + excecoes.yaml
Regular cycleBots open update PRs with impact assessmentAutomatic PRs + tests/logs
Public critical CVEImpact analysis + backport/fixResponse issue + mitigation plan

👥 Who carries out each action​

Governance is collective - roles and responsibilities consistent with intro.md.

RoleResponsibility
Developer / LeadInclude dependencies, initial triage, pinning, fixes
AppSec EngineerPolicies, gate tuning, exception and risk management
DevOps / CI/CDSBOM, SCA, internal repositories, update bots and impact analysis
QAEvidence, regression tests, validation of bot PRs
Product OwnerGo/no-go decision and acceptance of residual risk
GRC / ManagementAudit, compliance, evidence retention

📖 Reusable User Stories​

Each US turns the prescription into an actionable backlog, with context, scientific rationale, BDD/checklist, artefacts, L1–L3 proportionality and integration into the SDLC.


US-01 - Secure dependency management​

Context.
External dependencies without validation introduce invisible risk (abandoned components, dubious origin, incompatible licences).

User Story

Story.
As a Developer, I want to use only approved dependencies, so that the risk of inherited vulnerabilities and licence conflicts is reduced.

Acceptance criteria (BDD).

  • Given that I intend to include a dependency When I submit an approval request Then the dependency is validated according to the policy (origin, licence, maintenance, CVEs)

Checklist.

  • Dependency formally approved
  • Licence validated / compatible
  • No known critical CVEs
  • Provenance confirmed (internal repository)

Artefacts & evidence.

  • dependencies-approval.md
  • Validation ticket in the backlog

Proportionality by risk.

LevelMandatory?Adjustments
L1OptionalSimplified approval
L2YesFormal validation + licence
L3YesAppSec review + provenance

Integration into the SDLC.

PhaseTriggerResponsibleSLA
Design/DevInclusion of a dependencyDeveloper + AppSecAt dependency approval

Useful links.


US-02 - SBOM in every build​

Context.
Without an up-to-date SBOM it is not possible to quickly determine exposure to CVEs and meet audit requirements.

User Story

Story.
As DevOps / SRE, I want to generate an SBOM in every build, so that there is complete component traceability.

Acceptance criteria (BDD).

  • Given that a build is triggered When the artefact is produced Then an SBOM is generated in CycloneDX or SPDX format

  • Given a generated SBOM

  • When it is associated with the release

  • Then it is stored and accessible for audit

Checklist.

  • SBOM in CycloneDX or SPDX format
  • SBOM versioned and associated with the release
  • Accessible for audit

Artefacts & evidence.

  • sbom.json / sbom.xml

Proportionality by risk.

LevelMandatory?Adjustments
L1YesBasic SBOM
L2YesComplete SBOM, included in the release
L3YesSigned SBOM + integrity verification

Integration into the SDLC.

PhaseTriggerResponsibleSLA
CIBuild executionDevOpsAccording to the US cycle

Useful links.


US-03 - Automatic SCA with gates​

Context.
SCA identifies known vulnerabilities in dependencies (direct and transitive) and must block unacceptable risk.

User Story

Story.
As an AppSec Engineer, I want to run automatic SCA in the pipelines, so that CVEs are detected before production.

Acceptance criteria (BDD).

  • Given a build When the SBOM is generated Then the SCA runs and blocks findings that exceed the threshold per Lx

Checklist.

  • SCA scanner integrated (e.g. Dependency‑Check/Trivy/Grype)
  • Findings documented and triaged
  • Automatic blocking for critical CVEs (L2) and medium+ (L3)

Artefacts & evidence.

  • sca-report.html / JSON
  • Pipeline logs with gates

Proportionality by risk.

LevelPolicy
L1Block High/Critical
L2Block High/Critical
L3Block Medium+

Integration into the SDLC.

PhaseTriggerResponsibleSLA
CIGeneration of the SBOMDevOps + AppSecDuring the build (immediate blocking)

Useful links.


US-04 - Formal and temporary CVE exceptions​

Context.
Not all findings can be resolved immediately; exceptions must be formal, justified and temporary.

User Story

Story.
As an AppSec Engineer, I want to formalise CVE exceptions, so that governance is maintained and residual risk is justified.

Acceptance criteria (BDD).

  • Given that there is an unresolved CVE When an exception is requested Then the exception is formalised in excecoes.yaml with technical and business justification, approver and deadline

  • Given an exception with a defined deadline

  • When the deadline passes

  • Then a periodic review with risk reassessment is triggered

Checklist.

  • excecoes.yaml with technical and business justification
  • Approver and deadline defined
  • Compensating control specified
  • Periodic review scheduled

Artefacts & evidence.

  • excecoes.yaml (versioned)
  • Approval recorded in the backlog

Reference: This US implements [Ch. 14-US-01: Formal exception process] in the context of vulnerabilities in dependencies (CVEs). The approval process, TTL and revalidation must follow the master exception policy in Ch. 14.

Proportionality by risk.

LevelMandatory?Adjustments
L1YesFormal record with justification, compensating control, approver and deadline
L2YesRevalidation at expiry (TTL of Policy 05 §7: 60 days Low/Medium, 30 days High)
L3YesExecutive validation + risk metrics

Integration into the SDLC.

PhaseTriggerResponsibleSLA
ReleasePending findingsAppSec + Product OwnerAccording to the deadline defined in the exception

Useful links.


US-05 - Release validation (go/no-go)​

Context.
Each release is a risk decision that must be explicit and traceable.

User Story

Story.
As a Product Owner, I want to validate findings and exceptions before go‑live, so that I can make an informed go/no-go decision.

Acceptance criteria (BDD).

  • Given a release candidate When I check the security criteria and residual risk Then I document the decision and any conditions (if they exist)

Checklist.

  • List of findings and status
  • Approved and valid exceptions
  • Go/no-go decision documented

Artefacts & evidence.

  • releases.md with history and justifications

Proportionality by risk.

LevelMandatory?Adjustments
L1OptionalSimple decision
L2YesFormal review
L3YesFormal review + AppSec involved

Integration into the SDLC.

PhaseTriggerResponsibleSLA
Pre‑releaseRC readyProduct Owner + QA + AppSecBefore deploy to production

Useful links.


US-06 - Internal repositories as the single source​

Context.
Without internal repositories, dependencies may be resolved from uncontrolled sources (typosquatting, confusion, malice).

User Story

Story.
As DevOps / SRE, I want to enforce approved internal repositories, so that provenance and consistency are guaranteed.

Acceptance criteria (BDD).

  • Given that the package manager resolves dependencies When the build takes place Then it only accepts sources from the approved internal repository

Checklist.

  • repo-config.yaml active (internal proxy/registry)
  • Blocking of external sources (allowlist)
  • Access logs monitored and retained

Artefacts & evidence.

  • repo-config.yaml
  • CI/CD logs with validated origin

Proportionality by risk.

LevelMandatory?Adjustments
L1OptionalRecommended
L2YesMandatory
L3YesMandatory + package signature/verification

Integration into the SDLC.

PhaseTriggerResponsibleSLA
BuildDependency resolutionDevOps/CIImmediate (real-time blocking)

Useful links.

  • SLSA Provenance (concepts)

US-07 - Prohibit manually copied libraries​

Context.
JS, PHP, DLLs and JARs copied directly into the repo escape the SBOM and the SCA, creating shadow dependencies.

User Story

Story.
As a Developer, I want to use only package managers/internal repositories, never copying libraries into the repo.

Acceptance criteria (BDD).

  • Given that I need an external library When I add it to the project Then it is managed via a package manager and not by manual copying

Checklist.

  • Zero manually copied libs
  • All via package manager
  • Periodic audit confirms absence

Artefacts & evidence.

  • package.json / pom.xml / composer.json
  • Build logs (resolution via internal repos)

Proportionality by risk.

LevelMandatory?Adjustments
L1YesDocumented policy
L2YesPeriodic audits
L3YesAutomatic enforcement in CI/CD

Integration into the SDLC.

PhaseTriggerResponsibleSLA
DevInclusion of a new libDeveloper + AppSecAt dependency approval

Useful links.


US-08 - Update automation with impact assessment​

Context.
Dependencies degrade over time; they need to be updated safely and quickly.
Modern tools assess impact (semver, release notes, diffs, test coverage) and:

  • open automatic PRs with auto‑merge when the change is safe (patch/minor with no impact, green tests, gates OK);
  • mark as requires‑human when there is impact (broken API, major), attaching refactor guidelines.
User Story

Story.
As DevOps/Developer, I want update bots with impact assessment, so that I receive safe PRs automatically and a human handoff when necessary.

Acceptance criteria (BDD).

  • Given that a new version is published When the bot runs impact analysis
  • Then:
    • If no‑impact ⇒ PR with auto‑merge conditional on green CI and gates OK
    • If impact ⇒ requires‑human PR with diff, breaking notes, refactor hints, or even GenAI with the appropriate change.

Checklist.

  • Bot active (Renovate/Dependabot/similar)
  • Impact analysis configured (semver + tests + changelog)
  • Safe auto‑merge criteria per L1–L3
  • Labels (no-impact, requires-human) and routing to reviewers
  • Canary/rollout defined (L3)

Artefacts & evidence.

  • Automatic PRs with labels and logs
  • CI/CD test and gate reports

Proportionality by risk.

LevelPolicy
L1Optional bots; auto‑PR for patch/minor
L2Mandatory bots; auto‑merge only for patch or security updates, with all mandatory gates green, a traceable record and declared in the policy; minor/major requires human review
L3Mandatory bots; impact analysis + canary; no auto‑merge: patch and security updates with human review (expedited for CVEs, Policy 13 §4.1); minor/major requires human approval and staged promotion

Integration into the SDLC.

PhaseTriggerResponsibleSLA
Dev/CINew version publishedDevOps + Developer + QAAutomatic (PR opened and processed by a bot)

Useful links.


US-09 - Periodic Audit of Manually Copied Libraries​

Context.
Manually copied libraries escape the SBOM and the SCA. Periodic automation is needed to detect these hidden dependencies and enforce replacement via a package manager or blocking in CI/CD.

User Story

Story.
As an AppSec Engineer, I want to run an automated periodic audit to detect manually copied libraries (JS, PHP, DLL, JAR, etc.), so that their use is blocked in CI/CD and a complete SBOM and SCA are guaranteed.

Acceptance criteria (BDD).

  • Given that a periodic audit is run (weekly/monthly according to Lx) When copied libraries not managed via a package manager are found Then an issue is created in the backlog with a deadline for replacement via the repository/package manager

Checklist.

  • Automatic scanner configured (e.g. search for patterns of copied libs, JS/PHP/DLL/JAR extensions)
  • Audit frequency defined per Lx (L1: monthly, L2: fortnightly, L3: weekly)
  • Results versioned in the repository (.audit-libs.json)
  • Blocking in CI/CD for L2–L3 when copied libs are detected
  • Zero libs detected as the target

Artefacts & evidence.

  • .audit-libs.json / .audit-libs.yaml (versioned)
  • Audit and scanner logs
  • Remediation issues in the backlog

Proportionality by risk.

LevelMandatory?Adjustments
L1YesDocumented policy; monthly manual audit
L2YesFortnightly automatic scanner; alert in the pipeline
L3YesWeekly automatic scanner; blocking in CI/CD

Integration into the SDLC.

PhaseTriggerResponsibleSLA
Regular cyclePeriodic audit (schedule)AppSec Engineer + DevOpsL1: monthly, L2: fortnightly, L3: weekly
BuildDetection in CI/CD (L2–L3)DevOps (blocking)Immediate (real-time blocking)
BacklogDetected libsDeveloper (remediation)

Useful links.


US-10 - Inventory and SBOM per Build​

Context.
Each build must produce a signed and traceable Software Bill of Materials (SBOM), identifying all the dependencies used (direct and transitive).
This SBOM must be able to be correlated with the deployed artefact and serve as the basis for detecting deviations (“drift”) between what was built and what is actually running.

User Story

Story.
As DevOps / SRE, I want to automatically generate a signed SBOM per build, which remains associated with each deployed image, package or artefact, making it possible to identify all components and their versions.

Acceptance criteria (BDD).

  • Given a build pipeline
    When the artefact is produced
    Then a signed CycloneDX or SPDX SBOM is generated and archived with commit, version and hash metadata.

  • Given an SBOM signed at build time
    When the service is deployed to stage or prod
    Then the orchestrator maintains provenance labels (commit, build-id, image) that associate each instance with the correct SBOM.

  • Given runtime telemetry
    When a loaded component that does not exist in the SBOM is detected
    Then a drift incident is opened with a required fix.

  • Given an audit or compliance request
    When the auditor requests the component inventory
    Then it is possible to export the SBOM and provenance per version.

Checklist.

  • SBOM generated per build (SPDX or CycloneDX standard).
  • Signature and secure storage of the SBOM.
  • Deploy provenance (attestations and labels per environment).
  • Runtime vs SBOM comparison and drift detection.
  • Export of the inventory to a CMDB or compliance data lake.
  • Integration with vulnerability alerts and with Ch. 12 (Monitoring and Operations).

Artefacts & evidence.
sbom-<build>.json, attestation-<build>.json, proveniencia-<deploy>.json, drift reports and build logs.

Proportionality.

LevelMandatory?Coverage
L1YesSBOM per build and basic association per image.
L2YesAttestations + labels per environment, basic drift detection.
L3YesContinuous drift + blocking of non-attested executions.

Integration into the SDLC.

PhaseTriggerResponsibleSLA
CIBuild executionDevOps / SREAt build time (automatic generation)
DeployDeployment to an environmentDevOps / SREImmediate (association with metadata)
OperationsContinuous monitoringDevOps + AppSecContinuous (drift detection)

Useful links.


US-11 - Alerts on Vulnerabilities in Components in Use​

Context.
Systems must automatically detect known vulnerabilities (CVEs) in the dependencies used.
Besides the alerts during the build, there must be alerts in production, correlating the versions actually deployed and the environments where they are.
The system must know where each version runs in order to assess real impact and prioritise remediation.

User Story

Story.
As Application Manager and AppSec, I want to receive alerts correlated by environment when a CVE emerges that affects running versions, so that I can prioritise the fix and reduce the MTTR.

Acceptance criteria (BDD).

  • Given an inventory per service/environment with an associated SBOM
    When a CVE is published that affects a deployed version
    Then a single alert is generated with component, version, impacted services/environments, exploitability, exposure and recommended SLA.
  • Given an alert with an L2/L3 SLA
    When the triage time passes without action
    Then it is escalated automatically (Ch. 12) and an incident is created in the ITSM system.
  • Given an accepted risk exception (VEX/justification)
    When an active exploit comes to exist
    Then the exception is reassessed and the alert reactivated.
  • Given the patch management lifecycle
    When the fix is deployed
    Then the alert is closed automatically and recorded as a resolved CVE.

Checklist.

  • Continuous inventory per service and environment with an associated SBOM.
  • Correlation of CVEs and advisories to deployed versions.
  • Risk enrichment (exploit available, exposure, sensitive data).
  • Integration with Ch. 12 (SIEM/SOAR/alerting) and ITSM (incidents/tasks).
  • Exception process with VEX and automatic reassessment.
  • KPIs: MTTA/MTTR per severity and environment; % inventory coverage vs deploys.

Artefacts & evidence.
Signed sbom-<build>.json; inventario-runtime-<servico>-<ambiente>.json; feed of correlated CVEs; tickets/incidents; VEX decisions.

Proportionality.

LevelMandatory?Triage SLAMitigation SLAAdjustments
L1YesCritical ≤ 24 h; High ≤ 48 h; Medium 5 working days; Low 10 working daysCritical 30 daysAlert only on deployed high/critical without compensating measures.
L2YesCritical ≤ 24 h; High ≤ 48 h; Medium 5 working days; Low 10 working daysCritical 7 daysInclude medium in exposed services; automatic escalation.
L3YesCritical ≤ 24 h; High ≤ 48 h; Medium 5 working days; Low 10 working daysCritical 3 daysBlockers with auto-rollback/kill-switch where applicable.

These SLAs are the Manual's choice. A vulnerability with an indication of active exploitation in a product with digital elements that the organisation places on the market leaves this ladder: triage ≤4 h and, if confirmed, the CRA Article 14 track (early warning notification ≤24 h to the CSIRT designated as coordinator and to ENISA).

Integration into the SDLC.

PhaseTriggerResponsibleSLA
CVE publicationNew public vulnerabilityAutomatic (feed)Automatic detection (1–6h)
TriageCVE correlated with a deployed versionAppSec + DevOpsL1: 5d, L2: 2d, L3: 1d
MitigationRemediation plan or exceptionDevOps + AppSecCritical: L1 30d, L2 7d, L3 3d (Policy 19 §4.3)

Useful links.


US-12 - Automatic Validation of Licence Compatibility​

Context.
Dependencies with incompatible licences (GPL, AGPL, etc.) may introduce unexpected legal obligations. It is necessary to automatically validate compatibility against an organisational allowlist.

User Story

Story.
As a Developer, I want to automatically validate the licence compatibility of new dependencies, so that legal compliance is guaranteed and conflicts are avoided.

Acceptance criteria (BDD).

  • Given that a new dependency is added When the build runs Then a licence validator assesses compatibility against the organisational allowlist

  • Given that a licence is incompatible

  • When the build tries to resolve the dependency

  • Then the pipeline blocks with a clear message (L2–L3) or warns (L1)

Checklist.

  • Allowlist of approved licences defined (e.g. MIT, Apache 2.0, BSD)
  • Automatic licence validator integrated into the CI/CD
  • Blocking for prohibited/incompatible licences (L2–L3)
  • Alert for unrecognised licences (for manual review)
  • Documentation of the approval criterion per licence

Artefacts & evidence.

  • licenses-whitelist.yaml / .licenseignore (versioned)
  • CI/CD logs with licence validation
  • Remediation issues (swap the dependency or request a formal exception)

Proportionality by risk.

LevelMandatory?Adjustments
L1OptionalManual, ad hoc validation
L2YesAutomatic with alert; blocking for GPL/AGPL
L3YesAutomatic with blocking; exceptions require formal approval

Integration into the SDLC.

PhaseTriggerResponsibleSLA
Design/DevInclusion of a dependencyDeveloperAt dependency approval
BuildDependency resolutionCI/CD (blocking/alert)During the build (immediate)
ExceptionLicence incompatible with the business caseAppSec + Legal (if necessary)Before go-live

Useful links.


US-13 - Inventory and control of emergent dependencies​

Context.
In modern architectures, not all dependencies enter through explicit declaration in manifests or lockfiles. Build tools, pipelines, code generation, plugins and runtime loading can introduce emergent dependencies that are not immediately visible.

User Story

Story.
As Software Architects + AppSec Engineer, I want to identify and control emergent dependencies (not explicitly declared), so that the real composition of the software remains governed, traceable and aligned with the security requirements.

Acceptance criteria (BDD).

  • Given that an SBOM is generated for the application or pipeline
    When I compare the current composition with the known baseline
    Then I can identify new, unexpected or out-of-boundary dependencies

Checklist.

  • Inventory boundary (SBOM boundary) defined and documented
  • Dependency sources identified (build tools, plugins, pipelines, runtime fetch)
  • Dependency baseline approved and versioned
  • Dependency delta detection implemented
  • Emergent dependencies subject to review/approval
  • Evidence archived per release

Artefacts & evidence.

  • sbom-boundary.md
  • sbom-baseline.json
  • Dependency delta report per build/release

Proportionality by risk.

LevelMandatory?Adjustments
L1OptionalOccasional manual analysis
L2YesAutomatic delta detection
L3YesAutomatic gate + formal approval

Integration into the SDLC.

PhaseTriggerResponsibleSLA
CI/CDBuild / ReleaseDevOps + AppSecAt each release

Useful links.

  • 🔗 Ch. 04 - Secure Architecture: /sbd-manual/arquitetura-segura/intro
  • 🔗 Ch. 07 - Secure CI/CD: /sbd-manual/cicd-seguro/intro

US-14 - AI BOM and management of AI model providers​

Context. US-10 covers the classic SBOM — packages via a package manager, direct and transitive dependencies. When the system includes AI components (models, datasets, MCP servers/tools, embedded prompts), there is a class of "dependencies" that escapes the traditional package manager: opaque artefacts with their own version, external providers (Anthropic, OpenAI, HuggingFace), and update mechanisms that can change behaviour without changing the visible version. DEP-011, DEP-012, DEP-013 and DEP-014 are operationalised here so that these dependencies become as auditable as the rest of the stack.

User Story

Story. As AppSec / DevOps, I want each release of the system to generate an AI BOM in a standardised format (preferably CycloneDX 1.6 ml-bom) with models, datasets, MCP servers/tools and embedded prompts pinned to specific versions, aligned with the list of approved providers, so that there is traceability equivalent to that of the classic SBOM and rapid detection of upstream incidents in any of the classes.

Acceptance criteria (BDD).

  • Given a system build with AI components When the pipeline generates the SBOM Then the AI BOM is also generated in ml-bom format (CycloneDX 1.6) or equivalent, integrated with the main SBOM
  • Given an AI model in operational use When declared in the AI BOM Then it comes with an explicit fixed version (e.g. claude-opus-4-7@sha:…) — no latest, no ranges, no dynamic aliases
  • Given that an AI provider changes the model's major version When the pinning is updated Then a new eval suite runs (Ch. 10 §C5) and the threat model is reviewed (Ch. 03 US-11) before the cutover
  • Given that an AI provider is not on the approved list When an attempt is made to use it in production code Then the CI gate blocks (cross-link Ch. 07 US-19) or requires a formal exception

Checklist.

  • AI BOM generated per build in a standardised format (preference: CycloneDX 1.6 ml-bom)
  • Models, datasets, MCP servers/tools, prompts with pinned version + hash + provider
  • List of approved AI providers versioned in VCS, with risk classification
  • Applicable contractual clauses recorded per provider (cross-link Ch. 14, Policy 33)
  • CI gate that fails if: (a) the AI BOM was not generated, (b) a component uses latest/range, (c) the provider is not on the approved list
  • DEP-007 triage process extended to incidents in models/datasets/MCP/prompts (AML.T0010, AML.T0019, AML.T0109, AML.T0110, LLM03-2025)
  • Eval suite + threat model run at each major version change

Artefacts & evidence.

  • ai-bom.cdx.json (CycloneDX 1.6) or equivalent per release, archived and linked to the main SBOM
  • List of approved providers in VCS (governance/ai-providers.yaml or equivalent)
  • CI gate logs confirming AI BOM compliance
  • Eval/threat-review record per version change (references eval_run_id and threat_model_ref)
  • History of pinned versions per model, with date and SHA

Proportionality by risk.

LevelMandatory?Adjustments
L1RecommendedAI BOM in a simple format; known list of providers
L2YesAI BOM in a standard format; approved providers; CI gate
L3YesStandard AI BOM + GRC review of the providers; detailed contractual clauses (data retention, audit rights, location); cross-link with the AI Act cross-check

Integration into the SDLC.

PhaseTriggerResponsibleSLA
BuildEach buildDevOps (generates the AI BOM) + AppSec (reviews)Per build
Provider approvalAddition of a new AI providerAppSec + GRC (+ Legal if necessary)Before operational use
Version changeBump of model / MCP server / datasetAppSec + DevOpsBefore the cutover — with eval and threat review completed

Useful links.


US-15 - Version pinning and hash integrity​

A dependency without a fixed version and without a verifiable hash is an open door to silent substitution in the supply chain.

Context. DEP-003 requires a versioned lockfile, with no latest/* references or unbounded ranges, and integrity verifiable by hash (integrity in npm, --hash in pip). No US operationalises this control directly — US-01 addresses approval and US-13 addresses the inventory delta, but pinning and hash verification were left without a backlog of their own. Without a fixed version, the same manifest resolves different artefacts between builds; without a hash, an artefact tampered with upstream (typosquatting, compromised registry) goes unnoticed.

User Story

Story.
As a Developer/Lead, I want to pin all dependencies to exact versions and verify their integrity by hash at each resolution, so that builds are reproducible and unauthorised substitution of artefacts is blocked.

Acceptance criteria (BDD).

  • Given a dependency manifest
    When the build resolves the dependencies
    Then there is a lockfile versioned in VCS with no latest/*/unbounded ranges, and the build fails if the lockfile is missing or out of date
  • Given a lockfile with integrity hashes
    When the package manager downloads an artefact
    Then the downloaded hash is compared with the pinned hash and resolution aborts in case of divergence

Checklist.

  • Lockfile present and versioned, regenerated deterministically
  • Absence of latest/*/unbounded ranges (verifiable by a linter in CI)
  • Hash integrity field present and validated at resolution
  • CI gate that fails on a missing/out-of-date lockfile or hash divergence

Artefacts & evidence. package-lock.json/poetry.lock/Gemfile.lock/go.sum (versioned); pinning linter report; CI logs with hash verification.

Proportionality L1–L3.

L1L2L3
Lockfile mandatory, no latest/*/unbounded ranges, + hash verificationMandatory lockfile + hash verificationLockfile + hash + verified provenance (attestation) and blocking gate

Integration into the SDLC.

PhaseTriggerResponsibleSLA
DevInclusion/change of a dependencyDeveloper/LeadOn change of the manifest
BuildDependency resolutionDevOps/CIDuring the build (immediate blocking)

Useful links. DEP-003 — Fixed and auditable versions


US-16 - Documented governance of severity policy, registries and approval record​

Supply chain controls are only auditable when the rule that distinguishes blocking from alerting, the permitted origin and the record of who approved what are written down and versioned.

Context. Three prescriptions of the catalogue were only partially operationalised. DEP-002 requires a documented severity policy that distinguishes findings that block from those that only alert (US-03 applies gates but does not require the written policy). DEP-005 requires an enforced allowlist of registries with a controlled and audited fallback to external sources (US-06 enforces the allowlist but does not address the fallback). DEP-006 requires a traceable approval record with version, hash, owner and date (US-01 approves but does not fix the fields of the record). They are consolidated because they are all documented governance artefacts that make the existing gates auditable.

User Story

Story.
As an AppSec Engineer, I want to keep versioned the severity policy, the allowlist of registries with an audited fallback rule and the approval record with mandatory fields, so that supply chain decisions are explicit, traceable and auditable.

Acceptance criteria (BDD).

  • Given the SCA pipeline
    When a finding is assessed
    Then the block-vs-alert decision follows a documented and versioned severity policy, and not ad hoc scanner criteria
  • Given that the build resolves dependencies from a source outside the allowlist
    When a fallback to an external registry occurs
    Then the event is recorded, audited and subject to approval according to the policy, or blocked
  • Given the approval of a new dependency
    When it is recorded
    Then the record includes version, hash, owner and date, and is traceable per dependency

Checklist.

  • Severity policy documented and versioned (block/alert thresholds per Lx)
  • Allowlist of registries enforced with an explicit and audited fallback rule
  • Approval record with version, hash, owner and date per dependency
  • Audit evidence of fallback events (logs retained)

Artefacts & evidence. severity-policy.yaml; repo-config.yaml with fallback rule; dependencies-approval.md with version/hash/owner/date fields; audited fallback logs.

Proportionality L1–L3.

L1L2L3
Minimum severity policy documented; recommended registries; simple approvalVersioned policy; allowlist enforced + audited fallback; record with mandatory fieldsSame + AppSec/GRC review of the fallback and of the record; fallback requires formal approval per event

Integration into the SDLC.

PhaseTriggerResponsibleSLA
Project startPublication/review of the policyAppSec + GRCOn adoption and at periodic review
BuildFallback to an external registryAppSec + DevOpsOn the event (immediate recording/audit)
DevApproval of a new dependencyAppSec + DeveloperAt dependency approval

Useful links. DEP-002/005/006 — Requirements Catalogue · Control of origin registries


🧩 Complementary note - Continuous component inventory and alerts in production​

Dependency management does not end at the build.
There must be a continuous inventory of third-party components per project and environment (dev/test/stage/prod), with automatic alerts when vulnerabilities affecting deployed versions are published.

This complements the SCA in the pipeline by:

  • Closing the build → deploy → run cycle;
  • Prioritising by real risk (exposure and exploitability);
  • Triggering an operational response via Ch. 12 (Monitoring and Operations).

Recommended practice.

  1. Generate the SBOM at build time and sign it.
  2. Label per environment in the registry/orchestrator.
  3. Continuous discovery at runtime (inventory per deploy) and comparison with the SBOM.
  4. Correlation of CVEs and alerts when: deployed version affected / active exploit / critical path.
  5. Automatic opening of an incident/task with an SLA proportional to L1–L3.
  6. Evidence: SBOM, inventory, alerts, VEX, patching history.

Integration with Ch. 12 - Monitoring and Operations.

User stories 10 and 11 are closely related to what is set out in Ch. 12 - Monitoring and Operations., highlighting the critical aspect of monitoring beyond the execution of any build pipeline. It is easy to implement security measures during the build, but, once in production, an application may go a long period of time without returning to the development pipeline, so it is essential to review the SBOM of applications in production periodically, or spontaneously. A new vulnerability being found in an application in production is more serious than during the development process, especially without alarm or periodic detection measures. One of the fundamental aspects in Ch. 12 - Monitoring and Operations. is precisely that control, defining:

  • Events: alert creation/closure, change in exploitability, SLA breach, drift.
  • Metrics: MTTA, MTTR, affected assets, % active exceptions, patch latency.
  • Automation: enrichment, prioritisation, escalation, SOAR playbooks.
  • Executive reporting: Ch. 05 + Ch. 12 compliance, view per L1–L3.

📦 Expected artefacts​

ArtefactEvidence
dependencies-approval.mdApproved list of dependencies
sbom.json / sbom.xmlInventory per build (CycloneDX/SPDX)
attestation-<build>.jsonBuild provenance and signature
inventario-runtime-<servico>-<ambiente>.jsonInventory of components actually deployed
sca-report.html/jsonDetected vulnerabilities and applied gates
cve-alerts.jsonAlerts correlated by environment and severity
vex.yamlJustified exceptions and reassessment status
excecoes.yamlApproved formal exceptions
releases.mdGo/no-go decisions and patching history
repo-config.yamlConfigured internal repositories
.audit-libs.json / .audit-libs.yamlPeriodic audit results for copied libs
licenses-whitelist.yamlAllowlist of approved licences
Bot PRsImpact labels, logs and tests
Drift reportsDifferences between SBOM and runtime
ITSM tickets / IncidentsEvidence of CVE handling and SLA met

⚖️ L1–L3 proportionality matrix​

PracticeL1L2L3
SBOMBasic per buildComplete per releaseSigned + integrity + provenance
Runtime inventoryRecommendedMandatoryContinuous + drift detection
SCABlock High/CriticalBlock High/CriticalBlock Medium+ + active CVE feed
Alerts for deployed CVEsManual, with triage within the SLA by severityAutomatic per environmentAutomatic + correlation and escalation
Version pinningMandatory (lockfile + hash)MandatoryMandatory + provenance validation
Exceptions / VEXFormal (justification, compensating control, approver and deadline)Formal + periodic reviewFormal + automatic revalidation
Internal repositoryRecommendedMandatoryMandatory + signature and provenance attestation
Copied librariesProhibited (policy)Periodic auditCI/CD enforcement + blocking
Audit of copied libsDocumented policy; monthlyAutomatic scanner; fortnightlyAutomatic scanner; weekly + CI/CD blocking
Licence validationManual, ad hocAutomatic with alertAutomatic with blocking (except formal exceptions)
Bots / patching automationOptionalActive + auto-merge only for patch/security with green gates, a traceable record and declared in the policy; minor/major with human reviewActive + impact analysis, canary and rollback
Integration with Ch. 12OptionalBasic SIEM alertsFull: SOAR, MTTR/MTTA metrics and escalation

🏁 Final recommendations​

  • The SBOM must be treated as a living document, with signature and verifiable provenance per build and per environment.
  • Continuous inventory in production is essential: it detects drift and vulnerabilities in versions actually deployed.
  • Automated SCA with gates proportional to risk and integration with CVE alerts at runtime.
  • Internal repositories and attestations are the foundation of trust in the supply chain.
  • Formal and temporary exceptions (VEX) must be reassessed automatically when the risk changes or an active exploit emerges.
  • Eliminate manually copied libraries (US-07) with an automated periodic audit (US-09) and blocking in CI/CD for L2–L3.
  • Validate licence compatibility (US-12) against an allowlist, blocking or alerting according to criticality.
  • Bots with impact assessment (US-08):
    • PRs for trivial patches → auto-merge;
    • PRs with impact → human review, canary and staged promotion (especially in L3).
  • Integration with Ch. 12 must guarantee full visibility, real-time alerts and operational response metrics (MTTA/MTTR) per severity and environment.