-
Notifications
You must be signed in to change notification settings - Fork 786
[CI][OSSF] Add default permissions to work flows #13173
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][OSSF] Add default permissions to work flows #13173
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me but I encourage others to look at it as well.
@intel/llvm-gatekeepers this should be good to go since failure is unrelated FAILED: lib/libLLVMAMDGPUCodeGen.so.19.0git |
I think this has caused some issues https://github.com/intel/llvm/actions/runs/8465895685/workflow#L36 https://github.com/intel/llvm/actions/runs/8465895689/workflow#L35 |
After #13173 , we are not able to push container images. See https://github.com/intel/llvm/actions/runs/8485593107/job/23250649681 ``` ------ > pushing ghcr.io/intel/llvm/ubuntu2204_base:2f03ef85fee5e867c8250d535f561f2e52e5260c with docker: ------ ERROR: denied: installation not allowed to Write organization package Error: buildx failed with: ERROR: denied: installation not allowed to Write organization package ``` We need to update the docker images, so need to write packages. Push permission tested through non PR workflow run here: https://github.com/intel/llvm/actions/runs/8516878870
It's been broken since intel#13173.
The update_check started to fail 2 weeks ago in https://github.com/intel/llvm/actions/runs/8461500755. Last CUDA e2e success was https://github.com/intel/llvm/actions/runs/8460746056 2 weeks ago!! So looks like a problem caused by #13173 again..
The update-check started to fail 2 months ago in https://github.com/intel/llvm/actions/runs/8461500755. Last CUDA e2e success was https://github.com/intel/llvm/actions/runs/8460746056 2 months ago!! So looks like a problem caused by #13173 again..
per OSSF (https://securityscorecards.dev/viewer/?uri=github.com/intel/llvm) all workflows should have default top level permission set. Which we set to below as per recommendation
permissions:
contents: read
then within actual jobs, when needed, we added additional privileges.
These changes were generated by the recommended OSSF tool
This PR changes those workflows created/owned by intel/llvm repo. Will do seperate PR for issues found in llvm/llvm-project inherited workflows.