-
Notifications
You must be signed in to change notification settings - Fork 255
fix: allow claude to have write permission #3202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,9 +19,9 @@ jobs: | |
| (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| issues: read | ||
| contents: write | ||
| pull-requests: write | ||
| issues: write | ||
|
Comment on lines
+22
to
+24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "1) Inspect trigger + permission surface in claude workflow"
nl -ba .github/workflows/claude.yml | sed -n '1,90p'
echo
echo "2) Check for explicit trust gating signals"
rg -n 'author_association|github\.actor|OWNER|MEMBER|COLLABORATOR' .github/workflows/claude.yml || true
echo
echo "3) Compare with read-only baseline workflow using same action"
nl -ba .github/workflows/claude-code-review.yml | sed -n '30,70p'Repository: evstack/ev-node Length of output: 177 🏁 Script executed: #!/bin/bash
echo "1) Inspect trigger + permission surface in claude workflow (lines 1-90)"
cat -n .github/workflows/claude.yml | head -90
echo ""
echo "2) Check for explicit trust gating signals"
rg -n 'author_association|github\.actor|OWNER|MEMBER|COLLABORATOR' .github/workflows/claude.yml || echo "No trust gating found"
echo ""
echo "3) Compare with read-only baseline workflow (lines 30-70)"
if [ -f .github/workflows/claude-code-review.yml ]; then
cat -n .github/workflows/claude-code-review.yml | sed -n '30,70p'
else
echo "claude-code-review.yml not found"
fi
echo ""
echo "4) Get file stats to understand size"
wc -l .github/workflows/claude.ymlRepository: evstack/ev-node Length of output: 5538 🏁 Script executed: #!/bin/bash
echo "Searching for permissions in claude-code-review.yml"
grep -n "permissions:" .github/workflows/claude-code-review.yml -A 10
echo ""
echo "Full workflow file size:"
wc -l .github/workflows/claude-code-review.ymlRepository: evstack/ev-node Length of output: 441 Limit
Add an Suggested hardening jobs:
claude:
if: |
+ contains(fromJson('["OWNER","MEMBER","COLLABORATOR"]'),
+ github.event.comment.author_association || github.event.review.author_association || github.event.issue.author_association) &&
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
- contents: write
- pull-requests: write
- issues: write
+ contents: read
+ pull-requests: read
+ issues: read
id-token: write
actions: read🤖 Prompt for AI Agents |
||
| id-token: write | ||
| actions: read # Required for Claude to read CI results on PRs | ||
| steps: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can someone trick claude to override prs then?