Scanner Artifact Association Graph

Sprint: SPRINT_20260507_002_Scanner_artifact_association_graph

Purpose

Scanner emits evidence for many related objects: source snapshots, build runs, container images, SBOMs, scan jobs, detector reports, findings, and evidence bundles. Those objects must not remain isolated records. The artifact association graph makes them first-class subjects that can be resolved from CLI, Console, and SBOM service APIs.

Subject Model

The SBOM service owns durable graph persistence. Scanner and related tooling emit enough metadata to create these subject kinds:

KindRequired identityNotes
source-snapshotrepoUrl plus commitShatreeHash, sourcePath, and dockerfilePath are optional evidence enrichments.
build-runbuildId or primaryLocatorUse for CI build, pipeline, or BuildKit execution records.
oci-imageimmutable sha256: digestTags are hints only and never verify identity by themselves.
sbomSBOM document sha256: digestRepresents the SBOM document, not the scanned image.
scan-jobscanJobId or primaryLocatorUsed as the root for scan-detail UI resolution.
detector-reportsubject key or report locatorUsed for language, native, OS, and secrets analyzer reports.
findingfinding subject keyFindings may link back to detector reports and evidence bundles.
evidence-bundlebundle locator or digestUsually a DSSE, proof, or offline evidence bundle reference.

Scanner Metadata Emission

BuildX descriptor generation now accepts and emits source/build/scan association fields:

The descriptor annotations include org.stellaops.artifact.association.version=v1 plus OCI/source/build/scan fields. This lets CI import the resulting descriptor into the artifact graph without a separate out-of-band mapping file.

Scanner source config models expose an optional association object:

{
  "association": {
    "emitArtifactLinks": true,
    "requireImageDigest": true,
    "linkCandidatesOnly": false,
    "sourceSnapshotMode": "commit-and-tree-hash"
  }
}

requireImageDigest=false is accepted only with a validation warning because mutable tags can create candidates but cannot verify links.

Secrets Evidence

Secrets reports now carry association metadata:

Secret leak evidence exposes a normalized evidenceLocator and redactedFingerprint. The fingerprint is derived from rule, locator, and masked value. Plaintext secrets are not persisted into artifact-link metadata.

Operator Flows

CLI:

stella artifact link export `
  --tenant tenant-a `
  --source-repo https://git.example/acme/app.git `
  --commit abcdef123456 `
  --build-id build-42 `
  --image-digest sha256:<64-hex> `
  --scan-job scan-123 `
  --detector-report lang-node-report `
  --output artifact-links.json

stella artifact link --server http://sbom.local import --file artifact-links.json
stella artifact link --server http://sbom.local resolve --tenant tenant-a --scan-job scan-123 --json
stella artifact link --server http://sbom.local candidates --tenant tenant-a
stella artifact link --server http://sbom.local confirm <link-id> --tenant tenant-a --operator alice --reason matched-source

Online commands set the SBOM service tenant auth header from the bundle tenantId, the --tenant option, STELLAOPS_TENANT_ID, or STELLAOPS_TENANT.

Console:

Verification Evidence