Skip to content

Remove false positive injection sink models for docker/build-push-action and step-security/harden-runner#21574

Open
redsun82 wants to merge 3 commits intomainfrom
redsun82/actions/remove-harden-runner-false-positive
Open

Remove false positive injection sink models for docker/build-push-action and step-security/harden-runner#21574
redsun82 wants to merge 3 commits intomainfrom
redsun82/actions/remove-harden-runner-false-positive

Conversation

@redsun82
Copy link
Contributor

@redsun82 redsun82 commented Mar 25, 2026

Remove false positive injection sink models for:

In both cases, the inputs are passed as single array elements to child_process.spawn() or similar non-shell APIs, so no injection is possible.

…ty/harden-runner`

The `allowed-endpoints` input only flows to `execFileSync("echo", [content])`
(no shell) and `fs.writeFileSync` (JSON config), neither of which is a
command injection vector.

Fixes #21568
@redsun82 redsun82 requested a review from a team as a code owner March 25, 2026 10:23
Copilot AI review requested due to automatic review settings March 25, 2026 10:23
@github-actions github-actions bot added the Actions Analysis of GitHub Actions label Mar 25, 2026
Copy link
Contributor

Copilot AI left a comment

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 removes an incorrect GitHub Actions sink model that was causing false-positive command-injection findings for step-security/harden-runner (per issue #21568), aligning the CodeQL Actions models with the action’s actual behavior.

Changes:

  • Removes the manual actionsSinkModel entry that labeled input.allowed-endpoints as a command-injection sink.

The `context` input is passed as a single array element through
`docker/actions-toolkit` and `@actions/exec` all the way to
`child_process.spawn()`, which does not perform shell splitting.
No code injection is possible.

Fixes #21428
@redsun82 redsun82 changed the title Remove false-positive command-injection sink model for step-security/harden-runner Remove false positive injection sink models for docker/build-push-action and step-security/harden-runner Mar 26, 2026
Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

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

Looks plausible to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Actions Analysis of GitHub Actions documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False positive: Incorrect CodeQL model for step-security/harden-runner action False positive: docker/build-push-action, context input

3 participants