This repository was archived by the owner on Oct 15, 2026. It is now read-only.
Repository navigation
Resolve shell injection vulnerability in git checkout <ref> - #371
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The changes prevent direct shell interpolation while preserving branch, tag, and commit selection, with no identified blocking issues.
0 open findings
What changed in this PR
This PR hardens Triton checkout in the plugin test workflow against shell injection through triton-ref.
Changes:
- Passes the input through an environment variable and safely resolves it to a commit.
- Validates commit hashes and uses detached checkouts.
| File | Description |
|---|---|
.github/workflows/test-plugin.yml |
Secures ref handling, validates pinned hashes, and documents the optional input. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Micah Weston (red1bluelost)
approved these changes
Oct 15, 2026
beicy
approved these changes
Oct 15, 2026
Brandon Myers (bmyerz0)
enabled auto-merge (squash)
October 15, 2026 16:33
Micah Weston (red1bluelost)
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Security scans revealed a potential for code injection through
triton-ref. Nightly builds hard code the ref tomain, however if the template was used in another context it could be exploited.Furthermore, the injected command could potentially read credentials from CI worker's
.git/configdue topersist-credentials: true.Example
Set the workflow’s
triton-refinput tomain; echo COMMAND:Before the fix, GitHub interpolates that input directly into the script:
Bash executes
echo COMMANDas a separate command, printingCOMMAND.Mitigation
Validate the triton-ref prior to use and reject if not a hash or does not resolve to a hash.
Also set
persist-credentials: falsefor extra hardening. The credentials are not needed after the checkout anyway.Other changes
Pin lit version to unblock CI.