Skip to content

Potential fix for code scanning alert no. 1910: Workflow does not contain permissions#266

Merged
AnnaSasDev merged 7 commits intocorefrom
alert-autofix-1910
May 2, 2026
Merged

Potential fix for code scanning alert no. 1910: Workflow does not contain permissions#266
AnnaSasDev merged 7 commits intocorefrom
alert-autofix-1910

Conversation

@AnnaSasDev
Copy link
Copy Markdown
Member

Potential fix for https://github.com/InfiniLore/InfiniFrame/security/code-scanning/1910

Add an explicit permissions block to the changes job with the minimum required scope.
Best fix without changing functionality: set contents: read under jobs.changes, since the job only checks out code and evaluates changed paths. This satisfies CodeQL and preserves current behavior while preventing broader inherited token rights.

Edit only .github/workflows/codeql.yml, in the changes job section (around lines 22–24), by inserting:

permissions:
    contents: read

No imports, methods, or extra definitions are needed.

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

…tain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@AnnaSasDev AnnaSasDev marked this pull request as ready for review April 30, 2026 16:11
AnnaSasDev added 6 commits May 2, 2026 15:12
Adjusted permissions block to include `pull-requests: write` and `checks: write`. Refined indentation and condition handling in the workflow file.
…prove change detection, and rename workflow file for clarity
…, enhancing matrix logic, and improving `workflow_dispatch` handling
…n logic, reducing redundant conditionals, and improving step execution clarity
…patch` and pull requests, ensuring accurate step execution
…proved path definitions, and refined change detection logic
Comment thread .github/workflows/ci-codeql.yml Dismissed
Comment thread .github/workflows/ci-codeql.yml Dismissed
@AnnaSasDev AnnaSasDev merged commit b32fea7 into core May 2, 2026
8 checks passed
@AnnaSasDev AnnaSasDev deleted the alert-autofix-1910 branch May 2, 2026 14:18
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