Commit Graph
663 Commits
Author SHA1 Message Date
dk 62debc18bb Fix: treat 'owner' as sufficient permission on Forgejo v1 2026-03-30 11:59:29 -07:00
forgejo-actions[bot] 421d59c59f mirror: f2339f8 style: fix prettier formatting on upstream file 2026-03-16 08:34:46 +00:00
Vlad Mocanu f2339f80b0 style: fix prettier formatting on upstream file 2026-03-16 10:34:38 +02:00
Vlad Mocanu c8a67b6d5e Merge pull request 'chore: merge 7 upstream commits from anthropics/claude-code-action' (#54) from chore/upstream-sync-20260316 into main
Reviewed-on: https://git.wxs.ro/actions/claude-code-action/pulls/54
2026-03-16 08:33:00 +00:00
claudeandvtmocanu c80d3be21a fix: handle malformed JSONL lines gracefully in post-buffered-inline-comments
Wrap per-line JSON.parse in try-catch so a single truncated/malformed
entry (e.g. from an OOM mid-write) skips with a warning instead of
aborting the entire batch and dropping all comments.

Co-authored-by: vtmocanu <vtmocanu@users.noreply.github.com>
2026-03-16 08:32:04 +00:00
forgejo-actions[bot] 64e55f6eec chore: regenerate workflows from KCL [skip ci] 2026-03-16 08:25:28 +00:00
renovate-bot 57e6f085ef Merge pull request 'Update dependency kcl-ci to v1.43.3' (#55) from renovate/kcl-ci-1.x into main 2026-03-16 08:25:22 +00:00
Renovate Bot 61378aa2d1 Update dependency kcl-ci to v1.43.3 2026-03-16 10:25:21 +02:00
claude[bot]andClaude Sonnet 4.6 ec394266fc chore: merge 7 upstream commits from anthropics/claude-code-action
Conflicts resolved:
- docs/usage.md: kept fork's `platform` row, added upstream's new
  `classify_inline_comments` row, updated `allowed_bots` description
  with upstream's security warning
- src/create-prompt/index.ts: kept fork's DISALLOWED_TOOLS export
  (consumed by run.ts) vs upstream's dead-code comment
- src/modes/tag/index.ts: merged both fork's userAllowedTools and
  upstream's gitPushWrapper variable (both needed by shared code)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 08:22:39 +00:00
Vlad Mocanu 82785e2223 fix: add guardrail to upstream-sync prompt to prevent early stop
Claude was resolving merge conflicts but stopping before running tests,
committing, pushing, or creating the PR. Add explicit instruction that
the job is not done until the branch is pushed and PR is created.
2026-03-16 10:16:45 +02:00
forgejo-actions[bot] d52220657c chore: regenerate workflows from KCL [skip ci] 2026-03-16 06:25:30 +00:00
renovate-bot 55c888afba Merge pull request 'Update dependency kcl-ci to v1.43.2' (#52) from renovate/kcl-ci-1.x into main 2026-03-16 06:25:24 +00:00
Renovate Bot 5ad834076c Update dependency kcl-ci to v1.43.2 2026-03-16 08:25:23 +02:00
GitHub Actions cd77b50d2b chore: bump Claude Code to 2.1.76 and Agent SDK to 0.2.76 2026-03-14 01:29:31 +00:00
GitHub Actions 0e80d3c5b8 chore: bump Claude Code to 2.1.75 and Agent SDK to 0.2.75 2026-03-13 17:07:33 +00:00
kashyap murali f956510b1a Harden tag mode tool permissions against prompt injection (#1002)
Two defenses for tag mode where an attacker with repo write access could
craft a prompt injection payload in an issue/PR to gain RCE on the
Actions runner:

1. git-push wrapper (H1 #3556799)
   The Bash(git\ push:*) rule permitted arbitrary flags and remotes,
   including combinations that execute shell commands locally. Replaced
   with scripts/git-push.sh which allowlists exactly 'origin <ref>' with
   no flags, validates the ref via check-ref-format. Same pattern as
   scripts/gh.sh.

2. acceptEdits instead of blanket Write/Edit (Asana 1213310082312048)
   Edit/MultiEdit/Write in allowedTools granted write access to the
   whole runner filesystem (~/.bashrc etc). Removed from allowedTools
   and set --permission-mode acceptEdits, which auto-accepts edits
   inside cwd ($GITHUB_WORKSPACE) and denies outside. Headless SDK has
   no prompt handler so 'ask' becomes deny.

Also:
- Noted that create-prompt/index.ts exports ALLOWED_TOOLS env var that
  nothing reads. The live path is modes/tag/index.ts. Mirrored the fix
  in both so the file the H1 report likely points to stays in sync.
- Updated prompt text (3 callsites) to reference the wrapper.
- Updated tests (4 prompt-content asserts, 7 tool-list asserts).
2026-03-12 13:35:17 -07:00
kashyap murali 5d0cc745cd feat(inline-comment): add confirmed param + probe-pattern safety net (#1048)
* feat(inline-comment): add confirmed param + probe-pattern safety net

Subagents that inherit this tool sometimes probe it with test comments
('Test comment to see if I can create inline comments') after hitting
unrelated errors elsewhere. Recurring issue across customer PRs.

Adds two defenses:
1. confirmed param: set true to post (final review comments should pass
   this). When false, buffers to a JSONL file instead of posting.
2. Probe-pattern safety net: when confirmed is omitted (backward compat
   for existing prompts), the body is checked against obvious probe
   patterns ('test comment', 'can i', 'does this work', etc.). Matching
   calls are buffered instead of posted.

A post-run step in action.yml reports the buffered call count and bodies
as a workflow warning for diagnostics.

Backward compatibility:
- Existing single-agent prompts (no confirmed param) post normally unless
  the body happens to start with a probe phrase (unlikely for real
  review comments)
- The code-review skill is being updated to pass confirmed: true in its
  final posting step
- Subagent probes that would previously post now harmlessly buffer

* refactor: replace probe-regex with Haiku classification in post-step

The regex approach was narrow and could miss creative probe phrasings.
Replaced with a batch Haiku classification that runs after the session
completes.

Flow:
- MCP server: confirmed !== true -> buffer to JSONL (no classification
  in-band, no latency in the tool path)
- Post-step (src/entrypoints/post-buffered-inline-comments.ts): reads
  buffer, sends all bodies to a single Haiku call, posts only those
  classified as real review comments
- confirmed=false entries are never posted regardless of classification

Fail-open: if ANTHROPIC_API_KEY is unavailable (Bedrock/Vertex users)
or the classification call fails, posts all unconfirmed comments. This
matches pre-PR behavior where all calls posted immediately.

The post-step emits ::warning:: for each filtered comment so users can
see what was dropped and why.

* feat: add classify_inline_comments opt-out input

New action input classify_inline_comments (default 'true'). Setting to
'false' restores pre-buffering behavior: all inline comment calls post
immediately regardless of the confirmed param.

Threads through: action input -> CLASSIFY_INLINE_COMMENTS env ->
context.inputs.classifyInlineComments -> MCP server env ->
CLASSIFY_ENABLED module const.

Post-step is also gated on the input so it skips entirely when
classification is disabled.

* docs: document classify_inline_comments input and confirmed param

- usage.md: add classify_inline_comments to inputs table
- solutions.md: mention confirmed=true in the prompt example and explain
  buffering/classification in the tool permissions section
2026-03-12 00:12:55 -07:00
GitHub Actions 567be3da98 chore: bump Claude Code to 2.1.73 and Agent SDK to 0.2.73 2026-03-11 18:33:26 +00:00
Vlad Mocanu 83af4b27a6 Merge pull request 'chore: merge 1 upstream commits from anthropics/claude-code-action' (#50) from chore/upstream-sync-20260309 into main
Reviewed-on: https://git.wxs.ro/actions/claude-code-action/pulls/50
2026-03-11 06:20:16 +00:00
GitHub Actions eb99fb38f0 chore: bump Claude Code to 2.1.72 and Agent SDK to 0.2.72 2026-03-10 00:49:35 +00:00
Vlad Mocanu dfeb5ef7c0 chore: regenerate workflows from KCL [skip ci] 2026-03-09 22:12:17 +02:00
dustin 33fbb80626 docs: warn that allowed_bots can expose the action to external triggers (#1039)
allowed_bots does not verify that a matching bot is installed on the
repository or has write access. On a public repo, external GitHub Apps
may be able to trigger workflow events (issues, comments, PR reviews).
If the workflow listens on those events and allowed_bots is '*', an
external App can invoke this action with a prompt it controls.

Default config (allowed_bots: "") is unaffected.

- docs/security.md: add warning and mitigation guidance
- docs/usage.md: add inline warning to the allowed_bots input row
- action.yml: add warning to the allowed_bots input description

🏠 Remote-Dev: homespace
2026-03-09 13:04:11 -07:00
renovate-bot beb62b34fd Merge pull request 'Update dependency kcl-ci to v1.43.0' (#51) from renovate/kcl-ci-1.x into main 2026-03-09 16:25:20 +00:00
Renovate Bot 38f7294fba Update dependency kcl-ci to v1.43.0 2026-03-09 18:25:19 +02:00
claude 12e1f33ef5 Merge remote-tracking branch 'upstream/main' into chore/upstream-sync-20260309 2026-03-09 08:00:20 +00:00
GitHub Actions 3428ca8991 chore: bump Claude Code to 2.1.71 and Agent SDK to 0.2.71 2026-03-07 00:11:30 +00:00
Vlad Mocanu 29d8a00b51 Merge pull request 'chore: merge 1 upstream commits from anthropics/claude-code-action' (#48) from chore/upstream-sync-20260306 into main
Reviewed-on: https://git.wxs.ro/actions/claude-code-action/pulls/48
2026-03-06 20:34:02 +00:00
claude 4885138cff Merge remote-tracking branch 'upstream/main' into chore/upstream-sync-20260306 2026-03-06 20:31:30 +00:00
GitHub Actions 26ec041249 chore: bump Claude Code to 2.1.70 and Agent SDK to 0.2.70 2026-03-06 01:18:43 +00:00
Vlad Mocanu 15ae31cd2f Merge pull request 'chore: merge 5 upstream commits from anthropics/claude-code-action' (#46) from chore/upstream-sync-20260305 into main
Reviewed-on: https://git.wxs.ro/actions/claude-code-action/pulls/46
2026-03-05 12:35:16 +00:00
claude 62f23790cb Merge remote-tracking branch 'upstream/main' into chore/upstream-sync-20260305 2026-03-05 12:30:25 +00:00
GitHub Actions 1fc90f3ed9 chore: bump Claude Code to 2.1.69 and Agent SDK to 0.2.69 2026-03-05 00:24:53 +00:00
forgejo-actions[bot] f257619d18 chore: regenerate workflows from KCL [skip ci] 2026-03-04 16:25:24 +00:00
renovate-bot 602d79f9f5 Merge pull request 'Update dependency kcl-ci to v1.42.0' (#44) from renovate/kcl-ci-1.x into main 2026-03-04 16:25:20 +00:00
Renovate Bot da5b998949 Update dependency kcl-ci to v1.42.0 2026-03-04 18:25:19 +02:00
GitHub Actions e763fe78de chore: bump Claude Code to 2.1.68 and Agent SDK to 0.2.68 2026-03-04 10:09:58 +00:00
GitHub Actions 5f8e5bfe5b chore: bump Claude Code to 2.1.66 and Agent SDK to 0.2.66 2026-03-04 01:17:58 +00:00
Vlad Mocanu 7f4c72d944 Merge pull request 'chore: merge 1 upstream commits from anthropics/claude-code-action' (#42) from chore/upstream-sync-20260302 into main
Reviewed-on: https://git.wxs.ro/actions/claude-code-action/pulls/42
2026-03-03 20:55:21 +00:00
forgejo-actions[bot] f8bb3fb562 chore: regenerate workflows from KCL [skip ci] 2026-03-02 18:25:23 +00:00
renovate-bot d81019d077 Merge pull request 'Update dependency kcl-ci to v1.41.1' (#43) from renovate/kcl-ci-1.x into main 2026-03-02 18:25:19 +00:00
Renovate Bot 1073da9bb3 Update dependency kcl-ci to v1.41.1 2026-03-02 20:25:18 +02:00
Octavian Guzu 73367208d0 Improve gh.sh wrapper: stricter validation and better error messages (#996)
- Use allowlist for issue view (numeric issue numbers only)
- Enforce zero positional args for issue list / label list
- Pin GH_HOST and GH_REPO explicitly to avoid ambient state
- Add descriptive error messages with usage examples
2026-03-02 16:38:23 +00:00
David Dworken 64c7a0ef71 Only expose permission_denials count in sanitized output (#993) 2026-03-02 09:21:16 +00:00
claude 64d7a57170 Merge remote-tracking branch 'upstream/main' into chore/upstream-sync-20260302 2026-03-02 08:00:20 +00:00
David Dworkenandclaude[bot] 220272d388 Change the default display_report option to false to restrict exposed data (#992)
* Change the default `display_report` option to false to restrict exposed data

* Update action.yml

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-03-01 21:57:53 -08:00
Vlad Mocanu 2f9e75cbf5 Merge pull request 'chore: merge 1 upstream commits from anthropics/claude-code-action' (#40) from chore/upstream-sync-20260228 into main
Reviewed-on: https://git.wxs.ro/actions/claude-code-action/pulls/40
2026-02-28 07:13:16 +00:00
Vlad Mocanu 66654a1a19 docs: document Alpine/musl CLI install fallback 2026-02-28 09:11:41 +02:00
claude c160cc3ded Merge remote-tracking branch 'upstream/main' into chore/upstream-sync-20260228 2026-02-28 07:09:23 +00:00
Vlad Mocanu b8cb56d204 fix: use npm install for Claude Code CLI on musl/Alpine systems
The native binary (install.sh) requires posix_getdents which is only
available in Alpine edge (musl 1.2.5-r21+), not in any stable Alpine
release. Detect musl upfront via ldd and skip straight to npm install,
avoiding 15+ seconds of wasted retries on deterministic failures.

On glibc systems the native install path is unchanged with npm as a
fallback if it fails.
2026-02-28 09:08:26 +02:00
GitHub Actions ba7fa4bcf0 chore: bump Claude Code to 2.1.63 and Agent SDK to 0.2.63 2026-02-28 03:51:01 +00:00