Skip to content

Fix for code scanning alert: Workflow does not contain permissions - #7163

Open
ScottBrenner wants to merge 1 commit into
mintlify:mainfrom
ScottBrenner:alert-autofix
Open

Fix for code scanning alert: Workflow does not contain permissions#7163
ScottBrenner wants to merge 1 commit into
mintlify:mainfrom
ScottBrenner:alert-autofix

Conversation

@ScottBrenner

@ScottBrenner ScottBrenner commented Aug 27, 2026

Copy link
Copy Markdown

Documentation changes

Add an explicit permissions block to .github/workflows/check-links.yml so the workflow does not inherit potentially broad default token rights.

Best fix (minimal and least-privilege): add at the workflow root (after on: and before jobs:):

  • permissions:
  • contents: read

This is sufficient for actions/checkout and for running the link checker, and keeps behavior unchanged while ensuring the token is restricted. No imports, methods, or dependency changes are required.

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


Note

Low Risk
CI-only hardening that restricts the workflow token; no application or runtime behavior changes.

Overview
Resolves the code scanning alert “Workflow does not contain permissions” by declaring an explicit least-privilege token scope on the Check links pull-request workflow.

Adds a root-level permissions block with contents: read, so the job no longer relies on broader default GITHUB_TOKEN rights while still allowing actions/checkout and the Mintlify broken-link check to run unchanged.

Reviewed by Cursor Bugbot for commit 46df48e. Bugbot is set up for automated code reviews on this repo. Configure here.

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