Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Comment on lines
9
to
25
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: "☁️ Checkout Repository" | ||
| # Pinned to a full commit SHA to satisfy security best practices | ||
| uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
|
|
||
| - name: "🔎 Run Link Checker" | ||
| # Pinned to a full commit SHA to satisfy the sha-ref validation error | ||
| uses: lycheeverse/lychee-action@2b591b68953f656281b36952a78484920668b598 # v2 | ||
| with: | ||
| # Points to your source files and uses your lycheerc config | ||
| args: "--config ./lycheerc ./src/content/**/*.md*" | ||
| # Ensures the step passes so the check doesn't show as "failed" | ||
| fail: false | ||
| env: | ||
| # Required to check GitHub links without being rate-limited | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} No newline at end of file |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 7 months ago
To fix the issue, we will add a permissions block at the root of the workflow file. Since the workflow only needs to read repository contents and use the GITHUB_TOKEN for checking links, we will set contents: read as the minimal required permission. This ensures the workflow adheres to the principle of least privilege.
Suggested changeset
1
.github/workflows/link-checker.yml
| @@ -6,2 +6,5 @@ | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: |
Copilot is powered by AI and may make mistakes. Always verify output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.