Repository navigation
ci: run the AI review from Kong/volcano-actions #393
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e833c30
ci: add the Claude review from Kong/volcano-actions
swkeever be3f683
ci: pass the OpenAI key to the combined review
swkeever ba0e27e
ci: rename the review stubs to ai-review
swkeever 7dfc797
ci(review): run Codex with the ChatGPT access token
swkeever File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: AI Review (approvals) | ||
|
|
||
| on: | ||
| pull_request_review: | ||
| types: [submitted, dismissed] | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| # A review runs the PR's own copy of this workflow, so it only finishes; | ||
| # AI Review (human gate) then runs from the default branch. | ||
| reviewed: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| steps: | ||
| - run: echo "AI Review (human gate) re-sets ai-review/human." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| name: AI Review (human gate) | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: [AI Review (approvals)] | ||
| types: [completed] | ||
| pull_request_target: | ||
| branches: [main] | ||
| types: [labeled, unlabeled] | ||
|
aikido-autofix[bot] marked this conversation as resolved.
|
||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| human-gate: | ||
| if: github.event_name == 'workflow_run' || github.event.label.name == 'needs-human-review' | ||
| uses: Kong/volcano-actions/.github/workflows/ai-review-human.yml@main | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| statuses: write | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| name: AI Review (merge queue) | ||
|
|
||
| on: | ||
| merge_group: | ||
| branches: [main] | ||
| types: [checks_requested] | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| pass: | ||
| uses: Kong/volcano-actions/.github/workflows/ai-review-merge-queue.yml@main | ||
|
|
||
| permissions: | ||
| statuses: write | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| name: AI Review (retarget and override) | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| branches: [main] | ||
| types: [edited, labeled] | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| retarget-or-override: | ||
| if: github.event.changes.base || github.event.label.name == 'ai-review-override' | ||
| uses: Kong/volcano-actions/.github/workflows/ai-review.yml@main | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| statuses: write | ||
| secrets: | ||
| anthropic_api_key: ${{ secrets.ANTHROPIC_CI_API_KEY }} | ||
| openai_api_key: ${{ secrets.OPENAI_CI_API_KEY }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: AI Review | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| branches: [main] | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| ai-review: | ||
| uses: Kong/volcano-actions/.github/workflows/ai-review.yml@main | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| statuses: write | ||
| secrets: | ||
| anthropic_api_key: ${{ secrets.ANTHROPIC_CI_API_KEY }} | ||
| openai_api_key: ${{ secrets.OPENAI_CI_API_KEY }} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Using unsafe GitHub Actions trigger may allow privilege escalation via CI/CD - medium severity
Using pull_request_target or workflow_run as a trigger is not recommended, as it may allow an attacker to elevate its privileges via the CI/CD pipeline by exfiltrating secrets (e.g. by reading out the caches of the GitHub Actions pipeline or listing loaded secrets in the environment). If the affected repository is open source, the attacker doesn't have to be an insider but could be any GitHub user.
Show fix
Reply
@AikidoSec ignore: [REASON]to ignore this issue.More info