Skip to content

fix(ci): use valid Factory droid-action inputs for code review#8

Merged
factory-sam merged 3 commits into
mainfrom
fix/code-review-action-inputs
Jun 15, 2026
Merged

fix(ci): use valid Factory droid-action inputs for code review#8
factory-sam merged 3 commits into
mainfrom
fix/code-review-action-inputs

Conversation

@factory-sam

Copy link
Copy Markdown
Owner

The Code Review workflow (added in #6) passed org_id, api_key, and prompt to Factory-AI/droid-action@main, but those are not valid action inputs (the action expects factory_api_key). As a result the action never received the API key and the run check failed on every PR, even though the FACTORY_API_KEY secret exists.

This switches to factory_api_key (plus an explicit github_token) and drops the invalid org_id/prompt inputs so the code-review bot can authenticate and run.

The Code Review workflow passed org_id/api_key/prompt, which are not valid
droid-action inputs, so the action never received the API key and failed on
every PR. Use factory_api_key (and explicit github_token) and drop the
invalid inputs.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Droid encountered an error —— View job


Security Review

Droid is reviewing code and running a security check…

droid-action mints its GitHub token via OIDC, which requires id-token:write;
without it the review job failed after running. Also review on synchronize/
reopened so updated PRs get re-reviewed.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Droid finished @factory-sam's task —— View job


Security Review

The workflow input fixes look correct and should unblock the Factory action, but the job currently grants OIDC token minting to an unpinned third-party action. Consider pinning the action and removing id-token: write unless OIDC is required.

contents: read
pull-requests: write
issues: write
id-token: write

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P1] [security] Avoid granting OIDC id-token: write to an unpinned third-party action

Adding id-token: write enables GitHub OIDC tokens for this job, which materially increases blast radius if Factory-AI/droid-action@main (unpinned) is ever compromised, since the action already receives sensitive credentials (FACTORY_API_KEY and a write-scoped GITHUB_TOKEN) and could mint an OIDC token to access any external cloud roles trusted for this repo. Remove id-token: write unless the workflow strictly needs OIDC, and pin Factory-AI/droid-action to a specific commit SHA (plus keep permissions as minimal as possible).

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Addressed in 46eb829: pinned Factory-AI/droid-action to the immutable commit SHA 7c7bfea2aa3bb7ea87579402cc1d89dbcf6b13b3 (current main). id-token: write is required for the action's OIDC token, so pinning the action removes the unpinned-action blast-radius risk without changing functionality.

Resolves the P1 security review finding: granting id-token:write to an
unpinned third-party action increases supply-chain blast radius. Pin
Factory-AI/droid-action to its current main SHA so the referenced code
cannot change underneath us. No functional change.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Droid finished @factory-sam's task —— View job


Security Review

This PR correctly fixes the Factory droid-action inputs and pins the action SHA for reproducibility. No additional high-confidence, inline-anchorable issues found.

@factory-sam factory-sam merged commit 8a291b6 into main Jun 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant