Overview
The Droid GitHub Action (Factory-AI/droid-action) runs entirely inside GitHub Actions using your own runners. It does not require a separate hosted service or persistent connection to Factory infrastructure beyond standard API authentication.
Runs in your environment
The action executes on GitHub‑hosted or self‑hosted runners you control. No
external compute resources are provisioned.
No persistent code storage
Code is checked out transiently for the workflow run and discarded
afterward. Factory does not store your source code.
Scoped permissions
The action requests only the GitHub permissions it needs and tokens are
automatically revoked after each run.
Standard Factory authentication
Uses your Factory API key, subject to your org’s existing model allowlists,
rate limits, and policies.
Architecture and data flows
When a workflow runs, the following sequence occurs:- Trigger detection – The action detects
@droidmentions in PR comments, descriptions, or review comments. - Permission verification – Before executing, the action verifies the triggering user has write access to the repository.
- Context gathering – Droid collects PR metadata, changed files, and existing comments from the checked‑out repository.
- Droid Exec – The CLI runs with GitHub MCP tools pre‑registered, allowing it to interact with the PR via GitHub APIs.
- LLM requests – Prompts are sent to your configured model providers through Factory’s standard routing.
- Results – Droid posts inline comments or updates the PR description directly via GitHub APIs.
- Token revocation – GitHub App tokens are automatically revoked at the end of the workflow.
Data boundaries
| Data type | Where it flows | Retention |
|---|---|---|
| Source code | GitHub runner (transient checkout) | Discarded after workflow |
| PR metadata | GitHub APIs | GitHub’s retention policies |
| Prompts and context | Configured LLM providers | Per your model provider agreements |
| Workflow logs | GitHub Actions | Your repository’s log retention settings |
| Debug artifacts | GitHub Actions artifacts | 7 days (configurable) |
Authentication and authorization
Factory API key
The action requires a Factory API key (FACTORY_API_KEY) stored as a GitHub secret. This key:
- Authenticates Droid Exec sessions with Factory’s API.
- Is subject to your org’s model allowlists, rate limits, and policies.
- Should be rotated regularly following your organization’s key management practices.
GitHub App tokens
When using the Factory Droid GitHub App:- The app requests an installation token scoped to the specific repository.
- Tokens are short‑lived and automatically revoked after the workflow completes.
- The app only requests permissions necessary for its operation (contents, pull requests, issues).
github_token input with appropriate permissions.
User permission verification
Before executing any@droid command, the action verifies:
- The triggering user has write access to the repository.
- The user is not a bot (unless explicitly allowed via
allowed_botsinput). - The comment or trigger matches the expected format.
Security controls
Permission scoping
The action requests only the GitHub permissions it needs:Bot and user filtering
Control who can trigger the action:| Input | Purpose |
|---|---|
allowed_bots | Comma‑separated list of bot usernames allowed to trigger, or * for all. Default: none. |
allowed_non_write_users | Usernames to allow without write permissions. Use with extreme caution. |
Network restrictions (experimental)
For enhanced security, you can restrict network access during Droid execution:Secrets protection
The action follows security best practices for secrets handling:- API keys are passed via environment variables from GitHub secrets.
- The
show_full_outputoption is disabled by default to prevent accidental exposure of sensitive data in logs. - Debug artifacts are retained for only 7 days by default.
Audit and monitoring
Workflow logs
All Droid activity is logged in GitHub Actions workflow runs, providing:- Timestamps for all operations.
- Command inputs and outputs (unless containing sensitive data).
- Success/failure status for each step.
- Links to any comments or changes made.
Debug artifacts
The action uploads debug artifacts including:- Droid session logs.
- Console output.
- Session metadata.
Integration with Factory telemetry
If your organization uses Factory’s OTEL telemetry, Droid Exec sessions from GitHub Actions are included in your telemetry data, providing:- Session metrics tagged with repository and workflow context.
- LLM usage and cost attribution.
- Tool invocation tracking.
Deployment recommendations
For security‑conscious organizations
For security‑conscious organizations
- Use repository secrets – Store
FACTORY_API_KEYas a repository or organization secret. - Review workflow permissions – Ensure the workflow file requests only necessary permissions.
- Restrict bot access – Keep
allowed_botsempty unless you have a specific need. - Enable branch protection – Require PR reviews before merging Droid‑assisted changes.
- Monitor workflow runs – Review Droid activity in your GitHub Actions logs regularly.
- Consider network restrictions – Use
experimental_allowed_domainsto limit network access.
For regulated environments
For regulated environments
- Self‑hosted runners – Run the action on self‑hosted runners in your controlled environment.
- Model allowlists – Configure Factory org policies to restrict which models Droid can use.
- Audit retention – Adjust artifact retention periods to meet your compliance requirements.
- Integrate with SIEM – Export GitHub Actions logs and Factory telemetry to your security monitoring tools.
Comparison with other deployment patterns
| Aspect | GitHub Action | CLI on developer machine | Droid Exec in CI |
|---|---|---|---|
| Execution environment | GitHub runners | Local workstation | Your CI runners |
| Code access | Transient checkout | Full local access | Transient checkout |
| Authentication | Factory API key | Factory API key | Factory API key |
| Trigger | PR events, comments | Manual invocation | CI pipeline events |
| Audit trail | GitHub Actions logs | Local + Factory telemetry | CI logs + Factory telemetry |
