Various fixes to resolve code security reports of github actions#145
Merged
AnnaSasDev merged 10 commits intocorefrom Apr 5, 2026
Merged
Various fixes to resolve code security reports of github actions#145AnnaSasDev merged 10 commits intocorefrom
AnnaSasDev merged 10 commits intocorefrom
Conversation
…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>
…kflows Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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.
Potential fix for https://github.com/InfiniLore/InfiniFrame/security/code-scanning/14
In general, the fix is to explicitly define a
permissionsblock 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
permissionsblock near the top of.github/workflows/shared-testing.yml, just undername:and beforeon:. A good secure baseline iscontents: 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.ymlso that after line 1 (name: "Shared: Platform Tests") you add apermissions:block withcontents: read. Leave the rest of the jobs and steps unchanged.Suggested fixes powered by Copilot Autofix. Review carefully before merging.