Skip to content

ci: add top-level permissions to workflow files#3818

Merged
poiana merged 1 commit intofalcosecurity:masterfrom
gaganhr94:fix/token-permissions
Mar 11, 2026
Merged

ci: add top-level permissions to workflow files#3818
poiana merged 1 commit intofalcosecurity:masterfrom
gaganhr94:fix/token-permissions

Conversation

@gaganhr94
Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind cleanup

Any specific area of the project related to this PR?
/area CI

What this PR does / why we need it:
Adds permissions: contents: read at the workflow level for bump-libs.yaml, format.yaml, master.yaml, and release.yaml. This follows the principle of least privilege and addresses the OpenSSF Scorecard Token-Permissions findings. Job-level permissions that require elevated access (e.g., contents: write in bump-libs.yaml and release.yaml) will override the workflow-level setting as expected.

Which issue(s) this PR fixes:
Fixes #3817

Special notes for your reviewer:
When both workflow-level and job-level permissions are defined, the job-level permissions completely override the workflow-level ones. So existing jobs with contents: write (bump-libs, release) are unaffected.

Does this PR introduce a user-facing change?:

NONE

Add `permissions: contents: read` at the workflow level for
bump-libs.yaml, format.yaml, master.yaml, and release.yaml to follow
the principle of least privilege. Job-level permissions that require
elevated access will override this as expected.

Signed-off-by: Gagan H R <hrgagan4@gmail.com>
@gaganhr94
Copy link
Copy Markdown
Contributor Author

/assign @FedeDP

Copy link
Copy Markdown
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you very much!
/approve

@poiana poiana added the lgtm label Mar 11, 2026
@poiana
Copy link
Copy Markdown
Contributor

poiana commented Mar 11, 2026

LGTM label has been added.

DetailsGit tree hash: 8aa7ef30dcef62e71cb9bd05a180a82e29352193

@github-project-automation github-project-automation Bot moved this from Todo to In progress in Falco Roadmap Mar 11, 2026
@poiana
Copy link
Copy Markdown
Contributor

poiana commented Mar 11, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, gaganhr94, sgaist

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit 8171176 into falcosecurity:master Mar 11, 2026
32 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in Falco Roadmap Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ci: fix excessive GitHub workflow token permissions

4 participants