Repository navigation
1.20.0
Added
-
Corroboration between two tools is recorded instead of discarded (#156).
SarifDedup.Distinctcollapses duplicates across runs, so a finding two tools both reported was kept on whichever run came first in input order and the other tool's run showed nothing for it — with no record that it concurred. Agreement between two independent scanners is a signal, and a finding both tools see is worth triaging differently from one only one tool sees.The surviving result now carries
tamp.alsoReportedBy(SarifDedup.AlsoReportedByProperty), a JSON array of the other tools' driver names in input order. Counts do not move — still one result per finding, which is what makesCombineDistinctuseful; useSarifMerge.Combinewhen a consumer needs a result per reporting tool instead.The property is written only when a different tool's copy was dropped, so the multi-TFM Roslyn case the helper exists for adds nothing: "roslyn also reported this roslyn finding" is noise, not a second opinion. An uncorroborated finding gets no property at all, which is the distinction worth having. A run whose tool has no driver name is recorded as
(unnamed tool)rather than silently omitted.The property name is public contract from here. Implementation note: the
JsonElementis built withUtf8JsonWriterrather thanJsonSerializer.SerializeToElement, becauseTamp.Sarifis source-generation-only to stay AOT- and trimming-friendly and the reflection-based serialiser throws without a type-info resolver. -
SarifDedup.Distinct(log, keySelector)andSarifMerge.CombineDistinct(logs, keySelector)(#155) — a key seam, so a caller with package-level findings is not forced to choose between full dedup and none.SarifDedup.ComputeKeyis promoted to publicSarifDedup.DefaultKeyso a selector can compose onto it rather than reimplement it, which is what callers usually want:$"{SarifDedup.DefaultKey(r)}|{purl}".No built-in "package key" is offered, deliberately: where component identity lives is producer-specific, and a built-in would have to guess.
Producer fingerprints are deliberately not the default key, even though SARIF nominates
fingerprints/partialFingerprintsas a result's identity — a fingerprint is only as good as the producer. grype 0.112.0'sprimaryLocationLineHashidentifies the package-version rather than the finding, with 35 distinct advisories against one package version sharing a fingerprint, so the same 299 results carry just 62 distinct fingerprints. Preferring them would turn a 10% collapse into a 79% one. There is a test pinning that. -
An enforcement stage, after publication rather than before it (#151). Both publishing targets depended on the scan targets, so the natural way to add a gate — failing a scan on findings — skipped
SecurityPushandSecurityMetrics, and therefore the SBOM push, the SARIF upload and the metrics, in exactly the runs where findings existed. Evidence arrived reliably when there was nothing to report and unreliably when there was.tamp Securityis now three ordered stages: collect (SecurityCollect) → publish (SecurityMetrics+SecurityPush, unconditional) → enforce (SecurityGate). Every stage from collect onward isAssuredAfterFailure(), so failing the gate costs no evidence and one scanner crashing does not suppress the others' output. -
EnforceSecurityPolicy(SecurityEvidenceSummary)— the policy seam, called bySecurityGateafter both publishing targets. Default implementation does nothing: a severity threshold is the adopter's decision, not core's. The summary carries per-scanner counts,FindingsAtOrAbove(level), the SBOM, publication outcomes andReliabilityProblems. -
An evidence receipt at
artifacts/security/security-receipt.json(SecurityReceiptFile), written before the gate throws — the run where evidence matters most is the run where something went wrong.findingsisnull, not0, for a scan with no result, so a reader cannot mistake "no result" for "found nothing". A green publishing job is weak evidence that a consumer accepted anything, since most ingestion is asynchronous; the receipt is what gives a missing report a single meaning. -
SecurityExpectedScans— the scans the pipeline expects, which is what turns "did this scan run?" into an answerable question. An adopter who deliberately drops a scanner removes it here, stating that the surface is not covered rather than leaving a silent gap. The mergedsast.sarifis deliberately not in the set: it derives from the OpenGrep and Roslyn outputs, and counting it too would double every SAST finding. -
SecurityPublicationStatusdistinguishesNotConfigured(credentials unset — still a green outcome, as before) fromCompleted,IncompleteandFailed. An unsettled Dependency-Track analysis is nowIncompleteand fails the gate rather than passing as a successful push.
Changed
-
SecurityGatefails by default when the evidence cannot be relied on — an expected scan that did not run, an unreadable output, an absent or empty SBOM, or a publication that was attempted and did not land. This is evidence integrity, not severity policy.This is the one behavioural change that can fail a build that used to pass. A scanner that is not installed previously produced a skipped target, zero findings and a green build. Three ways to go green again, the first two being the honest ones: install the scanner; remove it from
SecurityExpectedScans; or setSecurityRequireReliableEvidencetofalse, which keeps the receipt and thestatusmetrics so the gap stays visible even though it no longer blocks. Tamp's own CI is unaffected — nothing in it invokes the aggregateSecuritytarget.An SBOM that parsed but holds zero components counts as unreliable: every SCA result derived from it is vacuously clean, which is the most convincing kind of false negative.
-
Roslyn findings emit one status point per scan rather than one per file. The Roslyn leg writes one SARIF per (project, TFM); those are now read as a single scan, so a corrupt file among them makes the whole scan
Unreadablerather than silently understating the surface by an unmeasurable amount. Findings totals and tag keys are unchanged — they are still summed across files, not deduplicated.
Fixed
-
SarifMerge.CombineDistinctno longer documented as the general multi-tool path (#155). It was described as "the common path when stitching together SARIF from sources that re-analyse the same source per TFM (Roslyn) or scan overlapping directories (multi-tool pipelines)", and the dedup key —(ruleId, URI, line, column, logical fullyQualifiedName)— has no component or version term of its own. A dependency scanner reports the advisory asruleId, the lockfile as the URI, the same line for every result and the affected version only in the message text, so distinct affected versions of one package collapsed into a single result: the defect fixed in tamp-grype#6, re-introduced by anyone following the documentation. Measured on grype 0.112.0's native SARIF, 299 results collapse to 268.The guidance is now a condition rather than a category, because the key already has a slot for component identity:
CombineDistinctis safe when the producer puts it inlogicalLocations.fullyQualifiedName, and not when the producer puts the path there or omits logical locations.Tamp.Grype0.2.0 puts the purl there, and the same document passes through 299 → 299.Also documents the attribution effect: duplicates are collapsed across runs, so a finding two tools both reported is attributed to whichever run came first in input order. Every run survives, so "which tools ran" stays answerable; "which tools found this" does not. The class summary previously read as a stronger guarantee than
CombineDistinctgives. The behavioural fix ships alongside — see #156 under Added.No live misuse existed in the fleet: the only callers are the OpenGrep + per-TFM Roslyn merge in
SecurityPipelineBuild.SecurityScan, which is exactly the case the helper was built for. That call site now carries a comment saying why it is correct there, and why the CVE and Trivy SARIFs must not be added to it. -
A skipped security scan no longer reports as a clean one (#151).
SecurityPipelineMetrics.EmitFindingsFromSarifreturned0when the SARIF did not exist, andEmitComponentsFromBomdid the same for a missing BOM, sotamp.security.scan.findings_countemitted the same observation — nothing — for "this scanner ran and found nothing" and "this scanner never ran". An unsettled Dependency-Track analysis likewise logged a line and letSecurityPushgo green. In all three places an unknown outcome was reported as a good one, which is the failure direction a security control must never take.Evidence now carries its own reliability instead of having it inferred from a count:
SecurityEvidenceStatusisNotRun,UnreadableorCompleted, and only the last makes a count of zero mean "looked and found nothing". New readersReadSarifScan,ReadSarifScanDirectory,ReadScanandReadBomreturn aSecurityScanReport/SecuritySbomReportsaying why there is no result.EmitFindingsFromSarifandEmitComponentsFromBomkeep their signatures and now emit the status too, so existing callers get the fix without a change.Two new counters carry the signal
findings_countstructurally cannot:tamp.security.scan.statusandtamp.security.sbom.status, tagged by tool/producer andstatus. A clean scan emits no findings point, so absence offindings_countwas never evidence of anything — alert onstatus="not_run". Counts from an unreliable read are deliberately not emitted at all.
Packages for this release are on nuget.org, and the attached .nupkg files are the exact artifacts that were pushed.