The Simplest Way to Make Drone and Phabricator Work Like They Should
Drone and Phabricator work together by linking code reviews with automated build tasks. When developers send code to Phabricator, Drone runs tests and sends back the status. This workflow keeps bad code out of your main branch. Your team sees test results right inside the review page. Developers do not need to switch between two tools to check build logs. Everything stays in one clear place during the code review process. How drone and phabricator share keys and data Phabricator holds your g
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.
Drone and Phabricator work together by linking code reviews with automated build tasks. When developers send code to Phabricator, Drone runs tests and sends back the status.
This workflow keeps bad code out of your main branch. Your team sees test results right inside the review page. Developers do not need to switch between two tools to check build logs. Everything stays in one clear place during the code review process.
How drone and phabricator share keys and data
Phabricator holds your git repos, task boards, and code reviews. Drone acts as the build runner that tests every new change. To talk to each other, both tools need shared secrets and web hooks.
When a developer posts a diff in Phabricator, a build plan starts. Phabricator sends a web request to Drone with the diff details. Drone reads this request and pulls the exact code commit from Phabricator. To pull the code, Drone uses a bot account key stored in its settings.
Next, Drone starts fresh containers to run your test scripts. While the tests run, Drone sends status updates back to the Phabricator review. It uses the Phabricator API and a dedicated token to write these updates. Once the build finishes, Phabricator marks the review as passed or failed. Reviewers can then merge the code with confidence.
Common breaks and how to scope roles
Many teams set up this link using an admin account key. That choice creates a big risk for your source code. If someone steals the Drone key, they gain full control over Phabricator. Shared keys also make it hard to read audit logs. Every action looks like the same user did it.
To fix this, create a bot user in Phabricator just for Drone. Give this bot read rights only on the repos it needs to test. Grant it write rights only for build status updates on code reviews. Never give the build bot admin rights or broad repo write rules.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Network paths between the two systems also cause trouble. Teams often open wide firewall ports so Drone runners can reach Phabricator. Instead, restrict network paths so only known Drone nodes can reach the Phabricator server. Rotate the bot keys on a regular schedule to limit exposure.
Keeping build logs and secrets safe
Build pipelines often touch test databases and internal apps during a run. If a test fails, Drone might print raw data into the build log. This log often flows back to Phabricator for anyone to read. Data masking helps by rewriting sensitive fields like emails, phone numbers, or card numbers. This keeps private data out of your shared review pages.
You should also check who can edit build files in your repos. A developer could change a build script to print secret keys to the log. Require code approval before running builds from untrusted branches or outside users. Keep production keys out of review builds and use test keys instead. Log every API call between your build server and your code host.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
How does Phabricator trigger a build in Drone?
Phabricator runs a rule when a user creates or updates a code review. That rule sends an HTTP message with the commit data to the Drone server.
What permissions does the Phabricator bot account need?
The bot needs read rights on target code repos to pull changes. It also needs permission to update build statuses via the Phabricator API.
Why do build updates fail to show up in Phabricator?
Updates fail when the API token expires or lacks permission to edit build targets. Check your firewall rules to make sure Drone can reach the Phabricator host.
Related guides
In this post