Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1334 +/- ##
=======================================
Coverage 87.27% 87.27%
=======================================
Files 163 163
Lines 13069 13069
=======================================
Hits 11406 11406
Misses 1663 1663 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I maintain Workflow Lens, an AI-assisted local workflow reviewer. I used it to compare all eight changed workflows at Two useful review checks:
Where an old workflow omitted permissions, the comparison keeps the baseline as unknown; it cannot establish the old repository-default budget. It also does not resolve access through Would you try one actual comparison and tell me whether it adds anything beyond GitHub's diff? For One confusing/wrong result—or “the normal diff is easier”—would help. No endorsement or star needed. |
There was a problem hiding this comment.
This can go now that we have it in the top level, right?
There was a problem hiding this comment.
Good catch — removed the job-level permissions on tag so contents: read only lives at the workflow top level. Pushed in c99e480.
Declare a read-only top-level permissions block on every workflow so a compromised step cannot inherit the repository's default write scopes. Keep existing job-level write grants (codecov OIDC, release failure issues). Fixes dapr#1333 Signed-off-by: DevAsadYasin <dev.asad.yasin@gmail.com>
c99e480 to
af7b08f
Compare
Description
Add a read-only top-level
permissions:block to every workflow that was missing one, soGITHUB_TOKENno longer inherits the repository's default write scopes. Workflows that check out the repo usecontents: read; workflows that only write viaDAPR_BOT_TOKEN(or call reusable workflows that do) usepermissions: {}.Existing job-level write grants are unchanged:
build.yaml/build-tag.yamlcodecov jobs:id-token: writebuild-tag.yamlnotify-on-failure:issues: writeandactions: readReusable workflow callers (
backport.yaml,dapr-bot-schedule.yml) stay atpermissions: {}because the called workflows indapr/.githubalready declarepermissions: {}and useDAPR_BOT_TOKEN.Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #1333
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: