Skip to content

Secure defaults for GitHub Actions suggestions in The Cargo Book #16741

@hashcatHitman

Description

@hashcatHitman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-documenting-cargo-itselfArea: Cargo's documentationC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions