Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions - #40

Merged
lindsay-fredrick merged 1 commit into
mainfrom
alert-autofix-1
Jul 15, 2026
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#40
lindsay-fredrick merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@lindsay-fredrick

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/bcgov/ds-intro-to-python/security/code-scanning/1

Add an explicit permissions: block in .github/workflows/quarto-publish.yml so the workflow documents and enforces least privilege.
Best single fix without changing behavior: define permissions at workflow root (applies to all jobs) with:

  • contents: write (needed to push/publish to gh-pages)
  • optionally pages: write is not required here because this action targets gh-pages branch publishing, not the Pages deployment API.
  • id-token not needed for this current workflow.

Edit location: immediately after name: Render and Publish and before jobs:.

No imports, methods, or dependencies are needed (YAML-only change).

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

Potential fix for code scanning alert no. 1: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@lindsay-fredrick
lindsay-fredrick marked this pull request as ready for review July 15, 2026 16:17
@lindsay-fredrick
lindsay-fredrick merged commit 1006ddf into main Jul 15, 2026
3 checks passed
@lindsay-fredrick
lindsay-fredrick deleted the alert-autofix-1 branch July 15, 2026 16:17
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