Skip to content

Add SRE workflow for automated issue investigation#3236

Draft
x3c41a wants to merge 3 commits into
masterfrom
add-sre-workflow
Draft

Add SRE workflow for automated issue investigation#3236
x3c41a wants to merge 3 commits into
masterfrom
add-sre-workflow

Conversation

@x3c41a
Copy link
Copy Markdown
Contributor

@x3c41a x3c41a commented Feb 20, 2026

Adds a Claude SRE workflow that triggers on issues labeled claude or @claude comments. Claude can read the repo, query Grafana metrics, and open PRs with fixes.

Required secrets

  • ANTHROPIC_API_KEY
  • GRAFANA_URL / GRAFANA_TOKEN (optional, for live metric queries)

🤖 Generated with Claude Code

Adds a GitHub Actions workflow that triggers on issues labeled for
automated investigation. Integrates with Grafana API for live metric
queries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@x3c41a x3c41a requested a review from a team as a code owner February 20, 2026 07:50
@cla-bot-2021
Copy link
Copy Markdown

cla-bot-2021 Bot commented Feb 20, 2026

User @claude, please sign the CLA here.

x3c41a and others added 2 commits February 23, 2026 13:06
Add write permissions and checkout step so Claude can create
branches and open pull requests to fix issues, not just comment.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@x3c41a x3c41a marked this pull request as draft February 26, 2026 14:23
@MN0B
Copy link
Copy Markdown

MN0B commented Mar 3, 2026

   ______
    /           \
   /  STOP  \
  |   (AI)      |
   \             /
    \______/
       ||
       ||

(TL;DR - please don't merge this before resolving my runner security worries !!)

I'm concerned by the lack of a boundary between untrusted text and the agent here.

Let me check I understand:

PR takes external data from GH Issues/Comments -> GH action runner -> Claude API

What prevents an indirect prompt injection from a malicious user opening an issue? - this could include hidden instructions in the issue body telling the agent to ignore its system prompt and exfiltrate data.

On the Claude side - what APIs are you using, where are the tokens stored, and what are the exact permissions granted to the GITHUB_TOKEN running this action?

Have you used least privilege, granular as possible, read-only by default (e.g., contents: read, issues: write)?

Finally, how are we ensuring Claude only comments and doesn't attempt to execute bash commands locally on the runner to "investigate"?

Comment on lines +15 to +16
(github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'claude')) ||
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude'))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any user can create an issue and invoke claude. Are you sure that this is planned behaviour?

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.

3 participants