build: verify third-party attribution for every embed and in NOTICE #720
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#720
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
scripts/gen-third-party-licenses.sh --checkruns in the gate (scripts/gate.sh:244). It regeneratesTHIRD-PARTY-LICENSES.mdfrom the Go module set and diffs it, and it fails when a trackedLICENSE/COPYING/NOTICEfile sits in a directory theVENDOREDlist does not declare (gen-third-party-licenses.sh:98-120, 274-278). That catches the case that shipped undeclared in v0.19.0: the vendored MADR templates, now declared atTHIRD-PARTY-LICENSES.md:13-19.Two gaps remain.
//go:embedthat pulls in third-party content with no license file of its own would ship undeclared, and the gate stays green. There are four embeds today: the three MADR templates (internal/service/adr/madr/embed.go:15,21,28) and the first-party release public key (internal/cmd/update/update.go:37).NOTICE. It is bundled into the release archive (.goreleaser.yaml:64), but its content is never verified. It carries only the project's own grant and trademark notice (NOTICE:1-45); it lists no vendored attributions. The MADR templates are used under CC0-1.0, which needs none, so there is no gap today - but a future MIT or BSD vendored file would need its attribution where recipients see it.What I want
//go:embeddirective and requires each target to be either a first-party path on an allow list or a directory declared inVENDORED. A third-party embed then fails the gate whatever license files it carries.gen-third-party-licenses.shgenerates and verifies a vendored-attribution section in the rootNOTICE, the same generate-and-check pattern it already uses forTHIRD-PARTY-LICENSES.md.Acceptance criteria
//go:embedof a path that is neither allow-listed nor declared inVENDOREDfails the gate, and names the path.NOTICEattribution section is stale, and regenerates it on request.NOTICE/THIRD-PARTY-LICENSES.mdpass unchanged after the one-time regeneration.