docs: add BYOK code review workflow example - #35
Open
markattar-factory wants to merge 1 commit into
Open
markattar-factory wants to merge 1 commit into
markattar-factory wants to merge 1 commit into
Conversation
Show how to configure a custom Anthropic model on a GitHub-hosted runner and select it for automated code review while keeping provider credentials in Actions secrets. Clarify Factory authentication and model fallback checks. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Contributor
|
Droid finished @markattar-factory's task —— View job The BYOK workflow is clear, but its credential-bearing action uses the mutable 1 inline comment posted |
| JSON | ||
|
|
||
| - name: Run BYOK code review | ||
| uses: Factory-AI/droid-action@main |
Contributor
There was a problem hiding this comment.
[P1] [security] Pin the credential-bearing action to an immutable commit
Factory-AI/droid-action@main follows a mutable branch, so an upstream compromise or force-push can replace the code executed by every copied workflow. This step receives both API keys and runs with PR, issue, and OIDC permissions, enabling credential theft or token abuse; pin it to a reviewed full commit SHA.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Adds a copyable GitHub Actions YAML example to the existing Automated Code Review page. The example configures an Anthropic custom model on a fresh runner, supplies its API key through Actions secrets, and selects
custom:byok-review-0for both review passes.The surrounding instructions distinguish provider credentials from the Factory API key and GitHub App access. They explain the quoted heredoc, custom model ID, fork restrictions, and how to check whether the action falls back to an organization default.
Out of scope: new documentation pages, navigation changes, and changes to the action or this repository's active workflows.
Related Issue
Requested BYOK workflow example for the code review page. No issue ID provided.
Reviewer Guide
Read order:
docs/guides/droid-exec/code-review.mdx, the new BYOK code review section immediately after Authentication.Review depth: Standard. The copyable example's secret handling, model selection, and runner assumptions are the important checks. The remainder of the page is unchanged.
Risk & Impact
Documentation only; no runtime behavior changes. The example skips drafts and fork PRs and targets a fresh GitHub-hosted runner. It warns self-hosted users not to overwrite existing settings and explains that an invalid or policy-blocked model can trigger a fallback, so a successful action alone does not prove BYOK usage.
Verification
Behavior verified: The example's setup step runs in a temporary home with a dummy environment value. It writes valid JSON with permissions
0600, preserves the literal environment reference, and does not write the dummy value into settings.Source verification: Action inputs, settings loading, custom model ID generation, review-pass wiring, and fallback behavior are checked against the action and CLI source.
Not tested: A live provider-backed review. Validation does not invoke an LLM or post review feedback.
Standard validators: Mintlify build validation passes with OpenAPI generation disabled; the page compiles as MDX, the extracted YAML passes
actionlint, new internal links resolve, andgit diff --checkpasses.