Repository navigation
Harden release workflow permissions and shell inputs - #4319
Conversation
|
Isn't this file generated by cargo-dist? Won't these edits just get overwritten the next time we regenerate it? |
|
cargo-dist isn't really maintained anymore, in uv, we've decided we're just maintaining these ourselves now so we can iterate on security. |
|
(this is noted in the linked uv pull request) |
|
I see... in that case maybe let's get rid of the comment at the top of the file saying the file is generated, and the note I added to AGENTS.md that says that agents shouldn't try to edit this file because it's generated. But I guess that can all be done separately. |
|
(don't feel like I'm a great reviewer for this one but I'm in favour!) |
|
I think these are all safe because they're straight ports of uv changes that have been used in production for a bit. I'll post those other changes you asked for separately |
The release workflow still describes itself as generated even though it is maintained manually. Update its header to make that ownership clear while preserving the `cargo-dist` attribution and license notice. Follow-up to [astral-sh/ty#4319](astral-sh/ty#4319 (comment)). Co-authored-by: zaniebot <[email protected]>
The release workflow is maintained manually, but its header and `AGENTS.md` still describe it as generated, and `.pre-commit-config.yaml` excludes it from linting. Update the header, remove the obsolete guidance, and enable the regular workflow linters. Register the Depot runner, account for `$/` references in `actionlint`, and use the same reference for the signing workflow. Document trusted secret inheritance and quote the release notes path and optional prerelease flag safely. `cargo-dist` remains responsible for release planning and artifact generation. Follow-up to [#4319](#4319 (comment)). --------- Co-authored-by: zaniebot <[email protected]>
The release workflow grants
contents: writeby default and embeds release tags in shell commands. Restrict the default token, declare the read access needed by planning, building, and reusable workflows, and preserve the existing publishing permissions. Pass release values through environment variables and quoted argument arrays so they are treated as arguments rather than shell source.Port of astral-sh/uv#19822.