Short-option clusters such as -Sm were treated as consuming the next
argument, which let --pathspec-from-file reach git and leak file
contents into workflow logs.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: reject glued quotes that string-argv would split into extra git flags
A balanced form like 'main'--force is still two argv tokens under string-argv, so refuse it before git push can see a standalone --force.
Co-authored-by: Cursor <cursoragent@cursor.com>
* docs: describe glued-quote rejection as an argument-boundary check
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
core.info writes raw stdout, so inputs like message could inject
::stop-commands:: via a newline. Route info through safeInfo().
Co-authored-by: Cursor <cursoragent@cursor.com>
Git interpolates unmatched pathspecs into fatal errors, so these options can copy an arbitrary runner file into the action log.
Co-authored-by: Cursor <cursoragent@cursor.com>
YAML true was passed through as git pull arguments, so pull: true ran `git pull true` instead of a default pull.
Co-authored-by: Cursor <cursoragent@cursor.com>
matchGitArgs treated -u as always consuming the next token, so fetch/push
args like -u --upl=CMD bypassed the denylist. Validate remote-helper
options on every token and stop treating -u as a value option.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* test: add integration tests for the shipped action
Cover commit, tag, push, and pathspec flows against temp git fixtures with local bare remotes (#479).
Co-authored-by: Cursor <cursoragent@cursor.com>
* test: pin fixture default branch to main for CI
GitHub runners often have no init.defaultBranch set, so git config --get exits 1 and broke fixture setup.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Allow concurrent workflows to recover from push races by re-pulling between attempts when pull is configured.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: neutralize bidi and control chars in action logs
Prevent Trojan Source-style filename spoofing when git status paths are printed via log(), and sanitize conflicted paths in pull errors.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: guard neutralizeForLog against circular references
Track visited arrays/objects with a WeakSet so log() returns a marker instead of overflowing on cyclic values.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid dumping listConfig().all via core.debug so checkout extraheader tokens are never written to action logs.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: prevent git option injection via new_branch
Validate new_branch as a branch name and pass it after -- so values like --force cannot force-checkout or force-push.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: tighten new_branch validation and simplify checkout
Reject Unicode whitespace/C1 controls in branch names, and drop the checkout -- separator after early validation.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: validate new_branch with git check-ref-format
Reject invalid ref forms via check-ref-format --branch, align docs, and clarify the remote-helper warning wording.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
* cleanup: Removes JSON array parsing.
JSON is a subset of YAML, making it redundant.
* ci: add tests for parseInputArray.
Makes tools into a function to be able to mock it.
It does not need to be exported.
* Update runner version
---------
Co-authored-by: Federico Grandi <fgrandi30@gmail.com>