Skip to content

Restrict Claude Step Summary output to debug runs#24

Merged
danielorbach merged 2 commits intomainfrom
fix-claudependabot-output
Mar 17, 2026
Merged

Restrict Claude Step Summary output to debug runs#24
danielorbach merged 2 commits intomainfrom
fix-claudependabot-output

Conversation

@danielorbach
Copy link
Copy Markdown
Collaborator

PR #22 unconditionally enabled display_report on the Claude review steps so the workflow summary would always render Claude's analysis. This is verbose for routine Dependabot runs and, per the upstream warning on the input, should be reserved for trusted-input contexts.

The Step Summary is now gated on runner.debug, making it available when a workflow is re-run with debug logging enabled but silent otherwise. The workflow header also gains a comment explaining why the prompt injection threat model that motivated upstream's default-off change does not apply here: the review job's actor gate restricts execution to the dependabot[bot] actor, a trusted first-party automation source.

Relates to #6

display_report renders Claude's analysis in the GitHub Step Summary.
Unconditionally enabling it is verbose for routine runs and, per the
upstream warning, should only be used with trusted input.

Gate on runner.debug so the report is still available when re-running
with debug logging enabled.

display_report (not show_full_output) is the correct input here:
show_full_output dumps the full JSON execution log including tool
results that may contain secrets; display_report only renders Claude's
authored summary, which is safe for this workflow's trusted-input
context.
The actor gate on the review job restricts Claude steps to the
dependabot[bot] actor, mitigating the primary prompt injection vector
(attacker-authored PR/issue content reaching the Claude prompt or Step
Summary). Note that Claude may still fetch external content such as
changelogs during analysis; the actor gate addresses the direct input
surface.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The PR modifies the GitHub Actions workflow to add a prompt-injection mitigation comment and makes the display_report setting conditional on runner debug mode instead of always enabled. This affects how the Claude review reports are displayed in both minor and major update jobs.

Changes

Cohort / File(s) Summary
Workflow Configuration
.github/workflows/claudependabot.yml
Added prompt-injection mitigation comment block. Changed display_report from true to ${{ runner.debug == '1' }} in both minor and major update review jobs to conditionally enable report display based on debug mode.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

Suggested reviewers

  • galactic-king

Poem

🐰 A workflow refined, with guards in place,
Reports now dance at debug's pace—
Security whispers, conditions flow free,
Safer automation, as it should be! 🛡️✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Restrict Claude Step Summary output to debug runs' directly summarizes the main change: gating the Step Summary display on debug mode rather than unconditionally enabling it.
Description check ✅ Passed The description explains the rationale behind the change, references the related PR #22 and issue #6, and provides context about security considerations and trusted execution contexts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-claudependabot-output
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@galactic-king galactic-king left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielorbach danielorbach merged commit 077ecbb into main Mar 17, 2026
11 of 12 checks passed
@danielorbach danielorbach deleted the fix-claudependabot-output branch March 17, 2026 18:57
@danielorbach danielorbach self-assigned this Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants