Skip to content

REQ 009

sergio velderrain edited this page Nov 9, 2026 · 1 revision

REQ-009: Test-SbomArtifact.ps1 distinct exit codes 1/2/3

Requirement

Test-SbomArtifact.ps1 shall distinguish, via distinct exit codes, between artifact/build integrity failure (1), vulnerability-policy failure (2), and reporting failure (3), so a caller never mistakes one failure class for another.

Rationale

A CI consumer needs to react differently (e.g. block a release vs. just warn) depending on which guarantee failed.

Fit Criterion

Each of the three failure classes is reachable via a real fixture and produces its own distinct, documented exit code.

Verification

Real, assertion-based Pester fixture tests: scripts/tests/Test-SbomArtifact.Tests.ps1 constructs a minimal fixture per failure class (and the success path) and asserts the exact resulting ExitCode/Outcome, run in CI by ci-assurance.yml's pester-tests job on every push/PR.

Source

Software-Requirements-Specification

Priority

Medium

TestID

TEST-009

TestArtifact

Real Pester fixture tests, one per failure class, run in CI (ci-assurance.yml's pester-tests job)

CodeRef

Test-SbomArtifact.ps1, scripts/tests/Test-SbomArtifact.Tests.ps1

Status

Verified (automated, real fixtures)

Clone this wiki locally