SEC2-083: check-pin.mjs accepts a tag name as the pin, and a tag can be moved #11
Labels
No labels
bug
documentation
enhancement
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-firefox#11
Loading…
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?
Found on 2026-10-16 in a read-only security review of
postulo-firefoxatc9ee306, checked by a second, independent pass.Severity: Informational · Category: Configuration · Reference: CWE-494 (Download of Code Without Integrity Check); OWASP A08:2021 (Software and Data Integrity Failures)
Location:
scripts/check-pin.mjs:68-75source.json:3-4(the note says to "replace it with the tag at the first release")Issue
Once postulo-chromium has tags, the pin may be the tag's name. The purpose stated at the top of
the file is that "an addons.mozilla.org source submission has to build to the byte from what is
submitted", and a name does not fix bytes: a tag can be deleted and re-created on another commit,
and
build.mjsclones over the network at build time and checks out whatever the name resolves tothen. Today the pin is a full SHA, which is the right form.
Impact
None today. At the first release, if the note in
source.jsonis followed literally, thereproducibility the repository exists for depends on nobody moving a tag.
Fix
Keep the pin a 40-hex SHA always, and let
check-pin.mjsrequire that it equalslatest.shaoncetags exist (accept the name only as a hint printed beside it). Change the note in
source.jsonaccordingly.
Done when
test/check-pin.test.mjsrefuses a tag name once a tag exists.Related
#1 (closed) asked to "pin a tag or commit SHA" and is satisfied by the SHA; this refines it.