Skip to content

Conversation

@henriettelienrebnor
Copy link
Contributor

@henriettelienrebnor henriettelienrebnor commented Dec 2, 2025

This PR fixes AB#379924

Potential fix for https://github.com/equinor/Dexpi2Imf/security/code-scanning/3

How to fix:
Add a permissions block to the root of the workflow (before jobs:) specifying the least privilege required, per GitHub recommendations. For most CI jobs that build and test code but do not require repository modifications, this should be permissions: contents: read. This ensures the GITHUB_TOKEN used in the workflow only allows reading repository content, reducing the risk if a workflow step is compromised.

Implementation:
Insert the following YAML block after the workflow name and before the on: and/or jobs: blocks, as per standard YAML formatting:

permissions:
  contents: read

This should be inserted at the root level, typically after the name field and before on: or jobs:. For clarity, in this workflow, place it after name: and before on:. No changes to imports, methods, or additional configuration are required.


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>
@henriettelienrebnor henriettelienrebnor marked this pull request as ready for review December 2, 2025 09:10
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.

3 participants