Skip to content

release: interpose some templates - #19822

Merged
charliermarsh merged 2 commits into
mainfrom
ww/zizmor
Jun 13, 2026
Merged

charliermarsh merged 2 commits into
mainfrom
ww/zizmor

Conversation

@woodruffw

Copy link
Copy Markdown
Member

Summary

Removes a few more template injections, drops a blanket permission.

Previously we couldn't address these because they're part of the generated dist workflow, but now that we're committed to it being dirty this is fine.

Test Plan

See what happens in CI.

Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
@woodruffw woodruffw self-assigned this Jun 12, 2026
@woodruffw woodruffw added the internal A refactor or improvement that is not user-facing label Jun 12, 2026
name: Release
permissions:
"contents": "write"
permissions: {}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: This should be safe to drop, since the one job that does need this permission (for creating a release) has it explicitly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you fill me with fear

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did another pass on this (and had the clanker do one too) and I feel pretty confident in it. But there's only one way to find out!

- id: plan
run: |
dist ${{ (inputs.tag && inputs.tag != 'dry-run' && format('host --steps=create --tag={0}', inputs.tag)) || 'plan' }} --output-format=json > plan-dist-manifest.json
dist ${DIST_CMD} --output-format=json > plan-dist-manifest.json

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: Intentionally not shell-quoted so that we properly expand flags.

@woodruffw
woodruffw marked this pull request as ready for review June 12, 2026 15:35
@charliermarsh
charliermarsh merged commit 535a95b into main Jun 13, 2026
72 checks passed
@charliermarsh
charliermarsh deleted the ww/zizmor branch June 13, 2026 18:24
zanieb added a commit to astral-sh/ty that referenced this pull request Aug 18, 2026
The release workflow grants `contents: write` by 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.

Co-authored-by: Zanie Blue <[email protected]>
zanieb added a commit to astral-sh/ruff that referenced this pull request Aug 18, 2026
The release workflow grants `contents: write` by 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.

Co-authored-by: Zanie Blue <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants