Skip to content

Commit ddef5c1

Browse files
fix(core): exempt CycloneDX metadata.component.hashes digests from pan-like detection
childContext routed components[].hashes[].content into the digest-whitelisted context but never metadata.component.hashes[].content, also a legitimate CycloneDX 1.7 digest site. Any workspace manifest edit re-rolls that digest; this one (sha256 c528f149...) contains the 13-digit run 0220603085793, which tripped panLike and failed 16 trust tests. Deterministic repro recorded in the session; fix routes metadata -> component -> hashes through the existing chain.
1 parent ca3c4e7 commit ddef5c1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

packages/core/src/policy/payment-signals.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ function isReceiptCryptographicDigest(value: string, path: string): boolean {
190190
type EvidenceContext =
191191
| 'ordinary'
192192
| 'cyclonedx-components'
193+
| 'cyclonedx-metadata'
193194
| 'cyclonedx-component'
194195
| 'cyclonedx-hashes'
195196
| 'cyclonedx-hash'
@@ -511,6 +512,8 @@ function childContext(
511512
rootIsAdapterFreeze: boolean,
512513
): EvidenceContext {
513514
if (rootIsCycloneDx17 && key === 'components') return 'cyclonedx-components';
515+
if (rootIsCycloneDx17 && key === 'metadata') return 'cyclonedx-metadata';
516+
if (context === 'cyclonedx-metadata' && key === 'component') return 'cyclonedx-component';
514517
if (context === 'cyclonedx-component' && key === 'hashes') return 'cyclonedx-hashes';
515518
if (rootIsRuntimeObservation && key === 'verticals') return 'runtime-verticals';
516519
if (context === 'runtime-vertical' && key === 'lanes') return 'runtime-lanes';

0 commit comments

Comments
 (0)