495 Commits

Author SHA1 Message Date
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 :⚠️: 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
v1.0.71
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
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
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
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
GitHub Actions
26ec041249 chore: bump Claude Code to 2.1.70 and Agent SDK to 0.2.70 v1.0.70 2026-03-06 01:18:43 +00:00
GitHub Actions
1fc90f3ed9 chore: bump Claude Code to 2.1.69 and Agent SDK to 0.2.69 v1.0.69 2026-03-05 00:24:53 +00:00
GitHub Actions
e763fe78de chore: bump Claude Code to 2.1.68 and Agent SDK to 0.2.68 v1.0.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 v1.0.67 2026-03-04 01:17:58 +00: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) v1.0.66 2026-03-02 09:21:16 +00:00
David Dworken
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>
v1.0.65
2026-03-01 21:57:53 -08:00
GitHub Actions
ba7fa4bcf0 chore: bump Claude Code to 2.1.63 and Agent SDK to 0.2.63 v1.0.64 2026-02-28 03:51:01 +00:00
GitHub Actions
1dd74842e5 chore: bump Claude Code to 2.1.61 and Agent SDK to 0.2.61 v1.0.63 2026-02-26 22:39:58 +00:00
GitHub Actions
273fe82540 chore: bump Claude Code to 2.1.59 and Agent SDK to 0.2.59 v1.0.62 2026-02-26 01:05:07 +00:00
Octavian Guzu
e750645f1b
Add gh.sh wrapper for gh CLI commands in workflows (#975) 2026-02-25 20:42:29 +00:00
GitHub Actions
cd4b150a2a chore: bump Claude Code to 2.1.58 and Agent SDK to 0.2.58 v1.0.61 2026-02-25 20:04:44 +00:00
GitHub Actions
ade221fd1c chore: bump Claude Code to 2.1.56 and Agent SDK to 0.2.56 v1.0.60 2026-02-25 06:37:46 +00:00
GitHub Actions
48fe7dd592 chore: bump Claude Code to 2.1.55 and Agent SDK to 0.2.55 v1.0.59 2026-02-25 03:21:10 +00:00
GitHub Actions
6ae1b29ba2 chore: bump Claude Code to 2.1.53 and Agent SDK to 0.2.53 v1.0.58 2026-02-25 00:18:46 +00:00
Octavian Guzu
7af3506741
Add non-write users check workflow (#973) 2026-02-24 19:47:33 +00:00
GitHub Actions
35a9e0292d chore: bump Claude Code to 2.1.52 and Agent SDK to 0.2.52 v1.0.57 2026-02-24 06:44:55 +00:00
GitHub Actions
fa3312a107 chore: bump Claude Code to 2.1.51 and Agent SDK to 0.2.51 v1.0.56 2026-02-24 01:47:14 +00:00
Octavian Guzu
dd8541688d
Use wrapper script for label operations in issue triage (#968)
* Use wrapper script for label operations in issue triage

Updates /label-issue command and examples to use a dedicated
edit-issue-labels.sh script for label operations instead of raw
gh issue edit. The script validates labels against the repo's existing
labels before applying them. Also tightens gh search permission to
gh search issues.

* Show multiple --add-label flags in label-issue example
2026-02-23 17:16:07 +00:00
GitHub Actions
edd85d6153 chore: bump Claude Code to 2.1.49 and Agent SDK to 0.2.49 v1.0.55 2026-02-19 23:33:09 +00:00
GitHub Actions
0cf5eeec4f chore: bump Claude Code to 2.1.47 and Agent SDK to 0.2.47 v1.0.54 2026-02-18 21:44:15 +00:00
GitHub Actions
e6cb7a7ce3 chore: bump Claude Code to 2.1.45 and Agent SDK to 0.2.45 2026-02-17 18:58:59 +00:00
GitHub Actions
2f8ba26a21 chore: bump Claude Code to 2.1.44 and Agent SDK to 0.2.44 v1.0.53 2026-02-16 21:40:14 +00:00
Ashwin Bhat
cc5ef44546
feat: add display_report option to disable step summary (#952)
Add a `display_report` input parameter (default: "true") that controls
whether the Claude Code Report is written to the GitHub Step Summary.
Setting it to "false" allows users with custom formatting solutions to
avoid duplicate output in the step summary.

Closes #206

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Ashwin Bhat <ashwin-ant@users.noreply.github.com>
2026-02-15 15:49:49 -08:00
Ashwin Bhat
f6a1c4c1b4
fix: grant write permissions and use @main in claude workflow (#950)
Give the workflow contents/pull-requests/issues write permissions so
the OIDC app token can push. Also point to @main instead of @v1.
2026-02-15 15:13:59 -08:00
Ashwin Bhat
68cfeead18
Revert "fix: replace deprecated :* with modern * wildcard in git permissions (#929)" (#949)
This reverts commit 1bb0e7464b934392210ba86f06bec55297259d82.
v1.0.52
2026-02-15 14:39:25 -08:00
Ashwin Bhat
f5088835af
Fix stale claudeCodeVersion in run.ts and update bump automation (#943) 2026-02-13 15:12:56 -08:00
GitHub Actions
ea36d6abde chore: bump Claude Code to 2.1.42 and Agent SDK to 0.2.42 v1.0.51 2026-02-13 19:55:13 +00:00
Ashwin Bhat
c22f7c3f9d
revert: undo PR checkout fork support and unique branch naming (#937)
Reverts the following commits:
- f669191 fix: use unique local branch names for PR checkout to avoid conflicts (#931)
- 21e3fe0 Fix PR checkout to support fork PRs (#851)

Simplifies PR branch checkout back to using headRefName directly instead
of the pr-{number} local branch naming scheme introduced in #931 and the
GitHub pull ref fetch approach introduced in #851.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
v1.0.50
2026-02-12 09:45:01 -08:00
Yi-Cheng Wang
f669191d7d
fix: use unique local branch names for PR checkout to avoid conflicts (#931)
The previous implementation used the PR's original branch name when
fetching, which could conflict with existing local or remote branches
of the same name. This caused checkout failures for PRs with common
branch names like 'main' or 'feature/xyz'.

Changes:
- Use 'pr-{number}' format for local branch names (e.g., pr-385)
- Preserve original branch name for logging purposes
- Add detailed logging showing original -> local branch mapping

This ensures uniqueness since PR numbers are unique per repository,
while maintaining support for both same-repo and fork PRs via
GitHub's pull/{number}/head refs.

Fixes the issue introduced in #851 where fork PR support was added.

Co-authored-by: Yi-Cheng Wang <yicheng.wang@heph-ai.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
v1.0.49
2026-02-11 19:30:25 -08:00
Octavian Guzu
8c383c5de3
fix: skip CI MCP server installation when actions:read permission is missing (#933) 2026-02-11 11:02:49 -08:00
Dave-London
1bb0e7464b
fix: replace deprecated :* with modern * wildcard in git permissions (#929)
Replace `Bash(git add:*)` syntax with `Bash(git add *)` in default
tool permissions for tag mode and create-prompt. The colon-prefixed
wildcard syntax is deprecated and causes SDK validation errors.

Closes #856

Co-authored-by: Dave-London <hello@os4us.org>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 21:26:10 -08:00
GitHub Actions
23ed4cb53d chore: bump Claude Code to 2.1.39 and Agent SDK to 0.2.39 v1.0.48 2026-02-10 23:10:22 +00:00
Sol Redfern
21e3fe0542
Fix PR checkout to support fork PRs (#851)
Use GitHub's PR refs (pull/NUMBER/head) instead of fetching branch
by name. This works for both same-repo and fork PRs because GitHub
automatically creates these refs in the base repository for all PRs.

The branch name doesn't exist on origin for fork PRs, causing:
  fatal: couldn't find remote ref <branch-name>

Using pull/${entityNumber}/head:${branchName} fetches the PR head
and creates a local branch with the correct name.

Fixes issues with tag mode failing on fork PRs.
2026-02-10 08:52:32 -08:00
GitHub Actions
b433f16b30 chore: bump Claude Code to 2.1.38 and Agent SDK to 0.2.38 v1.0.47 2026-02-10 00:52:13 +00:00
Dave-London
7695f7866a
fix: skip dev dependencies in CI install step (#919)
Use `bun install --production` instead of `bun install` in both
action.yml and base-action/action.yml to skip installing devDependencies
(@types/*, prettier, typescript) that are not needed at runtime.

Bun runs TypeScript natively without needing the typescript compiler
or type definition packages. This reduces installed packages from 151
to 135 and speeds up the install step.

Fixes #895

Co-authored-by: Dave-London <hello@os4us.org>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:09:41 -08:00
Ashwin Bhat
d5b01b6843
Update claude-opus-4-5 to claude-opus-4-6 in workflow (#909)
* Update claude-opus-4-5 to claude-opus-4-6 in workflow

* Fix whitespace formatting in docs and commands

* Fix whitespace formatting in docs and commands

* Add claude-opus-4-6 model to PR review workflow

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-07 14:18:08 -08:00
GitHub Actions
6c61301d8e chore: bump Claude Code to 2.1.37 and Agent SDK to 0.2.37 v1.0.46 2026-02-07 19:08:42 +00:00
GitHub Actions
db388438c1 chore: bump Claude Code to 2.1.36 and Agent SDK to 0.2.36 2026-02-07 18:00:59 +00:00
GitHub Actions
b113f49a56 chore: bump Claude Code to 2.1.33 and Agent SDK to 0.2.33 v1.0.45 2026-02-06 01:46:07 +00:00
Ashwin Bhat
7057f3318b
refactor: simplify mode system by removing Mode interface and registry (#899)
Replace the over-engineered Mode interface/registry/detector pattern with
straightforward inline logic. There are only 2 modes (tag and agent) and
the complexity wasn't justified.

- Delete Mode interface, registry, and prepare pass-through modules
- Export prepareTagMode() and prepareAgentMode() as standalone functions
- Inline trigger checking and mode dispatch in run.ts/prepare.ts
- Change generatePrompt/createPrompt to take modeName string instead of Mode
- Remove dead code (extractGitHubContext, unused detector helpers)
- Update CLAUDE.md to reflect new architecture
2026-02-05 17:22:30 -08:00
David Dworken
f09dc9a6a3
fix: use original body from webhook payload for TOCTOU hardening (#904)
* fix: use original body from webhook payload for TOCTOU hardening

* test: add null originalBody + edited GraphQL body TOCTOU scenario
2026-02-05 10:54:51 -08:00
GitHub Actions
006aaf2935 chore: bump Claude Code to 2.1.32 and Agent SDK to 0.2.32 v1.0.44 2026-02-05 17:46:38 +00:00
Ashwin Bhat
9a3c761f54
refactor: unify action into single composite step with run.ts entrypoint (#898)
* refactor: unify action into single composite step with run.ts entrypoint

Consolidate the prepare and base-action phases into a single composite
step that runs src/entrypoints/run.ts. This simplifies the action.yml
from multiple steps to one execution step, while keeping the same
behavior.

Key changes:
- Add src/entrypoints/run.ts as unified entrypoint
- Simplify action.yml to single 'Run Claude Code Action' step
- Pass all inputs via environment variables
- Update base-action to accept inputs via env vars
- Support agent mode auto-detection from prompt input

* refactor: keep SSH signing cleanup and token revocation as separate action steps

Move SSH signing key cleanup and app token revocation back to separate
composite action steps in action.yml with always() conditions, rather
than handling them inside run.ts. This keeps these cleanup concerns
as independently visible steps in the workflow.

* fix: address PR review feedback

- Use path.dirname() instead of manual string slicing for executable path
- Differentiate prepare vs execution errors in catch block so tracking
  comment accurately reflects which phase failed
- Update CLAUDE.md architecture docs to reflect unified run.ts entrypoint
  and four-phase design

* fix: address PR review feedback

- Use path.dirname() instead of manual string slicing for executable path
- Differentiate prepare vs execution errors in catch block so tracking
  comment accurately reflects which phase failed
- Rewrite CLAUDE.md to focus on mental model, key concepts, and gotchas
  instead of exhaustive file listings
2026-02-03 20:09:43 -08:00
GitHub Actions
6867bb3ab0 chore: bump Claude Code to 2.1.31 and Agent SDK to 0.2.31 v1.0.43 2026-02-04 00:42:58 +00:00