Skip to content

Commit c169137

Browse files
Potential fix for code scanning alert no. 2: Workflow does not contain permissions (#59)
Potential fix for [https://github.com/richardsondev/AggregateConfigBuildTask/security/code-scanning/2](https://github.com/richardsondev/AggregateConfigBuildTask/security/code-scanning/2) To fix the issue, we will add a `permissions` block to the workflow. This block will specify the minimal permissions required for the workflow to function correctly. Based on the actions used in the workflow, the following permissions are needed: 1. `contents: read` - Required for actions like `actions/checkout` to access the repository's contents. 2. `packages: read` - Required for downloading the NuGet package artifact. 3. `actions: read` - Required for downloading and uploading artifacts. We will add the `permissions` block at the workflow level to apply these permissions to all jobs. This ensures consistency and avoids redundancy. --- _Suggested fixes powered by Copilot Autofix. Review carefully before merging._ Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 55d96c3 commit c169137

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ on:
1111
- main
1212
workflow_dispatch:
1313

14+
permissions:
15+
contents: read
16+
packages: read
17+
actions: read
18+
1419
jobs:
1520
build:
1621
runs-on: windows-latest

0 commit comments

Comments
 (0)