8 Commits
Author SHA1 Message Date
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