Skip to content

Harden upload workflow token scope with explicit GITHUB_TOKEN permissions - #419

Merged
dawidd6 merged 2 commits into
masterfrom
copilot/fix-code-scanning-alert-52
Aug 15, 2026
Merged

dawidd6 merged 2 commits into
masterfrom
copilot/fix-code-scanning-alert-52

Conversation

Copilot AI commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

This PR addresses the code scanning finding for missing explicit workflow permissions in GitHub Actions. It tightens token scope in the upload workflow by declaring permissions at the workflow level.

  • Security hardening

    • Added explicit top-level permissions to .github/workflows/upload.yml.
    • Uses least-privilege default ({}) so no implicit GITHUB_TOKEN scopes are granted.
  • Code scanning alignment

    • Resolves the actions/missing-workflow-permissions class of alert by making token permissions explicit rather than inheriting defaults.
permissions: {}

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code scanning alert #52 Harden upload workflow token scope with explicit GITHUB_TOKEN permissions Aug 15, 2026
Copilot AI requested a review from dawidd6 August 15, 2026 15:08
@dawidd6
dawidd6 marked this pull request as ready for review August 15, 2026 15:11
@dawidd6
dawidd6 merged commit a64f37f into master Aug 15, 2026
24 checks passed
@dawidd6
dawidd6 deleted the copilot/fix-code-scanning-alert-52 branch August 15, 2026 15:13
centosinfra-prod-github-app Bot pushed a commit to ansible-collections/amazon.aws that referenced this pull request Sep 22, 2026
…ates (#3099)

Bumps the github-actions group with 2 updates in the / directory: dawidd6/action-download-artifact and SonarSource/sonarqube-scan-action.
Updates dawidd6/action-download-artifact from 21 to 24

Release notes
Sourced from dawidd6/action-download-artifact's releases.

v24
What's Changed

fix: preserve workflow run ordering by @​dawidd6 in dawidd6/action-download-artifact#425

Full Changelog: dawidd6/action-download-artifact@v23...v24
v23
Info
This release is rather big. Not gonna lie to you, I've used LLMs to get there. I can't vouch for all the changes but CI confirms there should be no regressions. Please report any issues you encounter with this release. You can always revert to previous working one.
What's Changed

joint fixes and improvements by @​dawidd6 in dawidd6/action-download-artifact#417
build(deps): update brace-expansion by @​dawidd6 in dawidd6/action-download-artifact#418
Harden upload workflow token scope with explicit GITHUB_TOKEN permissions by @​dawidd6 with @​Copilot in dawidd6/action-download-artifact#419
fix: stream GHES artifact downloads by @​dawidd6 in dawidd6/action-download-artifact#420
chore: simplify action implementation by @​dawidd6 in dawidd6/action-download-artifact#421
chore: remove redundant action code by @​dawidd6 in dawidd6/action-download-artifact#422
chore: simplify artifact filtering by @​dawidd6 in dawidd6/action-download-artifact#423

Full Changelog: dawidd6/action-download-artifact@v22...v23
v22
What's Changed

build(deps): bump fast-xml-builder from 1.1.5 to 1.2.0 by @​dependabot[bot] in dawidd6/action-download-artifact#406
build(deps): bump actions/checkout from 6 to 7 by @​dependabot[bot] in dawidd6/action-download-artifact#407
build(deps): bump undici from 6.24.0 to 6.27.0 by @​dependabot[bot] in dawidd6/action-download-artifact#408
build(deps): bump filesize from 11.0.17 to 11.0.18 by @​dependabot[bot] in dawidd6/action-download-artifact#409
build(deps): bump filesize from 11.0.18 to 11.0.19 by @​dependabot[bot] in dawidd6/action-download-artifact#410
build(deps): bump adm-zip from 0.5.17 to 0.5.18 by @​dependabot[bot] in dawidd6/action-download-artifact#411
build(deps): bump filesize from 11.0.19 to 11.0.22 by @​dependabot[bot] in dawidd6/action-download-artifact#412
build(deps): bump adm-zip from 0.5.18 to 0.6.0 by @​dependabot[bot] in dawidd6/action-download-artifact#414
build(deps): bump undici from 6.27.0 to 6.28.0 by @​dependabot[bot] in dawidd6/action-download-artifact#415
node_modules: update by @​dawidd6 in dawidd6/action-download-artifact#416
Continue downloading after expired artifacts in non-fatal modes by @​oiahoon in dawidd6/action-download-artifact#413

New Contributors

@​oiahoon made their first contribution in dawidd6/action-download-artifact#413

Full Changelog: dawidd6/action-download-artifact@v21...v22



Commits

d63b86a fix: preserve workflow run ordering (#425)
57aa996 chore: simplify artifact filtering (#423)
7325d46 chore: remove redundant action code (#422)
fdd98d5 chore: simplify action implementation (#421)
2156211 fix: stream GHES artifact downloads (#420)
a64f37f Harden upload workflow token scope with explicit GITHUB_TOKEN permissions (...
b3e5a4c build(deps): update brace-expansion (#418)
01843d9 joint fixes and improvements (#417)
7f871e0 fix: continue after expired artifacts (#413)
0015e1b node_modules: update (#416)
Additional commits viewable in compare view



Updates SonarSource/sonarqube-scan-action from 8.2.1 to 8.2.2

Release notes
Sourced from SonarSource/sonarqube-scan-action's releases.

v8.2.2
What's Changed

SQSCANGHA-159 Bump undici from 6.24.1 to 6.28.1 by @​dependabot[bot] in SonarSource/sonarqube-scan-action#261

Full Changelog: SonarSource/sonarqube-scan-action@v8.2.1...v8.2.2



Commits

ba9859e SQSCANGHA-159 Bump undici from 6.24.1 to 6.28.1 (#261)
5bc5285 Rename code-quality teams to code-orchestration in CODEOWNERS
ad82103 SQSCANGHA-158 NO-JIRA Bump actions/checkout from 7.0.0 to 7.0.1 (#260)
7451daf SQSCANGHA-157 NO-JIRA Bump actions/setup-node from 6.4.0 to 7.0.0 (#259)
See full diff in compare view



Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

@dependabot rebase will rebase this PR
@dependabot recreate will recreate this PR, overwriting any edits that have been made to it
@dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
@dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
@dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
@dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
@dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
@dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

Reviewed-by: Bikouo Aubin
Reviewed-by: Don Naro <dnaro@redhat.com>
Reviewed-by: Alina Buzachis
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