Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/ai-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: AI Review

on:
pull_request:
types: [opened, reopened, synchronize, edited, ready_for_review]
push:
branches: [master]
workflow_dispatch:
inputs:
pr_number:
description: PR number to review (leave blank to review a commit)
required: false
commit_sha:
description: Commit SHA to review (leave blank when using PR number)
required: false

jobs:
ai-review:
uses: jitsucom/github-workflows/.github/workflows/ai-review.yml@main

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

uses: ...@main is unsafe here because this job inherits repository secrets. A mutable ref means future upstream commits can change executed code without a PR in this repo. Pin this reusable workflow to an immutable commit SHA (or at least a signed, immutable tag) before enabling secret inheritance.

secrets: inherit

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

secrets: inherit forwards all available secrets to an external reusable workflow. Prefer explicitly passing only the minimum required secrets to reduce blast radius if the called workflow is compromised or changed unexpectedly.

with:
review_instructions: >-
Focus on Go correctness, concurrency bugs, and MongoDB protocol handling.
Skip style nitpicks.
pr_number: ${{ inputs.pr_number }}
commit_sha: ${{ inputs.commit_sha }}
Loading