Skip to content

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

Merged
Jaypsmall merged 1 commit into
masterfrom
alert-autofix-1
Jul 18, 2026
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#2
Jaypsmall merged 1 commit into
masterfrom
alert-autofix-1

Conversation

@Jaypsmall

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/Jaypsmall/HexRootScan/security/code-scanning/1

Add an explicit permissions block to the workflow so token privileges are constrained by configuration instead of inherited defaults.
Best fix here (without changing functionality): define workflow-level permissions right after on: and before jobs: with contents: read, since this job only needs repository read access for checkout/build. This applies to all jobs unless overridden and satisfies CodeQL’s recommendation with minimal privilege.

File to edit:

  • .github/workflows/android.yml
    • Insert:
      • permissions:
      • contents: read
    • Place it between the trigger section and jobs:.

No imports, methods, or dependencies are needed.

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

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Jaypsmall
Jaypsmall marked this pull request as ready for review July 18, 2026 22:56
@Jaypsmall
Jaypsmall merged commit 8c76853 into master Jul 18, 2026
5 checks passed
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