Skip to content

fix(ci): the drift check would check out any ref NETWEIR_COMMIT named - #48

Merged
jamesconwaydev merged 1 commit into
mainfrom
ci-pin-check
Nov 4, 2026
Merged

jamesconwaydev merged 1 commit into
mainfrom
ci-pin-check

Conversation

@jamesconwaydev

Copy link
Copy Markdown
Collaborator

Problem. CodeQL's actions/untrusted-checkout check flagged the drift job (code scanning alert #7). The job checks out netweir/netweir at whatever NETWEIR_COMMIT holds, and a pull request can change that file. The job runs on pull_request with a read-only token and no secrets, so the risk was small, but nothing stopped the file naming a branch or tag instead of a commit.

Change.

  • The pin step strips whitespace, then refuses anything that isn't a full 40-character hexadecimal commit hash, with a message saying so.
  • Adds assets/parsec-avatar.svg and assets/parsec-avatar.png, the rocket mark used as the organization's avatar, so its source lives in the repo.

Tests. The drift job runs on this PR with the current NETWEIR_COMMIT and should pass. Given a branch name instead, the pin step fails with the new message.

A pull request can change NETWEIR_COMMIT, and the drift job checked
out whatever it held. It now accepts only a full 40-character commit
hash and fails on anything else, as CodeQL's untrusted-checkout check
asked.

Also adds the organization's avatar, the rocket mark from the README
banner, as SVG and PNG under assets/.
@jamesconwaydev
jamesconwaydev merged commit 763d34b into main Nov 4, 2026
11 checks passed
@jamesconwaydev
jamesconwaydev deleted the ci-pin-check branch November 4, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant