Skip to content

fix: adding required permissions to top level and jobs in the workflow#16556

Merged
knative-prow[bot] merged 1 commit intoknative:mainfrom
gaganhr94:fix/token-permissions
Apr 19, 2026
Merged

fix: adding required permissions to top level and jobs in the workflow#16556
knative-prow[bot] merged 1 commit intoknative:mainfrom
gaganhr94:fix/token-permissions

Conversation

@gaganhr94
Copy link
Copy Markdown
Contributor

Fixes #16555

Proposed Changes

Currently the score for the Token Permissions is 0 because the top level permissions and a few job level permissions are missing in the workflows. With this change, the score will move to 10, since the workflow jobs will run with the minimal permissions. The PR retains conditions like write only at the job level, where it is necessary.

  • Add top-level permissions: contents: read to workflows that were missing it.
  • Tighten job-level permissions, retaining write only where necessary.
  • Tests (not applicable — workflow permission changes only)

Release Note

NONE

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Apr 19, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: gaganhr94 / name: Gagan H R (35e085f)

@knative-prow knative-prow Bot requested review from dprotaso and skonto April 19, 2026 11:24
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Apr 19, 2026

Welcome @gaganhr94! It looks like this is your first PR to knative/serving 🎉

@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Apr 19, 2026

Hi @gaganhr94. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knative-prow knative-prow Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 19, 2026
@dprotaso
Copy link
Copy Markdown
Member

You'll want to update the templates directly

https://github.com/knative-extensions/knobots/tree/main/workflow-templates

The kind-e2e is unique here so I would leave that change

@dprotaso
Copy link
Copy Markdown
Member

We'll have more actions here as well

https://github.com/knative/actions

@gaganhr94
Copy link
Copy Markdown
Contributor Author

gaganhr94 commented Apr 19, 2026

@dprotaso

Will raise a new PR for that in that repo. For the knative/actions repo, will raise another PR for that as well. Thanks for the info !

Signed-off-by: Gagan H R <hrgagan4@gmail.com>
@gaganhr94 gaganhr94 force-pushed the fix/token-permissions branch from 43fa701 to 35e085f Compare April 19, 2026 12:40
@knative-prow knative-prow Bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 19, 2026
@gaganhr94
Copy link
Copy Markdown
Contributor Author

Updated the PR to only make changes to the kind-e2e. Will make the other changes in the template, which I believe would automatically change workflows in this PR as well

@dprotaso
Copy link
Copy Markdown
Member

/lgtm
/approve

@knative-prow knative-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 19, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Apr 19, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso, gaganhr94

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

@knative-prow knative-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 19, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.17%. Comparing base (5237de8) to head (35e085f).
⚠️ Report is 51 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16556   +/-   ##
=======================================
  Coverage   80.17%   80.17%           
=======================================
  Files         217      217           
  Lines       13547    13532   -15     
=======================================
- Hits        10861    10849   -12     
- Misses       2318     2319    +1     
+ Partials      368      364    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dprotaso
Copy link
Copy Markdown
Member

/ok-to-test

@knative-prow knative-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 19, 2026
@knative-prow knative-prow Bot merged commit 36f6af1 into knative:main Apr 19, 2026
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve OSSF Scorecard Token-Permissions check by tightening GitHub Actions permissions

2 participants