Secure defaults for GitHub Actions suggestions in The Cargo Book

Open Beginner friendly
#16,741 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
github-actions

Research direction

Read the three Continuous Integration sections linked in the issue and locate each example workflow using actions/checkout@v4. Update the examples to use at least actions/checkout@v6, and review the proposed workflows with zizmor where possible. Done means all referenced GitHub Actions examples use the safer checkout default.

Written by the indexing model from the issue text.

Description

A-documenting-cargo-itself C-feature-request S-triage
Problem

There are example workflows provided in several places in The Cargo Book, such as:

These all use actions/checkout@v4. I'd suggest increasing this to at least actions/checkout@v6, as the checkout action was made more misuse-resistant (specifically with regards to ARTIPACKED) as of v6.

I think this change is worth making because defaults are important, and many people will just copy the workflows as-is and think nothing more of it.

Proposed Solution

I'd suggest increasing this to at least actions/checkout@v6, as the checkout action was made more misuse-resistant (specifically with regards to ARTIPACKED) as of v6.

In general, I'd advocate for using zizmor when possible to make proposed workflows more secure whenever possible.

Notes

I am not affiliated with zizmor, I just think it is a good tool.

Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
1d 8h
Merged PRs (30d)
55

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-lang/cargo

All issues in rust-lang/cargo

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.