The Simplest Way to Make CircleCI and Phabricator Work Like They Should
Teams pair circleci and phabricator to run tests on every code review. Phabricator sends code changes to CircleCI and reads back the test results. This setup keeps bad code out of your main branch. Developers get fast test feedback right inside their code review threads. Still, linking these two tools takes careful setup because neither builds native support for the other. How circleci and phabricator share keys and build data Phabricator tracks code changes and runs a build engine for new c
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams pair circleci and phabricator to run tests on every code review. Phabricator sends code changes to CircleCI and reads back the test results.
This setup keeps bad code out of your main branch. Developers get fast test feedback right inside their code review threads. Still, linking these two tools takes careful setup because neither builds native support for the other.
How circleci and phabricator share keys and build data
Phabricator tracks code changes and runs a build engine for new commits. When a developer sends a patch, Phabricator calls the CircleCI web API. This web call asks CircleCI to start a new test job.
To make this call, Phabricator needs a valid CircleCI API key. You store this key inside the Phabricator credential store. Phabricator passes the commit hash and review ID in the payload.
CircleCI pulls the code from the repo and runs the test suite. To fetch the exact patch, the build job needs a Phabricator key. The job uses a command line tool to download the diff.
When the test job finishes, CircleCI sends the status back to Phabricator. It uses that same Phabricator key to post pass or fail results. The developer sees a green check or a red cross on the review.
This loop relies on two separate API keys moving across the network. Each tool acts as a client to the other during a single build. Keeping both sides in sync requires clear rules for keys and network paths.
Common failure modes and how to scope roles
Many teams use a personal user key to link these two systems. When that person leaves the company, every build stops working at once. Personal keys also carry too many rights across all team projects.
Instead, create a dedicated bot account in Phabricator just for build jobs. Give this bot read rights on code and write rights on build statuses. Never give the bot admin rights or broad repo write permissions.
End-to-End Encryption + CircleCI Security: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
On the CircleCI side, avoid using a broad user token if possible. Scope the API token to trigger builds only for specific project repos. Store the Phabricator bot token inside a restricted CircleCI context.
Only attach that context to jobs that report build results back. This stops untrusted build steps from reading the bot key in memory. You also should rotate both API keys on a regular schedule.
Network drops can also leave code reviews stuck in a waiting state. If CircleCI fails to call back, Phabricator waits forever for an update. Set a firm timeout rule on your Phabricator build plans to prevent hangs.
Also, check your logs to see which job used the bot key. Shared bot accounts make it hard to trace who ran a manual build. Good audit logs help your security team track every action back to a commit.
Keeping build pipelines fast and safe
Long test queues slow down the entire code review cycle for everyone. Configure Phabricator to cancel old builds when a developer updates a review. This saves compute time and returns test results much faster.
You should also limit which project branches can trigger full deploy jobs. Review patches only need unit tests and basic lint checks to pass. Save heavy integration tests for commits that merge into the main branch.
Review your bot logs each month to spot strange API calls early. Clean up old contexts and unused keys before they become a risk. A tight setup keeps your code reviews fast and your systems safe.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
How does Phabricator trigger a CircleCI build?
Phabricator uses a build rule that makes an outbound HTTP request. This request sends the commit data to the CircleCI API endpoint.
How does CircleCI send test results back to Phabricator?
A final step in the CircleCI job calls the Phabricator API. It passes the build target ID and the final pass or fail state.
Why should we use a bot account instead of a user key?
Bot accounts stay active when staff members leave your engineering team. They also let you limit permissions to only what the build needs.
Related guides
In this post