docs: refresh Academy workflow pages#1079
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Droid finished @TheFactoriousDROID's task —— View job Docs-only change with generally clear rewrites; the main correctness issue is that the PR review-and-fix GitHub Actions example won’t be able to push commits back to the PR branch as written. Consider tightening the basic CI example to be truly read-only by default and adding a short note about secrets/permissions on forked PRs. |
| pull-requests: write | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 |
There was a problem hiding this comment.
[P1] PR review workflow can’t push fixes (detached HEAD checkout)
In Example 1, actions/checkout@v4 is not configured to check out the PR head branch, so the job runs on a detached merge commit; if Droid commits changes, the later git push will fail (e.g., “not currently on a branch” / no upstream), so fixes won’t actually be pushed back to the PR source branch.
| env: | ||
| FACTORY_API_KEY: ${{ secrets.FACTORY_API_KEY }} | ||
| run: | | ||
| droid exec --auto low "Summarize the key risks in this change. Do not modify files." |
There was a problem hiding this comment.
[P2] Keep the basic example truly read-only by omitting --auto
The basic workflow says “Do not modify files.” but runs droid exec --auto low, which still grants file-write capability and contradicts the later guidance to “Start read-only” without --auto; using droid exec without --auto here reduces accidental writes and makes the example match the intended safety posture.
| ```yaml | ||
| name: PR Assistant | ||
| name: Droid Task | ||
| on: pull_request |
There was a problem hiding this comment.
[P2] Note that pull_request workflows won’t get secrets on fork PRs
These examples use on: pull_request while relying on ${{ secrets.FACTORY_API_KEY }}, but GitHub does not pass repository secrets to workflows triggered by forked PRs; calling this out (or scoping the examples to same-repo PRs / trusted actors) prevents users from copying a workflow that silently fails due to missing secrets.
| - name: Commit fixes if any | ||
| git diff origin/${{ github.base_ref }}...HEAD > /tmp/pr.diff | ||
|
|
||
| droid exec --auto low "Review /tmp/pr.diff and fix only high-confidence bugs, typos, missing error handling, or broken tests introduced by this pull request. Do not make stylistic rewrites." |
There was a problem hiding this comment.
[P1] [security] Guard against prompt-injection when reviewing untrusted diffs
Example 1 runs droid exec over attacker-controlled PR diff content while also providing FACTORY_API_KEY and granting write permissions; a malicious PR can embed prompt-injection strings that trick the agent into leaking secrets (e.g., into PR comments) or making unintended writes. Add explicit guardrails (run only for trusted actors/labels, keep permissions read-only by default, and avoid secrets/write access on untrusted PR events) to reduce exfiltration and unauthorized-change risk.
|
|
||
| - name: Setup Droid CLI | ||
| run: | | ||
| curl -fsSL https://app.factory.ai/cli | sh |
There was a problem hiding this comment.
[P2] [security] Avoid curl | sh installs without integrity verification
The docs recommend curl -fsSL https://app.factory.ai/cli | sh, which executes a remote script without pinning or integrity checks; if the delivery chain is compromised, this becomes immediate RCE on the runner. Prefer a pinned artifact with checksum/signature verification (or an official package/action) and document an integrity-verification option for security-sensitive CI.
What changed
droid execworkflows for pull request review, scheduled maintenance, and security scans./reviewpage around review modes, severity levels, output, and when to use automated review instead.Why
These pages now align more closely with the Academy training flow while separating plugin concepts from marketplace distribution so each page is easier to scan and follow.
Risk / impact
Docs-only. No product behavior changes.
Testing
git diff --checknpx --yes prettier --check docs/guides/droid-exec/github-actions.mdx docs/cli/features/code-review.mdx docs/cli/configuration/plugins.mdx docs/cli/configuration/plugin-marketplaces.mdx docs/docs.json