Security (CW-20): cw20-mintable git dependency not pinned to commit SHA #14
Labels
No labels
enhancement
governance
QA
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/ust1-window#14
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?
@PlasticDigits finding from security review on #5.
Severity
Medium. Supply-chain risk — affects every future clean build.
Description
Workspace
Cargo.toml:No
rev,tag, orbranchspecified. Cargo resolves this to the default branch HEAD at the time ofcargo buildorcargo update.Why this matters
Whatever commit happens to be on the default branch of
github.com/PlasticDigits/cw20-mintablewhen a build runs is what gets compiled into ust1-oracle and ust1-window. That includes:make build-optimizedfor release artifactscargo cleanCargo.lockRisks:
cw20-mintablerepo is breached (push access, account takeover), attacker commits can flow directly into the next clean buildCargo.lockwill disagree with the remote hash on the nextcargo updateand developers may paper over with--allow-dirtySince
cw20-mintableis first-party (PlasticDigits/...), the compromise surface is the same GitHub org running this contract — but a pinned SHA bounds the blast radius to "review each bump" rather than "trust all future commits on main".Recommendation
Pin to a specific commit SHA:
Bumping the pin then becomes an explicit, reviewable change. Optionally use
tagif the cw20-mintable repo publishes semver tags.Additionally, consider running
cargo auditandcargo denyin CI (observed to not be available on QA server this session — worth adding as a GitHub Actions step against committed Cargo.lock).Related
cargo audit+cargo denyto CI (EVM-19 hygiene)mentioned in issue #5
mentioned in commit
7bcc285afecw20-mintable pinned (CW-20 / #14)
Pinned SHA:
73a206b5c39c5bd8f9d3574bda32fc5ae8f52ec8— this isHEADof PlasticDigits/cw20-mintable at the time of the change (git ls-remote … HEAD), matching what was already resolved inCargo.lockso behavior is unchanged; the manifest now encodes the same revision explicitly.Changes: Workspace
Cargo.tomlusesrev = "73a206b5c39c5bd8f9d3574bda32fc5ae8f52ec8"for the git dependency;Cargo.locksource URL updated to the?rev=form.Workflow: Implemented on branch
fix/issue-14-pin-cw20-mintablein a git worktree, rebased onto latestmain, merged (fast-forward), verified withcargo check --workspace, pushed toorigin/main(merge commit:7bcc285).Bumping the dependency is now an explicit, reviewable edit to
rev(or a tag if you publish those).@PlasticDigits verified fix on
7bcc285.Cargo.tomlworkspace dep nowcw20-mintable = { git = "...", rev = "73a206b5c39c5bd8f9d3574bda32fc5ae8f52ec8", features = ["library"] }Cargo.locksource line updated:git+https://github.com/PlasticDigits/cw20-mintable?rev=73a206b5c39c5bd8f9d3574bda32fc5ae8f52ec8#73a206b5c39c5bd8f9d3574bda32fc5ae8f52ec8Clean builds now locked to this SHA. Future bumps require explicit reviewable change to Cargo.toml. Supply-chain risk closed.