-
Notifications
You must be signed in to change notification settings - Fork 3
[Shadow Audit] Phase 1 Foundation #95
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: pre-refactor-baseline
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 |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: GLM OpenCode Review | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - dev | ||
| - build-984-hardening | ||
|
|
||
| jobs: | ||
| review: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: GLM PR Review | ||
| uses: zhipuai/opencode-github-workflow@main | ||
|
Check warning on line 18 in .github/workflows/glm-review.yml
|
||
|
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. 🔴 HIGH RISK Pinning actions to a branch name like '@main' allows for unverified changes to be introduced into your CI/CD pipeline. Switch from branch tagging to SHA pinning for this action to ensure build immutability and protect against supply chain attacks. 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. P1: Pin the third-party action to an immutable commit SHA instead of Prompt for AI agents |
||
| continue-on-error: true | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GLM_API_KEY: ${{ secrets.GLM_API_KEY }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| name: opencode-review | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
|
|
||
| jobs: | ||
| review: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| id-token: write | ||
| contents: write | ||
|
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.
|
||
| pull-requests: write | ||
| issues: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: anomalyco/opencode/github@latest | ||
|
Check warning on line 19 in .github/workflows/opencode.yml
|
||
|
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.
|
||
| env: | ||
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| model: anthropic/claude-3-5-sonnet-latest | ||
| use_github_token: true | ||
| prompt: | | ||
| Review this pull request: | ||
| - Check for code quality issues | ||
| - Look for potential bugs | ||
| - Suggest improvements | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: CodiumAI PR-Agent | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| branches: | ||
| - main | ||
| - dev | ||
| - build-984-hardening | ||
| issue_comment: | ||
|
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. P1: Add event/actor guards for Prompt for AI agents |
||
| types: [created] | ||
|
|
||
| jobs: | ||
| review: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
| contents: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: CodiumAI PR-Agent | ||
| uses: The-PR-Agent/pr-agent@main | ||
|
Check warning on line 25 in .github/workflows/pr-agent.yml
|
||
|
Comment on lines
+19
to
+25
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. 🔴 HIGH RISK Reducing the 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. P1: Pin third-party GitHub Actions to an immutable commit SHA instead of a mutable branch ( Prompt for AI agents |
||
| continue-on-error: true | ||
| env: | ||
| OPENAI_KEY: ${{ secrets.OPENAI_KEY }} | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Qwen Code Review | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - dev | ||
| - build-984-hardening | ||
|
|
||
| jobs: | ||
| review: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Qwen PR Review | ||
| uses: QwenLM/qwen-code-issue-and-pr-automation@main | ||
|
Check warning on line 18 in .github/workflows/qwen-review.yml
|
||
|
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. 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. P1: Pin this third-party GitHub Action to an immutable commit SHA instead of Prompt for AI agents |
||
| continue-on-error: true | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| QWEN_TOKEN: ${{ secrets.QWEN_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| [pr_reviewer] | ||
| extra_instructions = """ | ||
| STRICT RULE: C# string literals must be ASCII-only. Flag any Unicode, emojis, or curly quotes. | ||
| STRICT RULE: The `lock(stateLock)` pattern is BANNED. Ensure all state mutations use the Enqueue/FSM model. | ||
| STRICT RULE: Verify that any order replacement uses the two-phase Replace FSM pattern. | ||
| """ | ||
|
|
||
| [pr_code_suggestions] | ||
| extra_instructions = """ | ||
| STRICT RULE: C# string literals must be ASCII-only. Flag any Unicode, emojis, or curly quotes. | ||
| STRICT RULE: The `lock(stateLock)` pattern is BANNED. Ensure all state mutations use the Enqueue/FSM model. | ||
| STRICT RULE: Verify that any order replacement uses the two-phase Replace FSM pattern. | ||
| """ |
Uh oh!
There was an error while loading. Please reload this page.
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.
P1: Add an explicit least-privilege
permissionsblock beforejobsso the token passed to the external action has only required scopes.Prompt for AI agents