You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
context7: pin sync/update.sh upstream fetch URLs to a commit SHA, not master #963
PR #961's security review flagged that plugins/dometrain/skills/sync/scripts/update.sh fetched
its upstream drift-check content from an unpinned master branch — a supply-chain integrity gap:
a compromise of the upstream account (repo takeover, malicious merged PR, compromised PAT) would
silently replace the fetched content with attacker-controlled prose, which a maintainer's diff
review is not a fully reliable defense against for subtle semantic injection.
Fixed for dometrain in #961 by pinning UPSTREAM_URL to a specific commit SHA (bumped
deliberately by a maintainer as an explicit "I intend to review this commit" act, documented in plugins/dometrain/skills/sync/context/update.md).
plugins/context7/skills/lookup/scripts/update.sh has the identical pattern — both UPSTREAM_FIND_DOCS and UPSTREAM_CLI_SKILL fetch from https://raw.githubusercontent.com/upstash/context7/refs/heads/master/... (unpinned branch, not
a commit SHA).
Proposed work
Pin both UPSTREAM_FIND_DOCS and UPSTREAM_CLI_SKILL in plugins/context7/skills/lookup/scripts/update.sh to specific commit SHAs.
Document the bump-then-refresh protocol in plugins/context7/skills/lookup/context/update.md,
mirroring plugins/dometrain/skills/sync/context/update.md's new section.
Acceptance criteria
Both upstream URLs in context7's update.sh are pinned to commit SHAs, not master.
context/update.md documents the pin-bump protocol.
bash plugins/context7/skills/lookup/scripts/update.sh still reports no drift immediately
after the pin bump (baseline matches the newly pinned commit).
References
plugins/dometrain/skills/sync/scripts/update.sh — the fix pattern (pinned SHA + comment).
plugins/dometrain/skills/sync/context/update.md — the bump-then-refresh protocol to mirror.
Closing not-planned: an independent second reviewer (Codex) caught that pinning the fetch URL to a fixed commit breaks the drift-check's actual purpose — a pinned URL means check compares against the same frozen commit forever, so it can never detect real upstream drift once the source moves. Applying this to dometrain (PR #961) was reverted for the same reason before merge.
The maintainer's diff review before choosing to run --refresh-baseline is already the meaningful integrity gate the original security-review finding was after; a URL pin adds ceremony without adding protection beyond that, while actively breaking detection. Not porting this to context7 either — its existing unpinned-master fetch is correct as-is.
Activity
kyle-sexton commentedon Jul 22, 2026
Closing not-planned: an independent second reviewer (Codex) caught that pinning the fetch URL to a fixed commit breaks the drift-check's actual purpose — a pinned URL means
checkcompares against the same frozen commit forever, so it can never detect real upstream drift once the source moves. Applying this todometrain(PR #961) was reverted for the same reason before merge.The maintainer's diff review before choosing to run
--refresh-baselineis already the meaningful integrity gate the original security-review finding was after; a URL pin adds ceremony without adding protection beyond that, while actively breaking detection. Not porting this tocontext7either — its existing unpinned-masterfetch is correct as-is.fix(dometrain): revert upstream-URL pin, it broke drift detection