Skip to content

Potential fix for code scanning alert no. 3: Workflow does not contain permissions#388

Merged
ThomasPedleyNHS merged 2 commits into
masterfrom
feature/nhso-0000-permissions-fix
Jul 14, 2026
Merged

Potential fix for code scanning alert no. 3: Workflow does not contain permissions#388
ThomasPedleyNHS merged 2 commits into
masterfrom
feature/nhso-0000-permissions-fix

Conversation

@ThomasPedleyNHS

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/NHSDigital/nhs-app-api/security/code-scanning/3

Add an explicit top-level permissions block in .github/workflows/pr-lint.yaml so the GITHUB_TOKEN is minimally scoped for this workflow.
Best single fix without changing behavior:

  • Set contents: read (safe baseline for checkout/repo metadata reads).
  • Set pull-requests: write because the workflow posts a PR comment via unsplash/comment-on-pr.

Place this block right after on: (or before jobs:) so it applies to all jobs in the workflow.

No imports, methods, or additional definitions are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

… not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket:

@ThomasPedleyNHS ThomasPedleyNHS marked this pull request as ready for review July 14, 2026 12:54
@ThomasPedleyNHS ThomasPedleyNHS enabled auto-merge (squash) July 14, 2026 12:54
…s not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket:

@sonarqubecloud

Copy link
Copy Markdown

@ThomasPedleyNHS ThomasPedleyNHS merged commit 0716372 into master Jul 14, 2026
12 checks passed
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.

2 participants