-
Notifications
You must be signed in to change notification settings - Fork 3
workflow #60
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
workflow #60
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: AI On-Demand Assistant | ||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
| pull_request_review_comment: | ||
| types: [created] | ||
| pull_request_review: | ||
| types: [submitted] | ||
| issues: | ||
| types: [opened] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
| pull-requests: write | ||
| actions: read | ||
|
|
||
| jobs: | ||
| ai-response: | ||
| uses: ethereumfollowprotocol/workflow-automation/.github/workflows/issue-response.yml@v1.0.9 | ||
| with: | ||
| config-profile: "default" | ||
| bot-mention: "@efp-dev-ops" | ||
| enable-auto-labeling: true | ||
| enable-escalation: true | ||
| secrets: | ||
| CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.DEV_OPS_BOT_CLAUDE_CODE_OAUTH_TOKEN }} | ||
| APP_ID: ${{ secrets.DEV_OPS_BOT_APP_ID }} | ||
| PRIVATE_KEY: ${{ secrets.DEV_OPS_BOT_PRIVATE_KEY }} | ||
| ALLOWED_USER_LIST: ${{ secrets.DEV_OPS_BOT_ALLOWED_USER_LIST }} | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,21 @@ | ||||||||||||||
| name: AI Code Review | ||||||||||||||
| on: | ||||||||||||||
| pull_request: | ||||||||||||||
| types: [opened, synchronize, reopened] | ||||||||||||||
|
|
||||||||||||||
|
Comment on lines
+2
to
+5
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. 💡 Verification agent 🧩 Analysis chainPRs from forks won’t have access to secrets; guard or switch event. Either gate the job to skip forks, or carefully switch to pull_request_target (with safe checkout in the called workflow). Option A — gate forks: jobs:
ai-review:
+ if: ${{ github.event.pull_request.head.repo.fork == false }}Option B — use pull_request_target: -on:
- pull_request:
- types: [opened, synchronize, reopened]
+on:
+ pull_request_target:
+ types: [opened, synchronize, reopened]Confirm the reusable workflow safely checks out the base ref to avoid running untrusted code. 🏁 Script executed: #!/bin/bash
set -e
file=".github/workflows/ai-review.yml"
if [ -f "$file" ]; then
echo "=== First 200 lines of $file ==="
sed -n '1,200p' "$file"
echo
echo "=== Secret usage in $file ==="
grep -n "secrets\." "$file" || echo "No secrets usage found"
else
echo "File not found: $file"
exit 1
fiLength of output: 1314 Gate forks or switch to pull_request_target for secret access jobs:
ai-review:
+ if: ${{ github.event.pull_request.head.repo.fork == false }}or switch the trigger to -on:
- pull_request:
- types: [opened, synchronize, reopened]
+on:
+ pull_request_target:
+ types: [opened, synchronize, reopened]📝 Committable suggestion
Suggested change
|
||||||||||||||
| permissions: | ||||||||||||||
| contents: read | ||||||||||||||
| pull-requests: write | ||||||||||||||
| issues: write | ||||||||||||||
| actions: read | ||||||||||||||
|
|
||||||||||||||
| jobs: | ||||||||||||||
| ai-review: | ||||||||||||||
| uses: ethereumfollowprotocol/workflow-automation/.github/workflows/pr-review.yml@v1.0.9 | ||||||||||||||
| with: | ||||||||||||||
| config-profile: "default" | ||||||||||||||
| secrets: | ||||||||||||||
| CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.DEV_OPS_BOT_CLAUDE_CODE_OAUTH_TOKEN }} | ||||||||||||||
| APP_ID: ${{ secrets.DEV_OPS_BOT_APP_ID }} | ||||||||||||||
| PRIVATE_KEY: ${{ secrets.DEV_OPS_BOT_PRIVATE_KEY }} | ||||||||||||||
| ALLOWED_USER_LIST: ${{ secrets.DEV_OPS_BOT_ALLOWED_USER_LIST }} | ||||||||||||||
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.
🛠️ Refactor suggestion
Pin reusable workflow to a commit SHA to prevent tag hijack.
🤖 Prompt for AI Agents