Skip to content

ci: restrict the workflow GITHUB_TOKEN to contents: read - #414

Merged
dkastl merged 1 commit into
nextfrom
ci/workflow-token-permissions
Jul 27, 2026
Merged

ci: restrict the workflow GITHUB_TOKEN to contents: read#414
dkastl merged 1 commit into
nextfrom
ci/workflow-token-permissions

Conversation

@dkastl

@dkastl dkastl commented Jul 27, 2026

Copy link
Copy Markdown
Member

Resolves the two open code-scanning alerts (#8, #9, actions/missing-workflow-permissions): test-postgis.yml never limited the GITHUB_TOKEN, so both jobs ran with the default (broader) permissions. The workflow only checks out repositories and runs tests — a top-level permissions: contents: read covers both jobs. release.yml already declares its own explicit contents: write and is not affected.

The alerts auto-close once this reaches main with the next release.

Resolves the two open code-scanning alerts
(actions/missing-workflow-permissions): the test workflow only checks
out code and runs tests, so the default token permissions are wider
than needed. release.yml already declares its own permissions.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens GitHub Actions security posture by explicitly restricting the workflow GITHUB_TOKEN permissions in the PostGIS test workflow, resolving Code Scanning alerts related to missing workflow permission declarations.

Changes:

  • Add a top-level permissions: contents: read to .github/workflows/test-postgis.yml.
  • Document why read-only repository contents access is sufficient for this workflow.

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

@dkastl
dkastl merged commit 413365b into next Jul 27, 2026
9 checks passed
@dkastl
dkastl deleted the ci/workflow-token-permissions branch July 27, 2026 12:06
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