Skip to content

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

Merged
m13253 merged 2 commits into
masterfrom
alert-autofix-1
Oct 21, 2026
Merged

m13253 merged 2 commits into
masterfrom
alert-autofix-1

Conversation

@m13253

@m13253 m13253 commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/m13253/dns-over-https/security/code-scanning/1 and https://github.com/m13253/dns-over-https/security/code-scanning/2

Add an explicit permissions block to this workflow so the GITHUB_TOKEN is constrained by least privilege.
Best fix here (without changing behavior) is to set workflow-level permissions to read-only for repository contents:

  • Edit .github/workflows/*.yml.
  • Insert at the top level (after on: and before jobs:) a permissions: block with:
    • contents: read

This applies to all jobs in this workflow (including build) unless overridden later, and is the minimal safe baseline recommended by CodeQL.

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

m13253 and others added 2 commits October 21, 2026 10:43
…n permissions

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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@m13253
m13253 marked this pull request as ready for review October 21, 2026 10:47
@m13253

m13253 commented Oct 21, 2026

Copy link
Copy Markdown
Owner Author

These two changes are created by GitHub’s CodeQL auto scanner.

They look trivial and seems no side-effects. So they look good to me, merging.

@m13253 m13253 changed the title Potential fix for code scanning alert no. 1: Workflow does not contain permissions Potential fix for code scanning alert no. 1–2: Workflow does not contain permissions Oct 21, 2026
@m13253
m13253 merged commit a237060 into master Oct 21, 2026
5 checks passed
@m13253
m13253 deleted the alert-autofix-1 branch October 21, 2026 10:49
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