Skip to content

Various fixes to resolve code security reports of github actions#145

Merged
AnnaSasDev merged 10 commits intocorefrom
ResolveCodeScanningIssues
Apr 5, 2026
Merged

Various fixes to resolve code security reports of github actions#145
AnnaSasDev merged 10 commits intocorefrom
ResolveCodeScanningIssues

Conversation

@AnnaSasDev
Copy link
Copy Markdown
Member

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

In general, the fix is to explicitly define a permissions block in the workflow (at the top level or per-job) that grants only the scopes needed for these tests. Since the shown jobs mainly resolve a PR’s head SHA via the API and then call other reusable workflows to run tests, they almost certainly only require read access to repository contents and metadata, not write access.

The simplest and least invasive fix, without altering functionality, is to add a workflow-level permissions block near the top of .github/workflows/shared-testing.yml, just under name: and before on:. A good secure baseline is contents: read, which allows checkout and basic API reads, and matches GitHub’s recommended minimal starting point. If other actions later in the called workflows require more specific permissions (e.g., pull-requests: write), those can be declared within those reusable workflows or as more granular adjustments, but that’s outside the provided snippet. No additional imports or methods are needed; this is purely a YAML configuration change.

Concretely: edit .github/workflows/shared-testing.yml so that after line 1 (name: "Shared: Platform Tests") you add a permissions: block with contents: read. Leave the rest of the jobs and steps unchanged.

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

AnnaSasDev and others added 8 commits April 5, 2026 17:40
…in 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>
…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>
…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>
…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>
@AnnaSasDev AnnaSasDev marked this pull request as ready for review April 5, 2026 15:49
AnnaSasDev and others added 2 commits April 5, 2026 18:01
…kflows

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@AnnaSasDev AnnaSasDev changed the title Potential fix for code scanning alert no. 14: Workflow does not contain permissions Various fixes to resolve code security reports of github actions Apr 5, 2026
@AnnaSasDev AnnaSasDev merged commit 6366c75 into core Apr 5, 2026
33 checks passed
@AnnaSasDev AnnaSasDev deleted the ResolveCodeScanningIssues branch April 5, 2026 16: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.

1 participant