Repository navigation
Description
The README says to open an issue to discuss event types, so here is one — though not a request to add an event.
Both this spec and the SLSA one it mirrors list four supported event types and say "This build type MUST NOT be used for any other event type unless this specification is first updated. Other event types ... have complex semantics that may be error prone." The rationale given in slsa-framework/github-actions-buildtypes#3 was to avoid ambiguity about which version was built, because for the excluded events GITHUB_SHA is the default-branch tip rather than the commit being released.
I measured whether the commit named in a published attestation actually contains the version that was published, across 298 npm packages, twice a week apart. The allowlist does not predict the answer.
@babel/[email protected] event=workflow_dispatch attests c2e6b070, whose tree holds 8.0.6
@babel/[email protected] event=workflow_dispatch attests c2e6b070, whose tree holds 8.0.6
workflow_dispatch is on the allowlist. 15 of the 23 cases I found are on allowlisted events — all workflow_dispatch, across two projects. The cause is not the event type: it is that these projects create the version-bump commit inside the publishing run, after GITHUB_SHA has been fixed. A release-triggered workflow that did the same thing would produce the same result.
This is what the two of you concluded in #3 without data. Mark Lodato raised the ambiguity concern and then wrote "Then again, it's possible to do that for the other events too", and ianlewis replied "from a technical perspective this is the same as how all other events work". That reading is correct, and the allowlist is therefore not doing the work the paragraph around it claims.
Two smaller observations while I was looking, offered as context rather than as asks:
- Neither of the two producers I checked gates on the event.
@actions/attestsetsbuildTypeunconditionally (packages/attest/src/provenance.ts:6,41) and writesevent_nameinto the predicate at :51 without reading it. npm'slibnpmpublishdoes the same with the SLSA URI (lib/provenance.js:13,33). By contrastslsa-github-generatordoes enforce the list, in.github/actions/verify-token/src/validate.ts, with a comment pointing at the spec. So the MUST NOT is enforced in one implementation of three. - ianlewis closed #3's discussion with "there isn't an end user need for this yet." There is one now, though it is not the need he expected: not "please support
schedule", but "the attested commit cannot be relied on to contain the release, on supported events too".
I'm not asking for the allowlist to be widened or for anything to start failing. The useful change, if there is one, is probably in what the spec says the attested commit means — right now a consumer can reasonably read resolvedDependencies[0].digest.gitCommit as the source of the artifact, and on a common release pattern it is the source of the previous one. Happy to share the data or the method if it is of any use, and equally happy if the answer is that this is working as designed.
Nothing here is a security issue: the signatures are valid, the artifacts are what the workflows built, and the commits named are real.
Activity