19 Commits
Author SHA1 Message Date
3446398e33 fix: validate denylisted git args on every token (#784)
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>
2026-08-19 14:47:41 +00:00
66d71debe9 fix: reject glued quotes that string-argv would split into extra git flags (#778)
* 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>
2026-08-16 23:48:44 +00:00
60ff4bbcac fix: neutralize workflow-command injection in info logs (#776)
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>
2026-08-16 23:41:44 +00:00
c8ad2e2815 fix: reject --pathspec-from-file to prevent log disclosure (#777)
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>
2026-08-17 01:32:04 +02:00
f0d523cb47 feat: treat pull: true as a default git pull (#498) (#773)
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>
2026-08-14 21:15:51 +00:00
c5e28a6f24 fix: resolve absolute cwd without dumping the minified bundle (#495) (#772)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 21:11:22 +00:00
ce01340b68 fix: block scheme:: remote helpers and restrict git transports (#771)
* fix: block scheme:: remote helpers and restrict git transports

Harden fetch/pull/push argument handling against ext:: (and other
scheme::) remote-helper URLs, and allowlist safe transports by default,
with allow_unsafe_git_protocols as an explicit opt-out.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: quote allow_unsafe description and correct README anchor

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 21:21:17 +02:00
ee94c9b2c5 fix: reject remote-helper overrides skipped by -u (#770)
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>
2026-08-14 20:54:57 +02:00
e1aaefa5cf feat: add dry_run input (#765)
* feat: add dry_run input to preview without mutating

Closes #511

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: tighten dry_run typing and temp-index gitlink checks

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: seed empty temp index when HEAD is unborn

Co-authored-by: Cursor <cursoragent@cursor.com>

* test: broaden dry_run coverage and add update-tests rule

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-09 23:16:20 +02:00
f958857000 test: add integration tests for the shipped action (#766)
* 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>
2026-08-09 23:09:44 +02:00
df70d113de feat: add push_attempts to retry failed pushes (#321) (#764)
Allow concurrent workflows to recover from push races by re-pulling between attempts when pull is configured.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-09 20:33:31 +02:00
06e788f69a fix: neutralize bidi and control chars in action logs (#763)
* 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>
2026-08-09 00:51:33 +02:00
ebc24bfdec fix: refuse unexpected gitlinks staged by git add (#761)
* fix: refuse unexpected gitlinks staged by git add

Detect new mode-160000 entries after add via git diff --cached --raw so nested .git directories cannot be silently committed as attacker-chosen gitlinks.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: harden gitlink raw-diff parsing for renames

Accept scored R/C statuses and destination paths, and use -- in rm remediation hints.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-09 00:18:54 +02:00
75038f8fb4 fix: reject unmatched quotes in matchGitArgs to prevent flag injection (#760)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-09 00:07:23 +02:00
d07c930b6a fix: reject -F/--file git args that can exfiltrate runner files (#759)
* fix: reject -F/--file git args that can exfiltrate runner files

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: document -F/--file blocks on tag and commit inputs

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: do not treat -m values as -F/--file flags

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 23:36:58 +02:00
0971289a81 fix: stop logging full git config (credential leak) (#758)
Avoid dumping listConfig().all via core.debug so checkout extraheader tokens are never written to action logs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 23:16:29 +02:00
b4a0134716 fix: prevent git option injection via new_branch (#755)
* 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>
2026-08-08 22:38:05 +02:00
86ab5dca75 fix: reject remote-helper git flags that enable RCE (#754)
* fix: reject remote-helper git flags that enable RCE

Block --upload-pack, --receive-pack, --exec (and abbreviations) in matchGitArgs so injected fetch/pull/push/tag_push args cannot execute local commands.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(deps): bump simple-git to ^3.36.0

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: reject shortest Git abbreviations of remote-helper flags

Co-authored-by: Cursor <cursoragent@cursor.com>

* npm audit fix

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 19:55:37 +02:00
1c95e2b373 Removes the redundant JSON array parsing. (#652)
* 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>
2025-11-12 11:46:42 +01:00