Skip to content

ci: declare contents:read on CI workflow#2271

Merged
ehuss merged 1 commit into
rust-lang:masterfrom
arpitjain099:chore/ci-permissions
May 14, 2026
Merged

ci: declare contents:read on CI workflow#2271
ehuss merged 1 commit into
rust-lang:masterfrom
arpitjain099:chore/ci-permissions

Conversation

@arpitjain099
Copy link
Copy Markdown
Contributor

Pins main.yml to contents: read at workflow scope. The code-tests job (and the rest of the matrix) only check out, install rust nightly + mdbook, and run the book's automated tests. No GitHub API write.

Defense-in-depth motivation is CVE-2025-30066 on tj-actions/changed-files: a compromised third-party action runs inside the existing job context and exfiltrates the workflow GITHUB_TOKEN via build logs.

Style matches the workflow-level block already in dev-guide.yml. YAML validated locally with yaml.safe_load.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label May 14, 2026
Copy link
Copy Markdown
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

@ehuss ehuss added this pull request to the merge queue May 14, 2026
Merged via the queue into rust-lang:master with commit ad35aca May 14, 2026
6 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label May 14, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request May 18, 2026
Update books

## rust-lang/reference

9 commits in 581920f9109f141b88b860b3e1e8359e3896a150..ad35aca481751a06afeb23820a672b0f3b11a476
2026-05-14 17:00:42 UTC to 2026-05-04 18:27:13 UTC

- ci: declare contents:read on CI workflow (rust-lang/reference#2271)
- Fix the grammar of generic arguments (rust-lang/reference#2247)
- Rename grammar rule `TypeParamBounds` to just `Bounds` (rust-lang/reference#2258)
- Update `used` to use the attribute template (rust-lang/reference#1905)
- Place HRTB binders before fn qualifiers (rust-lang/reference#2260)
- Glossary: add new entry documenting zero-sized types (rust-lang/reference#2203)
- Fix test failure on macOS with link_section (rust-lang/reference#2246)
- Make definition of fragment specifier `path` more precise (rust-lang/reference#2248)
- gitignore linkcheck (rust-lang/reference#2252)
rust-timer added a commit to rust-lang/rust that referenced this pull request May 19, 2026
Rollup merge of #156723 - rustbot:docs-update, r=ehuss

Update books

## rust-lang/reference

9 commits in 581920f9109f141b88b860b3e1e8359e3896a150..ad35aca481751a06afeb23820a672b0f3b11a476
2026-05-14 17:00:42 UTC to 2026-05-04 18:27:13 UTC

- ci: declare contents:read on CI workflow (rust-lang/reference#2271)
- Fix the grammar of generic arguments (rust-lang/reference#2247)
- Rename grammar rule `TypeParamBounds` to just `Bounds` (rust-lang/reference#2258)
- Update `used` to use the attribute template (rust-lang/reference#1905)
- Place HRTB binders before fn qualifiers (rust-lang/reference#2260)
- Glossary: add new entry documenting zero-sized types (rust-lang/reference#2203)
- Fix test failure on macOS with link_section (rust-lang/reference#2246)
- Make definition of fragment specifier `path` more precise (rust-lang/reference#2248)
- gitignore linkcheck (rust-lang/reference#2252)
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.

3 participants