Skip to content

Harden Actions workflow token scope by setting explicit minimal permissions - #59

Merged
creativeprojects merged 2 commits into
mainfrom
copilot/fix-code-scanning-alert-3
Aug 5, 2026
Merged

Harden Actions workflow token scope by setting explicit minimal permissions#59
creativeprojects merged 2 commits into
mainfrom
copilot/fix-code-scanning-alert-3

Conversation

Copilot AI commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
  • Security hardening (GitHub Actions)

    • Added an explicit workflow-level permissions block in .github/workflows/build.yml.
    • Set token scope to read-only for repository contents.
  • Result

    • Resolves CodeQL alert actions/missing-workflow-permissions with a minimal, targeted workflow change.
permissions:
  contents: read

Co-authored-by: creativeprojects <24314560+creativeprojects@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code scanning alert #3 in repository Harden Actions workflow token scope by setting explicit minimal permissions Aug 5, 2026
Copilot AI requested a review from creativeprojects August 5, 2026 13:20
@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.83%. Comparing base (27a5f17) to head (2c16617).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #59   +/-   ##
=======================================
  Coverage   76.83%   76.83%           
=======================================
  Files          28       28           
  Lines        1161     1161           
=======================================
  Hits          892      892           
  Misses        218      218           
  Partials       51       51           
Flag Coverage Δ
unittests 76.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@creativeprojects
creativeprojects marked this pull request as ready for review August 5, 2026 13:33
Copilot AI lite review requested due to automatic review settings August 5, 2026 13:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the GitHub Actions build workflow by explicitly setting minimal GITHUB_TOKEN permissions at the workflow level, aligning the workflow with least-privilege expectations and addressing the actions/missing-workflow-permissions class of CodeQL findings.

Changes:

  • Added an explicit workflow-level permissions block.
  • Constrained GITHUB_TOKEN to read-only access for repository contents (contents: read).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/build.yml
@creativeprojects
creativeprojects merged commit 5e5da6f into main Aug 5, 2026
12 checks passed
@creativeprojects
creativeprojects deleted the copilot/fix-code-scanning-alert-3 branch August 5, 2026 13:39
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.

3 participants