The Simplest Way to Make CentOS and Drone Work Like They Should
Using CentOS and Drone together lets teams run container builds on stable Linux servers. CentOS hosts the container runtime and OS rules, while Drone runs each build step. This pair gives platform teams a fast, repeatable way to test and ship code. Still, the link between the build tool and the host OS needs strict rules. Without clear limits, a build job can read host files or leak shared keys. How CentOS and Drone share work and permissions Drone works by splitting a central server from th
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.
Using CentOS and Drone together lets teams run container builds on stable Linux servers. CentOS hosts the container runtime and OS rules, while Drone runs each build step.
This pair gives platform teams a fast, repeatable way to test and ship code. Still, the link between the build tool and the host OS needs strict rules. Without clear limits, a build job can read host files or leak shared keys.
How CentOS and Drone share work and permissions
Drone works by splitting a central server from the worker agents that run jobs. When you set up CentOS and Drone, the Linux host runs those worker agents. The central server watches your git repos and sends new jobs to the host.
On the CentOS side, the OS runs a container engine to start each step. The Drone runner talks to the local container socket on the CentOS machine. It pulls an image, mounts the code folder, and runs the build script inside.
Permissions flow from your source control tool down to the Linux kernel. First, a developer pushes code, and Drone checks their repo role. Next, Drone pulls any needed secrets from its store and passes them to the job. Finally, the CentOS kernel enforces user groups, file rules, and network walls around the container.
Data moves through temporary volumes that the runner creates on the CentOS disk. Every step in a pipeline shares this workspace folder until the pipeline finishes. Once the build ends, the runner deletes the workspace and stops the containers.
Common failure modes and how to scope roles
The biggest risk in this setup is giving the runner full root rights. Many teams mount the host container socket directly into untrusted build jobs. When a job can talk to that socket, it can control the whole CentOS host. An attacker could mount the host disk, read private keys, or change system files.
Shared service accounts cause another common problem during deployment steps. Teams often store one broad SSH key or cloud token in the Drone secret store. Every pipeline then uses that same key to push apps to production servers. If one build script goes bad, that broad token is exposed to the whole team. You also lose track of which person or job made a change on the server.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Unlogged database queries and shell commands during builds create blind spots for security teams. When a pipeline runs a migration script, standard build logs only show basic output. They do not record the exact queries sent to your database or who approved them. Sensitive data like emails or card numbers can also spill into plain text build logs.
To fix host risks, lock down the CentOS user that runs the Drone agent. Never run the agent as root unless a specific trusted build requires it. Keep SELinux active on CentOS so container processes stay inside their assigned boundaries. Use firewall rules on the host to block build containers from reaching internal metadata services.
Scope your secrets so each repo only gets the exact rights it needs. Create separate roles for test builds and production releases instead of sharing one key. Set Drone rules so only protected branches can read production deployment secrets. Rotate those keys often and audit your CentOS system logs for strange network calls.
Keeping host updates and build images in sync
A build server is only safe if the underlying OS stays patched. CentOS hosts need regular kernel updates to fix container escape bugs. Schedule routine maintenance windows to patch the host and restart the container engine.
Pin your pipeline steps to clean, verified container images from a private registry. Do not let production builds pull random images from public hubs at runtime. When you control both the host OS and the base images, builds stay predictable.
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
Why should I keep SELinux turned on for Drone runners on CentOS?
SELinux stops a broken container from reading or writing files on the CentOS host. Even if a build job escapes its container, SELinux blocks it from touching host keys.
How do I stop untrusted pull requests from stealing Drone secrets?
Set your Drone secret rules to block access during pull request events. Only allow secret injection when code merges into a protected main branch after review.
What is the safest way for a Drone job to reach a private database?
Do not store long-lived database passwords inside your repo or global build settings. Give each job a narrow, short-lived role and log every query the build runs.
Related guides
In this post