Commit Graph
171 Commits
Author SHA1 Message Date
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>github-actions <41898282+github-actions[bot]@users.noreply.github.com>
bccc19ea17 chore(deps): bump js-yaml from 5.2.3 to 5.3.0 (#780)
* chore(deps): bump js-yaml from 5.2.3 to 5.3.0

Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 5.2.3 to 5.3.0.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/5.2.3...5.3.0)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 5.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: rebuild lib

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-19 00:35:07 +02: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
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
f1bb0cc0a7 fix: do not report committed=true for empty commit SHA (#757)
* fix: do not report committed=true for empty commit SHA

simple-git can resolve successfully with an empty commit hash when no
commit was actually created; keep the committed output accurate.

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

* fix: stop tagging/pushing after empty commit SHA

Let empty-SHA failures reject so the outer catch stops the action instead of continuing after setFailed.

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

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 22:21:22 +00: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
c38a33b50a fix: verify committed lib/ matches source in CI (#756)
* fix: verify committed lib/ matches source in CI

Add a post-build diff check so the shipped action bundle cannot drift from src without failing CI, even when local hooks are bypassed.

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

* chore: rebuild lib/ against lockfile for CI integrity check

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

* ci: tighten lib integrity check and workflow permissions

Detect untracked lib/ artifacts, drop checkout credentials, and document Node 24 for local builds.

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

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 20:44:15 +00: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
dependabot[bot]Federico Grandidependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Cursor
2b9ea5bc7f chore(deps-dev): bump typescript from 5.9.3 to v6 (#748)
* chore(deps-dev): use TypeScript 6 instead of 7

TypeScript 7 lacks the compiler API required by ts-jest and ncc. Update tsconfig for TS6 breaking changes.

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Federico Grandi <fgrandi30@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 18:55:57 +02:00
Federico Grandi 9ac38785ff chore: npm audit fix 2026-03-22 22:26:17 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>CopilotEndBug
1539a6ad10 chore(deps): bump @actions/core from 2.0.2 to 3.0.0 (#716)
* chore(deps): bump @actions/core from 2.0.2 to 3.0.0

Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 2.0.2 to 3.0.0.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(deps): update build process for ESM-only @actions/core v3 (#717)

* Initial plan

* feat: update build process for ESM-only @actions/core v3

- Add "type": "module" to package.json for ESM support
- Update TypeScript config to output ES2022 modules with esModuleInterop
- Convert Jest config to ESM (.mjs) with proper ts-jest ESM preset
- Rename .prettierrc.js to .prettierrc.cjs for CommonJS compatibility
- Replace actions-toolkit with @actions/github for ESM compatibility
- Configure Jest to handle ESM modules from @actions packages
- Update test script to use NODE_OPTIONS for experimental VM modules
- Build now outputs ESM format successfully

Co-authored-by: EndBug <26386270+EndBug@users.noreply.github.com>

* fix: use getInput for github_token instead of process.env

Properly access github_token input using the getInput helper function
from io.ts instead of directly accessing process.env.

Co-authored-by: EndBug <26386270+EndBug@users.noreply.github.com>

* refactor: remove unnecessary moduleNameMappers from Jest config

The explicit moduleNameMappers for @actions/core and @actions/github were
not needed. The transformIgnorePatterns configuration is sufficient to
handle ESM modules from @actions packages. Only the relative import
mapper is required for TypeScript ESM compatibility.

Co-authored-by: EndBug <26386270+EndBug@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: EndBug <26386270+EndBug@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: EndBug <26386270+EndBug@users.noreply.github.com>
2026-02-28 12:58:11 +01: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
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
8190631d94 chore(deps-dev): bump gts from 5.3.1 to 6.0.0 (#665)
Bumps [gts](https://github.com/google/gts) from 5.3.1 to 6.0.0.
- [Release notes](https://github.com/google/gts/releases)
- [Changelog](https://github.com/google/gts/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gts/compare/v5.3.1...v6.0.0)

---
updated-dependencies:
- dependency-name: gts
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-24 10:58:48 +00:00
Federico GrandiandGitHub cb9365b122 chore: switch to GTS for linting (#636)
* fix: switch over to gts

* fix: add debug message for input arrays

* fix: fix input array parsing
2024-03-26 14:41:25 +01:00
Federico GrandiandGitHub 81610ab502 fix: bump node to v20 (#614) 2024-01-25 23:44:56 +01:00
Federico Grandi a01be0b616 chore: npm audit fix 2023-07-15 13:21:19 +02:00
Federico Grandi f388d5a882 chore: merge branch 'linters' 2023-07-15 13:20:36 +02:00
Federico Grandi 3b9f002fa7 chore: fix linters configuration 2023-07-15 13:19:03 +02:00
Federico GrandiandGitHub 458820b0f0 chore(deps): bump simple-git (#505)
* chore(deps): bump simple-git

* docs: add @ViacheslavKudinov as a contributor
2023-05-08 14:52:09 +02:00
Jonah LawrenceandGitHub db302697f8 fix: Abbreviate commit_sha to be the short SHA (#502) 2023-04-28 19:33:36 +02:00
Federico GrandiandGitHub d41df3cf95 fix(io): add warning for pull input (#453)
Ref #450, #452
2022-11-07 09:13:02 +01:00
Federico Grandi 3a7c05ee83 chore: remove changelog
From now on, the release section on GitHub will be the only changelog
2022-10-11 19:07:19 +02:00
Federico GrandiandGitHub d4d066316a 9.1.0 2022-08-22 17:37:29 +00:00
Federico GrandiandGitHub f7edecabb7 feat: add fetch input (#423)
* chore: add additional log notes

* feat: add `fetch` input

Ref #386

* fix: add warnings about not fetching

* docs: `fetch` input & large repos FAQ

* chore: fix typo
2022-08-22 19:26:22 +02:00
Federico GrandiandGitHub 998652d28d docs: update changelog 2022-06-26 19:15:56 +00:00
Federico GrandiandGitHub cbc4f17c16 fix: correct typo in error 2022-06-26 19:09:57 +00:00
Federico GrandiandGitHub 0d52df43e8 fix: re-stage files after pulling (#411)
* fix: re-stage files after pulling

This should fix an issue that prevented changes from being committed
when `git pull --rebase --autostash` used.

Issue #406

* chore: mark pre-commit hook as executable

* fix: detect conflicts after pull
2022-06-26 20:58:34 +02:00
Federico Grandi d56de922da chore: bump simple-git 2022-06-14 12:57:12 +02:00
Federico GrandiandGitHub 4c184a79ea chore: bump simple-git (#380) 2022-03-18 11:22:57 +01:00
Federico Grandi 050a667872 release: v9.0.0 2022-03-11 22:59:13 +01:00
Federico GrandiandGitHub 0b47528fc7 fix!: fail when there's an error while committing (#376) 2022-03-11 22:44:53 +01:00
Federico GrandiandGitHub 0e4f5f6417 feat: add tag_push input and tag_pushed output (#374) 2022-03-11 19:01:06 +01:00
Federico Grandi 2103e93ecc chore: npm audit fix, update build 2022-01-23 23:09:07 +01:00
bfbc660a1b fix: add check to allow empty commits (#352)
* add check to allow empty commits if arg is set

* fix: target only the desired argument

* fix: add debug message

* fix: fix debug message

Co-authored-by: Federico Grandi <fgrandi30@gmail.com>
2022-01-23 23:05:54 +01:00
Federico GrandiandGitHub 0e1feea77e feat: add commit_long_sha output (#349) 2022-01-20 13:18:16 +01:00
Federico Grandi a790c74dfe fix: merge existing inputs into new new_branch input 2022-01-19 21:41:48 +01:00
Federico Grandi d4d39927bf fix!: don't switch branch unless explicitly told so 2021-12-09 18:35:35 +01:00
Federico Grandi 249b415d1b chore: move io-related code to dedicated file 2021-12-09 18:13:17 +01:00
Federico Grandi 9b29ba5ec1 [auto] build: update compiled version 2021-12-03 20:45:21 +00:00