Potential fix for code scanning alert no. 2: Workflow does not contain permissions#135
Potential fix for code scanning alert no. 2: Workflow does not contain permissions#135glenn-jocher merged 1 commit intomainfrom
Conversation
…n permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
|
👋 Hello @glenn-jocher, thank you for submitting this
For additional guidance, please review our Contributing Guide. An Ultralytics engineer will review your PR and assist you soon. If you have questions, feel free to leave a comment. Thank you for helping us keep our workflows secure and efficient! 🔒✨ |
|
🎉 Fantastic work, @glenn-jocher! This merge is a great example of thoughtful stewardship behind the scenes—“The measure of who we are is what we do with what we have.” (Vince Lombardi) Your focus on security and best practices strengthens our foundation and empowers the entire Ultralytics community. Thank you for your consistent dedication to excellence! 🚀 |
Potential fix for https://github.com/ultralytics/mkdocs/security/code-scanning/2
To fix the issue, we need to add a
permissionsblock to thenotifyjob. Since the job only performs notification tasks and does not interact with the repository in a way that requires write permissions, we can set the permissions tocontents: read. This ensures that the job has the minimal permissions required to execute its tasks securely.The
permissionsblock should be added under thenotifyjob definition, specifically after theruns-onkey.Suggested fixes powered by Copilot Autofix. Review carefully before merging.
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Minor update to the GitHub Actions workflow to improve security permissions during publishing. 🔒🚀
📊 Key Changes
contents: readpermissions to the publish workflow job in.github/workflows/publish.yml.🎯 Purpose & Impact