Skip to content

Conversation

@elliot-huffman
Copy link

@elliot-huffman elliot-huffman commented Aug 24, 2025

Description:

The documentation recommended to put insecure code into GH Actions workflows, this was lit up like a Christmas tree in CodeQL in my environment. This PR is to fix the recommended configuration so that injection/takeover attacks are not the recommended default.

Changes:

  • Update least privilege to read only for GH Actions example.
  • Add blurb about least permission.
  • Fix an injection attack that is possible with specially crafted PRs and commits that allows threat actors to run malicious commands in the GH Actions execution context.
  • Update GH Action version to the latest version.
  • Change @main reference to SHA hash place holder as @main is a risk too for execution take over, only pinned commits should be used for actions.

Checklist:

Readme change only, no code changes in the project.

Update least privilege to read only for GH Actions example.
Add blurb about least permission.
Fix an injection attack that is possible with specially crafted PRs and commits that allows threat actors to run malicious commands in the GH Actions execution context.
Update GH Action version to the latest version.
Update @main reference to SHA hash place holder as @main is a risk too for execution take over, only pinned commits should be used for actions.
@elliot-huffman elliot-huffman requested a review from a team as a code owner August 24, 2025 16:58
@CLAassistant
Copy link

CLAassistant commented Aug 24, 2025

CLA assistant check
All committers have signed the CLA.

@elliot-huffman elliot-huffman changed the title Fix Security Risks Fix Documentation Security Risks Aug 24, 2025
@elliot-huffman elliot-huffman changed the title Fix Documentation Security Risks [Documentation] Fix Security Risks Aug 24, 2025
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