Allow granting non-admins default security report view access #213955
Replies: 3 comments 1 reply
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
A partial workaround that exists today: draft security advisories can have their own collaborators. On the draft advisory page, the repo admin can add individual people or teams to that specific advisory, so they can see and work on it without being repo admins or org security managers. The limit is the one you are pointing at: it is per advisory, not a default. You have to add them to each draft, and it does not cover advisories opened through private vulnerability reporting until someone adds them. A repo-level "security triage" role that gets view/accept/close on all advisories is still not available, so this is worth keeping open as a feature request. |
|
For the team-plus-script workaround you mentioned, the REST API already covers it. name: Share advisories with security team
on:
schedule:
- cron: '17 * * * *' # hourly
workflow_dispatch:
permissions: {}
jobs:
share:
runs-on: ubuntu-latest
steps:
- env:
GH_TOKEN: ${{ secrets.ADVISORY_TOKEN }}
TEAM: security-triage # team slug
run: |
for state in triage draft; do
gh api --paginate "repos/$GITHUB_REPOSITORY/security-advisories?state=$state&per_page=100" \
--jq '.[] | select(([.collaborating_teams[]?.slug] | index(env.TEAM)) | not) | .ghsa_id' |
while read -r id; do
teams=$(gh api "repos/$GITHUB_REPOSITORY/security-advisories/$id" \
--jq '[.collaborating_teams[]?.slug] + [env.TEAM] | unique')
echo "{\"collaborating_teams\": $teams}" |
gh api -X PATCH "repos/$GITHUB_REPOSITORY/security-advisories/$id" --input - >/dev/null
echo "shared $id"
done
doneA few notes:
A built-in "security triage" repo role would still be the clean solution, so this is worth keeping open as feedback. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
💬 Feature/Topic Area
Other
Discussion Details
For an open source project it's still useful to grant (some) developers access to view private security advisories, without including the much more dangerous options you get from being a repo admin, or making them security manager on the org (which also includes publishing advisories, reading all repos, and a bunch of org-level security permissions).
Hence, it would be great if there was a repo role like "security triage" that only allowed viewing them and accepting/closing them, but not publishing.
All reactions