Skip to content

Conversation

@AlexGalichenko
Copy link
Contributor

Potential fix for https://github.com/qavajs/format-report-portal/security/code-scanning/1

To fix the problem, add a permissions block restricting access to the minimal required scope. For this workflow, the steps only need to read repository contents, so at the root of the workflow YAML (under the name: or after on:, before jobs:), add permissions: with contents: read as a minimal starting point. This ensures the GITHUB_TOKEN cannot be abused for unintended write privileges, thus following the principle of least privilege.

Specifically, edit the file .github/workflows/pull-request.yml. Add these lines after line 2 (name: Test) or after the trigger configuration (on:), but before jobs:.

No code methods or imports are required.

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>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 4, 2025

@AlexGalichenko AlexGalichenko marked this pull request as ready for review November 4, 2025 14:50
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