Skip to content

Conversation

camembera
Copy link
Collaborator

Potential fix for https://github.com/berachain/guides/security/code-scanning/2

To fix the problem, add a permissions block to the workflow to explicitly set the minimum required permissions for the GITHUB_TOKEN. Since the workflow only checks out code, installs dependencies, and runs build/lint/formatting checks, it does not require any write permissions. The minimal required permission is contents: read. This block can be added at the top level of the workflow (applies to all jobs), or at the job level (applies only to the specific job). The best practice is to add it at the top level, immediately after the name field, to ensure all jobs inherit the least privilege unless overridden.

What to change:

  • In .github/workflows/ci.yml, add the following block after the name: CI line and before the on: block:
    permissions:
      contents: read
  • No additional imports, methods, or definitions are needed.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

truflorau and others added 30 commits August 10, 2024 14:15
Signed-off-by: Raul Truta <[email protected]>
Signed-off-by: Raul Truta <[email protected]>
Signed-off-by: Raul Truta <[email protected]>
Signed-off-by: Raul Truta <[email protected]>
Signed-off-by: Raul Truta <[email protected]>
Signed-off-by: Raul Truta <[email protected]>
Signed-off-by: Raul Truta <[email protected]>
Signed-off-by: Oleksandr <[email protected]>
Throttle logic moved outside subscribePriceFeedUpdates to prevent unnecessary re-creation of the throttled function

Simplified trade direction check with a more compact ternary statement.

Improved error handling with more specific error messages during trade execution.

General readability improvements by reducing nested logic where possible and making variable assignments clearer.

Signed-off-by: Marson Kotovi4 <[email protected]>
Add token whitelisting to vault proposal
camembera and others added 28 commits June 16, 2025 12:54
remove insane block filling script
fewer options
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Camembera <[email protected]>
…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Camembera <[email protected]>
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.