Skip to content

Add vulnerability-alerts as GITHUB_TOKEN permission scope#27668

Merged
pelikhan merged 4 commits intomainfrom
vulnerability-alerts-token-permission
Apr 21, 2026
Merged

Add vulnerability-alerts as GITHUB_TOKEN permission scope#27668
pelikhan merged 4 commits intomainfrom
vulnerability-alerts-token-permission

Conversation

@salmanmkc
Copy link
Copy Markdown
Collaborator

Moves vulnerability-alerts from a GitHub App-only permission to a native GITHUB_TOKEN workflow permission scope, allowing workflows to access the Dependabot alerts API without requiring a PAT or GitHub App.

Copilot AI review requested due to automatic review settings April 21, 2026 20:40
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Smoke CI was cancelled. Please review the logs for details.

Move vulnerability-alerts from GitHub App-only to a native GITHUB_TOKEN
permission scope. This lets workflows access the Dependabot alerts API
directly via GITHUB_TOKEN without requiring a PAT or GitHub App.

- Move PermissionVulnerabilityAlerts to Actions scope constants
- Add to GetAllPermissionScopes(), remove from GetAllGitHubAppOnlyScopes()
- Update frontmatter types, parsing, and serialization
- Update JSON schema descriptions
- Update test fixtures and recompile lock files
@salmanmkc salmanmkc force-pushed the vulnerability-alerts-token-permission branch from 5f8f54e to ddf4802 Compare April 21, 2026 20:41
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Smoke CI completed successfully!

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Smoke CI completed successfully!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the workflow permission model so vulnerability-alerts is treated as a native GITHUB_TOKEN scope (instead of GitHub App-only), enabling Dependabot alerts API access without requiring a PAT or GitHub App.

Changes:

  • Reclassifies vulnerability-alerts as a GitHub Actions permission scope across parsing, rendering/filtering, validation, and toolset-required permissions.
  • Updates tests, docs, and JSON schema descriptions to reflect the new scope behavior.
  • Regenerates numerous .lock.yml workflows (and adds a new agent markdown file).
Show a summary per file
File Description
pkg/workflow/safe_outputs_app_config.go Ensures permission-vulnerability-alerts is emitted from workflow permissions when minting app tokens.
pkg/workflow/permissions_validator_test.go Updates required permissions for the dependabot toolset to include vulnerability-alerts.
pkg/workflow/permissions_operations_test.go Updates merge/filter expectations to preserve vulnerability-alerts at job-level.
pkg/workflow/permissions_operations.go Adjusts docs/comment around filtering app-only scopes (now excluding vulnerability-alerts).
pkg/workflow/permissions.go Reclassifies vulnerability-alerts as a GITHUB_TOKEN scope; updates scope lists.
pkg/workflow/github_toolsets.go Updates toolset exclusion rationale now that dependabot can use GITHUB_TOKEN scopes.
pkg/workflow/github_mcp_app_token_test.go Updates assertions to expect vulnerability-alerts in job-level permissions and app token inputs.
pkg/workflow/github_app_permissions_validation_test.go Updates validation expectations: vulnerability-alerts no longer requires a GitHub App.
pkg/workflow/frontmatter_types.go Moves vulnerability-alerts into the GitHub Actions permissions config struct.
pkg/workflow/frontmatter_serialization.go Serializes vulnerability-alerts under Actions permissions rather than app-only.
pkg/workflow/frontmatter_parsing.go Parses vulnerability-alerts as a native workflow permissions key.
pkg/workflow/dangerous_permissions_validation_test.go Updates write-all shorthand write-permission count to include the new scope.
pkg/workflow/compiler_main_job.go Updates comment/examples for app-only permissions filtering.
pkg/parser/schemas/main_workflow_schema.json Updates schema descriptions for vulnerability-alerts in workflow and GitHub App contexts.
pkg/cli/workflows/test-vulnerability-alerts-permission.md Updates canonical workflow doc to expect job-level vulnerability-alerts presence.
pkg/cli/compile_permissions_integration_test.go Updates integration assertions to require job-level vulnerability-alerts presence.
docs/src/content/docs/reference/permissions.md Removes vulnerability-alerts from the “requires additional authentication” list.
docs/src/content/docs/reference/github-tools.md Updates dependabot toolset docs to describe GITHUB_TOKEN permissions requirements.
.github/workflows/workflow-generator.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/unbloat-docs.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/tidy.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/test-quality-sentinel.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-update-cross-repo-pr.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-test-tools.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-temporary-id.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-project.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-opencode.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-multi-pr.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-gemini.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-crush.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-create-cross-repo-pr.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-copilot-arm.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-codex.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-claude.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-ci.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-call-workflow.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-agent-scoped-approved.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-agent-public-none.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-agent-public-approved.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-agent-all-none.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/smoke-agent-all-merged.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/security-review.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/scout.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/refiner.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/q.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/pr-nitpick-reviewer.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/poem-bot.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/plan.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/pdf-summary.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/mergefest.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/grumpy-reviewer.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/firewall-escape.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/design-decision-gate.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/craft.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/cloclo.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/changeset.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/brave.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/auto-triage-issues.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/archie.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/approach-validator.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/ai-moderator.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/workflows/ace-editor.lock.yml Lockfile regen: adds GH_AW_ALLOWED_DOMAINS env to a github-script step.
.github/agents/my-agent-1.agent.md Adds a new Codespaces/gh/Copilot setup agent document.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 18/18 changed files
  • Comments generated: 3

Comment thread pkg/workflow/permissions.go
Comment thread pkg/cli/compile_permissions_integration_test.go Outdated
Comment thread pkg/parser/schemas/main_workflow_schema.json
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot review all comments

@github-actions

This comment has been minimized.

@pelikhan
Copy link
Copy Markdown
Collaborator

@mnkiefer we can upgrade dependabot

Copilot AI and others added 2 commits April 21, 2026 21:07
Move PermissionOrganizationProj below the GITHUB_TOKEN block with a
comment explaining it is declared here for grouping but treated as
App-only at runtime.

Rename TestCompileVulnerabilityAlertsPermissionFiltered to
TestCompileVulnerabilityAlertsPermissionIncluded to match the updated
test semantics (inclusion, not filtering).
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Smoke CI completed successfully!

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Smoke CI run: https://github.com/github/gh-aw/actions/runs/24746534264

Generated by Smoke CI for issue #27668 · ● 155.4K ·

@pelikhan pelikhan merged commit 424f721 into main Apr 21, 2026
24 checks passed
@pelikhan pelikhan deleted the vulnerability-alerts-token-permission branch April 21, 2026 21:12
Copilot stopped work on behalf of pelikhan due to an error April 21, 2026 21:12
Copilot AI requested a review from pelikhan April 21, 2026 21:12
@github-actions
Copy link
Copy Markdown
Contributor

Hey @salmanmkc 👋 — great work on surfacing the vulnerability-alerts permission improvement! Moving this from a GitHub App-only scope to a native GITHUB_TOKEN permission scope is a meaningful usability win for anyone trying to use the dependabot toolset without a PAT or GitHub App.

The PR looks well-structured: the changes are tightly focused, documentation is updated in sync with the code, and the test suite is comprehensively updated across 7 test files. This looks ready for maintainer review. 🎉

Generated by Contribution Check · ● 1.5M ·

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.

4 participants