Potential fix for code scanning alert no. 1: Workflow does not contain permissions#86
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 a PR to
You can find more details in our Contributing Guide. If you have any questions, feel free to ask. Thank you for helping make Ultralytics even better! 🔒✨ |
|
Fantastic work, @glenn-jocher! 🚀 Merging this PR marks another important step in strengthening our project’s security practices. As Benjamin Franklin once said, “An ounce of prevention is worth a pound of cure”—your attention to detail in refining our workflow permissions truly embodies this wisdom. Thank you for helping to safeguard our repository and setting a great example for best practices. Your contributions are deeply appreciated! |
Potential fix for https://github.com/ultralytics/thop/security/code-scanning/1
To fix the issue, we will add a
permissionsblock to thenotifyjob. Based on the job's functionality, it only needscontents: readto access repository metadata andstatuses: readto check the status of previous jobs. No write permissions are required. This change will explicitly limit the permissions of theGITHUB_TOKENfor thenotifyjob.Suggested fixes powered by Copilot Autofix. Review carefully before merging.
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Improved GitHub Actions workflow security by specifying required permissions for publishing. 🔒
📊 Key Changes
contents: read,statuses: read) to the publish workflow job in GitHub Actions.🎯 Purpose & Impact