Skip to content

ci.yml missing restrictive permissions declaration #30

@shanselman

Description

@shanselman

Description

The ci.yml workflow has no permissions: block, so GITHUB_TOKEN receives the default repository permissions (typically contents: write, packages: write, etc.). This violates the principle of least privilege for a workflow that only needs to run cargo check/test/clippy/fmt.

The audit job also passes the token to a third-party action (rustsec/audit-check) with those elevated permissions.

Location

  • .github/workflows/ci.yml — top level

Suggested Fix

Add a restrictive top-level permissions block:
yaml permissions: contents: read

Severity

Low

Found by: Claude Opus security review

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions