Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: set minimal permissions on workflow calibreapp-image-actions.yml #38633

Closed
2 tasks done
diogoteles08 opened this issue May 22, 2023 · 1 comment · Fixed by #39021
Closed
2 tasks done

CI: set minimal permissions on workflow calibreapp-image-actions.yml #38633

diogoteles08 opened this issue May 22, 2023 · 1 comment · Fixed by #39021
Assignees

Comments

@diogoteles08
Copy link
Contributor

Prerequisites

Proposal

Hi!

I'm here to suggest that you set minimal permissions to your workflow calibreapp-image-actions.yml, because currently it doesn't specify the permissions for its jobs and their privileges are being determined by GitHub's defaults. I noticed that all of your other workflows already have the permissions defined, and the change I propose is would be very similar.

IIUC, the job called on calibreapp-image-actions.yml requires a pull-requests: write permission, so I'd give this permission job-level, and grant a read-only permission as top-level.

If you have a reason not to define the permissions on that specific workflow, let me know! Otherwise, if you agree with this change I'm available to contribute with a PR to add them and close this issue.

Motivation and context

Defining minimal permissions secures you against erroneous or malicious behaviour from external jobs you call from your workflow. It's specially important for the case they get compromised, for example. Adicionally, it's a recommendation from GitHub itself and also from other security tools, such as Scorecards and StepSecurity.

Additional Context

I'm Diogo and I work on Google's Open Source Security Team(GOSST) in cooperation with the Open Source Security Foundation (OpenSSF). My core job is to suggest and implement security changes on widely used open source projects 😊

@XhmikosR
Copy link
Member

Hey, there. Happy to accept a PR that fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants