Skip to content

Conversation

@VisualBean
Copy link
Contributor

Potential fix for https://github.com/ByteBardOrg/AsyncAPI.NET/security/code-scanning/8

To fix the issue, we need to explicitly define the permissions for the workflow. The permissions key should be added at the root level of the workflow to apply to all jobs, or at the job level to customize permissions for specific jobs. Since the workflow performs both read and write operations, we will grant contents: read and packages: write permissions, which are the minimum required for the tasks performed.

The changes will be made to the .github/workflows/release-package.yml file:

  1. Add a permissions block at the root level of the workflow to define the least privileges required.
  2. Ensure that the permissions align with the operations performed in the workflow, such as reading repository contents and publishing packages.

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>
Signed-off-by: Alex Wichmann <VisualBean@users.noreply.github.com>
@VisualBean VisualBean changed the title Potential fix for code scanning alert no. 8: Workflow does not contain permissions ci: workflow does not contain permissions Jun 12, 2025
@VisualBean VisualBean marked this pull request as ready for review June 12, 2025 12:46
VisualBean and others added 2 commits June 12, 2025 14:47
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Alex Wichmann <VisualBean@users.noreply.github.com>
Signed-off-by: Alex Wichmann <VisualBean@users.noreply.github.com>
@VisualBean VisualBean merged commit ee51744 into vnext Jun 12, 2025
6 of 7 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.

2 participants