Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
interval: "daily"
4 changes: 1 addition & 3 deletions .github/workflows/check_code_standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ jobs:
matrix:
python_version: ['3.10', '3.13']
uses: intel/mfd/.github/workflows/check_code_standard.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 }}
PYTHON_VERSION: ${{ matrix.python_version }}
2 changes: 1 addition & 1 deletion .github/workflows/check_pr_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
uses: intel/mfd/.github/workflows/check_pr_format.yml@main
with:
REPOSITORY_NAME: ${{ github.event.pull_request.head.repo.full_name }}
BRANCH_NAME: ${{ github.head_ref }}
BRANCH_NAME: ${{ github.head_ref }}
2 changes: 1 addition & 1 deletion .github/workflows/dependency_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

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 5 months 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.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
REPOSITORY_NAME: ${{ github.repository }}
BRANCH_NAME: ${{ github.ref_name }}
PYTHON_VERSION: ${{ matrix.python_version }}
PROJECT_NAME: 'mfd-hyperv'
PROJECT_NAME: 'mfd-hyperv'
2 changes: 1 addition & 1 deletion .github/workflows/manual_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
BRANCH_NAME: ${{ github.ref_name }}
PYTHON_VERSION: ${{ matrix.python_version }}
PROJECT_NAME: 'mfd-hyperv'
RELEASE_STEPS: ${{ matrix.release_steps }}
RELEASE_STEPS: ${{ matrix.release_steps }}
20 changes: 20 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Dev Build

on:
pull_request:
types: [opened, synchronize]

jobs:
build_whl:
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'
Comment on lines +9 to +20

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 5 months 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.
29 changes: 0 additions & 29 deletions .github/workflows/pull_requests.yml

This file was deleted.

10 changes: 3 additions & 7 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
python_version: ['3.10', '3.13']
uses: intel/mfd/.github/workflows/run_tests.yml@main
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
with:
REPOSITORY_NAME: ${{ github.event.pull_request.head.repo.full_name }}
BRANCH_NAME: ${{ github.head_ref }}
uses: intel/mfd/.github/workflows/run_tests.yml@main
with:
PYTHON_VERSION: ${{ matrix.python_version }}
RUNS_ON: ${{ matrix.os }}
PROJECT_NAME: 'mfd-hyperv'
PROJECT_NAME: 'mfd-hyperv'
Loading