spec/server-provenance-v1.md defines the two identity locators as textual identifiers:
identity.artifact.package is a Package URL;
identity.endpoint.url is a URL.
The shared producer/consumer structural check currently tests both fields by truthiness only:
if not artifact.get("package"):
...
if not endpoint.get("url"):
...
As a result, truthy non-string JSON values such as true, 1, [1], or {"x": 1} satisfy the locator-presence check. A signed peer provenance record can therefore verify with a non-text artifact.package or endpoint.url as long as the sibling digest is valid.
This is narrower than Package URL / URI syntax validation. The immediate boundary is only the JSON primitive type the specification names: both locator fields should be non-empty strings rather than arbitrary truthy values.
Reproduction
Against current main at fc38496f3ddacaa7ce922e1218b6fcd91735d751, the exact predicates above accept each of:
Existing coverage checks a missing endpoint key digest but does not exercise non-string locator values.
Proposed bounded fix
Use one small non-empty-string boundary for artifact.package and endpoint.url in _check_structure(), exercised through both build_record() and verify_record().
Do not expand this change into full Package URL or URL syntax policy; that can be decided separately if desired.
AI-assistance disclosure: ChatGPT assisted with source triage, adversarial-case design, duplicate search, and issue drafting. altrudev reviewed the bounded claim and remains responsible for the contribution.
spec/server-provenance-v1.mddefines the two identity locators as textual identifiers:identity.artifact.packageis a Package URL;identity.endpoint.urlis a URL.The shared producer/consumer structural check currently tests both fields by truthiness only:
As a result, truthy non-string JSON values such as
true,1,[1], or{"x": 1}satisfy the locator-presence check. A signed peer provenance record can therefore verify with a non-textartifact.packageorendpoint.urlas long as the sibling digest is valid.This is narrower than Package URL / URI syntax validation. The immediate boundary is only the JSON primitive type the specification names: both locator fields should be non-empty strings rather than arbitrary truthy values.
Reproduction
Against current
mainatfc38496f3ddacaa7ce922e1218b6fcd91735d751, the exact predicates above accept each of:Existing coverage checks a missing endpoint key digest but does not exercise non-string locator values.
Proposed bounded fix
Use one small non-empty-string boundary for
artifact.packageandendpoint.urlin_check_structure(), exercised through bothbuild_record()andverify_record().Do not expand this change into full Package URL or URL syntax policy; that can be decided separately if desired.
AI-assistance disclosure: ChatGPT assisted with source triage, adversarial-case design, duplicate search, and issue drafting.
altrudevreviewed the bounded claim and remains responsible for the contribution.