Skip to content

Add minimum permissions to workflows #803

@gabibguti

Description

@gabibguti

Adding minimum permissions to workflows help keep you repository safe against supply-chain attacks. GitHub workflows are given a GITHUB_TOKEN to execute the workflow actions. But, this GITHUB_TOKEN is granted higher permissions than necessary by default, making way to supply-chain attacks. I see both workflows here, cmake.yml and makefile.yml, don't need any special permissions besides contents: read to perform actions/checkout. If you agree to add this setting, I can open a PR!

This is considered good-practice and recommended by GitHub itself and by other security tools, such as Scorecards and StepSecurity.

Additional context

About me, I'm Gabriela and I work on behalf of Google and the OpenSSF suggesting supply-chain security changes :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions