Repository navigation
Conversation
|
Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using |
See: https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/josh-sync.20pull.20workflow.20version.20pinning/near/629742031 Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
See: https://github.com/actions/cache/releases/tag/v4.3.0 This is the same version we were already using at the time of writing. Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
See: https://github.com/actions/checkout/releases/tag/v7.0.1 This is the same version we were already using at the time of writing. Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
See: https://github.com/actions/github-script/releases/tag/v7.1.0 This is the same version we were already using at the time of writing. Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
621e147 to
f42d3ed
Compare
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
f42d3ed to
a688144
Compare
|
Oops. Guess I can't rename branches when I have a PR open. Noted. Pretend I renamed the branch for this PR to |
ref-version-mismatch, stale-action-refs, and unpinned-useszizmor findings as of zizmor@1.31.1
|
Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using |
|
r? rustc-dev-guide |
| git config user.email "" | ||
| git add . | ||
| git commit -m "Deploy ${GITHUB_SHA} to gh-pages" | ||
| git push --quiet -f "https://x-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}" HEAD:gh-pages |
There was a problem hiding this comment.
Why this change? Is GITHUB_TOKEN even passed as an environment variable by default?
There was a problem hiding this comment.
Why this change?
template-injection lint. Even when not necessarily dangerous, zizmor considers template expansions a code smell.
Is
GITHUB_TOKENeven passed as an environment variable by default?
I don't think so, but in this case, it was already explicitly put into the environment:
rustc-dev-guide/.github/workflows/ci.yml
Lines 12 to 23 in 6986caf
There was a problem hiding this comment.
I see. It seems safer to not put it into the environment and only access it through secrets, but I don't know if there is anything else here that might be reading it.
FWIW, I don't like this lint being applied to things that are clearly safe from expansion attacks, such as secrets.GITHUB_TOKEN.
There was a problem hiding this comment.
I don't know if there is anything else here that might be reading it.
Yeah, that's the tricky part. There's only so much I can do to test these things on my own (I already accidentally used up all my free minutes for this month doing so, it seems... oops!), so I have to try to err on the side of "not breaking infrastructure".
It seems safer to not put it into the environment and only access it through secrets
I think it isn't really meaningfully safer, though I would definitely prefer the scope be reduced (env for a specific step, rather than the entire job). That suffers the same "I don't know what might be using this already" problem, though.
Ideally, the token only grants read permissions/none at all and is not really a concern regardless for public repos. Which I think is the relationship permissions: {} creates? It's a little unclear how that works.
In pursuit of getting more
zizmorlints enforced acrossrust-langrepos throughcrabwatch, this PR fixes mostzizmorfindings as ofzizmor@1.31.1, using theauditorpersona. The lints that actually fired per-persona level are:regularpersona findings:artipackedexcessive-permissions(See also: Solve theexcessive-permissionslint crabwatch#97)unpinned-usespedanticpersona findings:regularexcessive-permissions(See also: Solve theexcessive-permissionslint crabwatch#97)template-injectionundocumented-permissionsanonymous-definition(Because coming up with names is hard and there is minimal benefit to this)concurrency-limits(Due to concerns about special cases. See also: Determine special cases forconcurrency-limitscrabwatch#107)auditorpersona findings:pedanticThe hash pin format is supported by tools like Dependabot and Renovate, which can update the pinned hashes and their associated comments. If you'd like help setting either of those up, let me know which you prefer, and if you'd like it in this PR or a new one. By default, I would assume to set them up to only update GitHub Actions.