Skip to content

Conversation

felickz
Copy link
Contributor

@felickz felickz commented May 12, 2025

Potential fix for https://github.com/advanced-security/component-detection-dependency-submission-action/security/code-scanning/12

To fix the issue, we will add a permissions block at the root of the workflow file. This block will explicitly set the permissions for the workflow to contents: read, which is sufficient for the operations performed in this workflow. This change ensures that the workflow does not have unnecessary write permissions, reducing the risk of unintended modifications to the repository.


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

felickz and others added 2 commits May 12, 2025 17:29
…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@felickz felickz changed the title Potential fix for code scanning alert no. 12: Workflow does not contain permissions Potential fix for alerts: Workflow does not contain permissions May 12, 2025
@felickz felickz marked this pull request as ready for review May 12, 2025 21:31
@felickz felickz requested review from a team as code owners May 12, 2025 21:31
@felickz felickz requested review from adrienpessu, aegilops and Copilot and removed request for a team May 12, 2025 21:31
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Ensures workflows have explicit minimal permissions by adding a permissions: contents: read block at the root.

  • Adds a read-only permissions block to the test workflow
  • Adds a read-only permissions block to the check-dist workflow

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/test.yml Added permissions: contents: read at root to restrict scope
.github/workflows/check-dist.yml Added permissions: contents: read at root to restrict scope

@GeekMasher GeekMasher merged commit 6796232 into main May 13, 2025
5 checks passed
@felickz felickz added the github_actions Pull requests that update GitHub Actions code label May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants