Skip to content

fx: for code scanning alert no. 1: Workflow does not contain permissions - #150

Merged
janishorsts merged 1 commit into
mainfrom
alert-autofix-1
Apr 25, 2026
Merged

fx: for code scanning alert no. 1: Workflow does not contain permissions#150
janishorsts merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@janishorsts

Copy link
Copy Markdown

Potential fix for https://github.com/EarthBuild/dind/security/code-scanning/1

Add an explicit permissions block to the workflow so GITHUB_TOKEN is constrained regardless of repository/org defaults.

Best fix here: define workflow-level permissions right after the trigger section (on:), before jobs::

  • contents: read is sufficient for checking out repository contents.
  • No additional GitHub write scopes are needed for this workflow, since Docker Hub update uses DOCKERHUB_TOKEN, not GitHub write APIs.

File to change:

  • .github/workflows/dockerhub-description.yml

Region to change:

  • Insert permissions: block between the existing on: block and jobs: block.

No imports/dependencies/methods are needed (YAML config only).

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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@github-actions

Copy link
Copy Markdown

➖ Are we earthbuild yet?

No change in "earthly" occurrences

📈 Overall Progress

Branch Total Count
main 25
This PR 25
Difference +0

Keep up the great work migrating from Earthly to Earthbuild! 🚀

💡 Tips for finding more occurrences

Run locally to see detailed breakdown:

./.github/scripts/count-earthly.sh

Note that the goal is not to reach 0.
There is anticipated to be at least some occurences of earthly in the source code due to backwards compatibility with config files and language constructs.

@janishorsts janishorsts changed the title Potential fix for code scanning alert no. 1: Workflow does not contain permissions fx: for code scanning alert no. 1: Workflow does not contain permissions Apr 25, 2026
@janishorsts
janishorsts marked this pull request as ready for review April 25, 2026 14:01
@janishorsts
janishorsts requested a review from a team as a code owner April 25, 2026 14:01
@janishorsts
janishorsts requested review from gilescope and removed request for a team April 25, 2026 14:01
@janishorsts
janishorsts merged commit 38f432c into main Apr 25, 2026
8 checks passed
@janishorsts
janishorsts deleted the alert-autofix-1 branch April 25, 2026 14:01
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