Skip to content

Conversation

@mchromin
Copy link
Contributor

No description provided.

Signed-off-by: Mateusz Chrominski <mateusz.chrominski@intel.com>
Copilot AI review requested due to automatic review settings December 15, 2025 12:41
Copy link

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

This PR updates the CI/CD workflow configuration by consolidating pull request workflows and removing redundant secret configurations. The changes streamline the workflow files by removing unnecessary GH_TOKEN secret passing and consolidating two separate pull request workflow files into one.

Key changes:

  • Removed redundant GH_TOKEN secret passing from workflows that call reusable workflows
  • Consolidated .github/workflows/pull_requests.yml into .github/workflows/pull_request.yml with simplified configuration
  • Cleaned up workflow parameters by removing unnecessary REPOSITORY_NAME and BRANCH_NAME from run_tests workflow

Reviewed changes

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

File Description
.github/workflows/run_tests.yml Removed GH_TOKEN secret and repository/branch parameters
.github/workflows/pull_requests.yml Deleted old pull request workflow file
.github/workflows/pull_request.yml Added new consolidated pull request workflow with simplified configuration
.github/workflows/check_code_standard.yml Removed GH_TOKEN secret passing

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

jobs:
dependency_review:
uses: intel/mfd/.github/workflows/dependency_review.yml@main
uses: intel/mfd/.github/workflows/dependency_review.yml@main

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI about 1 month ago

To fix this issue, you should add an explicit permissions block in .github/workflows/dependency_review.yml to restrict the permissions granted to the GITHUB_TOKEN for this workflow/job. Since this is a dependency review workflow, typically it only requires contents: read permission to check code dependencies—write access is not required. The permissions block can be set at the top (workflow root), which will apply to all jobs, or under the dependency_review job itself. Since there is only a single job, adding it at the workflow root is simple, clear, and effective. This involves inserting the following lines near the top of the file, after the name: line:

permissions:
  contents: read

No imports, method or variable changes are needed—just a YAML field addition.

Suggested changeset 1
.github/workflows/dependency_review.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/dependency_review.yml b/.github/workflows/dependency_review.yml
--- a/.github/workflows/dependency_review.yml
+++ b/.github/workflows/dependency_review.yml
@@ -1,4 +1,6 @@
 name: Dependency Review
+permissions:
+  contents: read
 
 on:
   pull_request:
EOF
@@ -1,4 +1,6 @@
name: Dependency Review
permissions:
contents: read

on:
pull_request:
Copilot is powered by AI and may make mistakes. Always verify output.
Comment on lines +9 to +20
strategy:
fail-fast: false
matrix:
python_version: ['3.10', '3.13']
uses: intel/mfd/.github/workflows/pull_request.yml@main
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
with:
REPOSITORY_NAME: ${{ github.event.pull_request.head.repo.full_name }}
BRANCH_NAME: ${{ github.head_ref }}
PYTHON_VERSION: ${{ matrix.python_version }}
PROJECT_NAME: 'mfd-hyperv' No newline at end of file

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI about 1 month ago

The best practice is to add an explicit permissions block at the top level of the workflow or at the job level for build_whl, specifying the minimal set of permissions required. Given that this workflow likely only needs to check out code and interact with pull requests, a minimal configuration would be contents: read (so it can read code/content) and (optionally) pull-requests: write if the triggered/used workflow needs to update pull request status. If you are unsure but want to err on the side of caution, start with contents: read only. To implement the fix, add a permissions: block near the top of the file (after name: Dev Build and before on:) for workflow-wide minimal privilege, or at the level of the build_whl job if scoping to only that job is preferred. In general, top-level is preferred so all jobs default to minimal permissions.

  • File to change: .github/workflows/pull_request.yml
  • Add the following lines right after line 1 (after the name: key):
permissions:
  contents: read
  • Optionally add further permissions if needed for this workflow.
  • No additional methods, imports, or definitions are required.

Suggested changeset 1
.github/workflows/pull_request.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -1,4 +1,6 @@
 name: Dev Build
+permissions:
+  contents: read
 
 on:
   pull_request:
EOF
@@ -1,4 +1,6 @@
name: Dev Build
permissions:
contents: read

on:
pull_request:
Copilot is powered by AI and may make mistakes. Always verify output.
@mfd-intel-bot
Copy link

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://intel/mfd-hyperv@ci'

@abaczek abaczek merged commit 0342851 into main Dec 15, 2025
23 checks passed
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.

5 participants