Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#27

Merged
jferrl merged 1 commit intomainfrom
dev/jorge/code-scan
Sep 15, 2025
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#27
jferrl merged 1 commit intomainfrom
dev/jorge/code-scan

Conversation

@jferrl
Copy link
Copy Markdown
Owner

@jferrl jferrl commented Sep 15, 2025

Potential fix for https://github.com/jferrl/go-githubauth/security/code-scanning/1

The best way to fix this issue is to explicitly set the permissions key near the top of the workflow file. Since the workflow only needs to read the repository contents for building (and does not need to write to contents, issues, packages, or any other GitHub entity), it should set contents: read as the minimal required permission. The safest and simplest fix is to add this top-level permissions block directly under the workflow's name, so it applies to all jobs. No change to imports or functionality is needed—just a single block addition.

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>
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.28%. Comparing base (fcbfad3) to head (116935b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #27   +/-   ##
=======================================
  Coverage   94.28%   94.28%           
=======================================
  Files           2        2           
  Lines         140      140           
=======================================
  Hits          132      132           
  Misses          6        6           
  Partials        2        2           

☔ 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.

@jferrl jferrl marked this pull request as ready for review September 15, 2025 10:08
@jferrl jferrl merged commit 337cb00 into main Sep 15, 2025
9 checks passed
@jferrl jferrl deleted the dev/jorge/code-scan branch September 19, 2025 06:14
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.

1 participant