这是indexloc提供的服务,不要输入任何密码
Skip to content

CI: Set minimum permissions on GitHub Workflow #3636

@diogoteles08

Description

@diogoteles08

Hi!

I'd like to suggest the addition of top-level minimal permissions on your workflow, as it would harden your security agains supply-chain attacks.

I see that you have only one workflow, the node.js.yml, but it does not specify the permissions for its jobs, letting their privileges determined by GitHub's defaults. By defining minimal permissions you would be secured against erroneous or malicious actions from external jobs you call from your workflow. It's specially important for the case they get compromised, for example.

Setting minimum permissions for workflows is recommended by GitHub itself and also by other security tools, such as Scorecards and StepSecurity.

I'd be happy to raise a PR with the changes if you agree.

Context

I'm Diogo and I work on Google's Open Source Security Team(GOSST) suggesting and implementing security changes on critical open source projects 😊

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