Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical unresolved flaws can misattribute npm provenance, turn release-tag text into executable TypeScript, and allow non-comment source changes to bypass verification.
5 open issues
What changed in this PR
Extends license-categories generation and npm publishing with source and publication provenance, without changing license data.
Changes:
- Add local checkout SHA provenance and non-writing verification that ignores only the leading go-spdx value.
- Stamp release or dispatch provenance before building and testing, and enable npm provenance for the exact compared tarball.
- Add regression coverage and operational documentation while retaining whole-package comparison.
| File | Description |
|---|---|
packages/license-categories/test/stamp-provenance.test.mjs |
Tests stamping, compiled headers, and provenance-only package changes. |
packages/license-categories/test/publication-workflow.test.mjs |
Checks stamping order and npm provenance flags. |
packages/license-categories/src/generated.ts |
Records the local source SHA; license data is unchanged. |
packages/license-categories/script/stamp-provenance.mjs |
Adds release-tag and dispatch-commit stamping. |
packages/license-categories/docs/operations.md |
Documents local generation and publication provenance. |
Makefile |
Switches verification to the generator’s -verify mode. |
cmd/license-categories/main.go |
Adds checkout provenance resolution and non-writing verification. |
cmd/license-categories/main_test.go |
Covers provenance resolution, header validation, and conflicting flags. |
.github/workflows/publish-license-categories.yaml |
Stamps before tests and enables provenance when publishing the compared tarball. |
Review effort: Max (auto)
Comment on lines
+261
to
+263
| if version := buildInfo.Main.Version; version != "" && version != "(devel)" { | ||
| return version, nil | ||
| } |
Comment on lines
+56
to
+59
| execFileSync(process.execPath, [ | ||
| new URL('../node_modules/typescript/bin/tsc', import.meta.url).pathname, | ||
| join(directory, 'generated.ts'), '--target', 'ES2022', '--module', 'ES2022', | ||
| ]) |
elrayle
force-pushed
the
elr/license-categories-release-events
branch
from
November 11, 2026 20:53
7f53918 to
a9f95e7
Compare
elrayle
force-pushed
the
elr/license-categories-source-provenance
branch
from
November 11, 2026 21:00
5977708 to
51fc71f
Compare
elrayle
force-pushed
the
elr/license-categories-release-events
branch
from
November 11, 2026 22:19
a9f95e7 to
6a7d3ea
Compare
Verify generated data without ignoring non-go-spdx content, record local checkout provenance, and stamp release or dispatch provenance before building the compared npm artifact. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Support initial stable releases and prerelease promotions through the released action without accepting duplicate published events. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Prevent source verification from ignoring code after CR or Unicode line separators, and reject unsafe release tags and stamped provenance values. Cover all four TypeScript line terminators with regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Validate GITHUB_SHA and require checked-out HEAD to match before stamping release or dispatch provenance. Exercise the CLI against missing, malformed, and stale event SHAs without modifying generated source on failure. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
elrayle
force-pushed
the
elr/license-categories-source-provenance
branch
from
November 11, 2026 22:25
168fc68 to
fbd47e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Purpose
Fourth and final focused replacement for #176, based on #182. Preserves the implementation at immutable source commit
6c84574c70c4eb9a85f760633bc3eed9ebf2874dwithout bringing forward the separate all-provenance/data-only or scheduled-update layers.Changes
(local)while retaining genuine versioned-module installs and explicit source/trimpath errors.-verify, ignoring only the leading go-spdx provenance value while validating all generated header labels and other contents.(release)or checked-out HEAD plus(dispatch)after verification and before build/tests, preparation, and publication.Source fidelity
Production generator, Makefile, publication helper, stamp helper, publication workflow, package API/data/dependencies, and Go regressions match #176 exactly. Remaining cumulative tree differences are relocated workflow tests (with stronger inherited assertions), operations-document organization/retained preparation detail and untouched inherited migration prose, the generated local provenance SHA (
800eb5569623608304d722de5fce026619adddf9, the checkout base used for regeneration), and a display-only validation step name inherited from the earlier validation layer. No license data changed.The six unresolved review proposals remain deferred; this extraction adds none of their production logic. Publication enablement and existing native stack metadata are unchanged.
Validation
go test -race ./...golangci-lint run ./cmd/license-categories/...(0 issues)npm test --prefix packages/license-categories(22 tests, including tarball/API, publication, and provenance contracts)make license-categoriesfollowed bymake verify-license-categories, including verification after committing-trimpathbuild fails explicitly