← All permissions
Repository permission·security_events:write
Code scanning alerts: Write
Tier 2 · Medium
Why Tier 2
Dismisses code scanning alerts and uploads analyses, so findings can disappear without a fix.
- Target
- Repository
- Plane
- DataCode security: Code scanning, Dependabot and secret scanning alerts, advisories, dismissals and bypasses.
- Granted by
- Fine-grained PAT, GitHub App, GITHUB_TOKEN
- Available on
- Every setup
- In a workflow
permissions: security-events: writeWorkflow scopes by tier
What it unlocks
4 REST endpoints need this permission, from GitHub's docs data. Some also need another permission, and a few work with only one kind of token.
- PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}
- POST /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/autofix
- DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}
- POST /repos/{owner}/{repo}/code-scanning/sarifs
Roles that include it
- T0OwnerThe organization and every repository in it
- T0All-repository adminEvery repository in the organization
- T1WriteOne repository
- T1MaintainOne repository
- T1AdminOne repository
- T1Security managerThe organization and every repository in it
- T1All-repository writeEvery repository in the organization
- T1All-repository maintainEvery repository in the organization
- T1Enterprise security managerEvery organization in the enterprise
Custom role permissions that add it
An owner can build a custom role from these on Enterprise Cloud. Nobody holds one until a custom role with it is assigned.
- Dismiss or reopen code scanning alerts
write_code_scanningrepository role - Delete code scanning alerts
delete_alerts_code_scanningrepository role
Classic scopes that reach it
- T0repodocumented
- T1security_eventsdocumented
Attack paths
No attack technique, escalation or incident on ghtier goes through this yet.
Other levels
GitHub Docs: Repository permissions for "Code scanning alerts"