Skip to content

Add vulnerability-alerts permission#4350

Draft
salmanmkc wants to merge 1 commit intomainfrom
vulnerability-alerts-permission
Draft

Add vulnerability-alerts permission#4350
salmanmkc wants to merge 1 commit intomainfrom
vulnerability-alerts-permission

Conversation

@salmanmkc
Copy link
Copy Markdown
Contributor

@salmanmkc salmanmkc commented Apr 15, 2026

Summary

Add vulnerability-alerts as a new read-only permission for GITHUB_TOKEN. This permission maps to the vulnerability_alerts GitHub App permission and allows workflows to read Dependabot alerts.

Changes

  • Permissions.cs: New VulnerabilityAlerts property with read-only cap (new overloaded ctor preserves backward compatibility)
  • WorkflowFeatures.cs: New AllowVulnerabilityAlertsPermission feature flag (default: false)
  • WorkflowTemplateConverter.cs: Parse vulnerability-alerts key, cap write→read, gated by feature flag
  • PermissionsHelper.cs: Include in reusable workflow policy permissions
  • workflow-v1.0.json: Schema entry with permission-level-read-or-no-access
  • Updated security-events description (Dependabot alerts now have their own key)

Design decisions

  • vulnerability-alerts: write is normalized to read (defense-in-depth; schema also rejects write)
  • Feature-flagged: disabled by default, errors when used with flag off
  • LimitedRead policy: vulnerability-alerts defaults to none (explicit opt-in only)

Add vulnerability-alerts as a new read-only permission key for
GITHUB_TOKEN. This permission allows workflows to read Dependabot
alerts.

- New VulnerabilityAlerts property in Permissions class
- Feature-gated via AllowVulnerabilityAlertsPermission
- Capped at read (write requests normalized to read)
- Schema updated (permission-level-read-or-no-access)
- Updated security-events description
@salmanmkc
Copy link
Copy Markdown
Contributor Author

Related PRs

Part of the vulnerability-alerts permission rollout. This PR is independent but should align with the schema changes in actions/languageservices#356.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant