Skip to content

Conversation

@simonmarty
Copy link
Contributor

Potential fix for https://github.com/aws/secrets-store-csi-driver-provider-aws/security/code-scanning/1

The best fix is to explicitly add a permissions block limiting the GITHUB_TOKEN's permissions to contents: read at the job level or—preferably—at the workflow root, ensuring that the token used by the actions in this workflow has only read access to repository contents. This is sufficient for the tasks performed (format checking, building, testing, and reporting coverage via Codecov, which uses a secret token). Add the following to the top-level section of the workflow, after the name: field and before on::

permissions:
  contents: read

No imports or methods are needed. Only the workflow YAML file needs to be changed.

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: Simon Marty <[email protected]>
@simonmarty simonmarty marked this pull request as ready for review September 8, 2025 21:15
@simonmarty simonmarty requested a review from a team as a code owner September 8, 2025 21:15
@codecov
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.67%. Comparing base (f9d1c34) to head (569f21d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #513   +/-   ##
=======================================
  Coverage   59.67%   59.67%           
=======================================
  Files          11       11           
  Lines        1034     1034           
=======================================
  Hits          617      617           
  Misses        400      400           
  Partials       17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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