The Simplest Way to Make Cohesity and GitLab CI Work Like They Should
Teams pair cohesity and gitlab ci to run backups and restore test data during builds. A build runner calls the storage API to snap data before code changes go live. This workflow keeps data safe when a database update fails in production. It also lets developers test new code against fresh copies of real data. How cohesity and gitlab ci share keys and data The build runner needs a valid API key to talk to the backup cluster. You set up a service account on the storage side with a fixed role.
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 cohesity and gitlab ci to run backups and restore test data during builds. A build runner calls the storage API to snap data before code changes go live.
This workflow keeps data safe when a database update fails in production. It also lets developers test new code against fresh copies of real data.
How cohesity and gitlab ci share keys and data
The build runner needs a valid API key to talk to the backup cluster. You set up a service account on the storage side with a fixed role. Then you store that key inside the pipeline variables for your project.
When a job starts, the runner reads the secret variable from the job settings. The runner sends a request over HTTPS to the cluster to log in. The storage cluster checks the key and returns a session token for the job.
Next, the pipeline script asks the cluster to take a snapshot or clone a volume. Data stays inside the storage network while the runner only sends control requests. When the clone is ready, the storage system mounts it to the test host. After the test job ends, the runner sends one last call to delete the clone.
Common traps with shared keys and wide roles
Many teams use one admin account for all their build runners. This bad habit puts every backup at risk if a key leaks in a build log. A rogue job could wipe out production snapshots or read private files from other teams.
Long-lived tokens also cause trouble when engineers leave the team or change roles. Nobody wants to rotate a shared key that breaks fifty active build pipelines at once. Without clear logs per job, auditors cannot tell which commit triggered a data restore.
GitLab CI Security + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
You can fix this by giving each project its own narrow role on the cluster. Restrict each role so it can only touch the objects meant for that one app. Set network rules so only specific build runners can reach the storage API port. Always mask sensitive fields like emails, phone numbers, card numbers, and national IDs in cloned test data. Masking rewrites matched fields in results before test scripts run against the clone.
Steps to keep your build and backup pipeline safe
Start by mapping which build jobs truly need to trigger snapshots or data clones. Most code lint and unit test stages do not need any storage permissions at all. Limit secret variables to protected branches so random merge requests cannot read them.
Use dedicated runners on a private subnet for all jobs that talk to storage. Keep these runners separate from the machines that compile public code or fetch external packages. Turn on audit logs on both systems so you can match every API call to a pipeline run. Review active service keys every month and remove any accounts that old projects left behind.
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 link backup tasks to a build pipeline?
Running a snapshot right before a deployment gives you a clean restore point. If a schema change breaks the app, you can roll back the data in minutes.
How do we stop build logs from leaking storage keys?
Mark all keys and tokens as masked variables in your project settings right away. Also make sure your pipeline scripts do not print out full request headers when a job fails.
Should developers use production clones for pipeline tests?
Clones are great for testing, but you must scrub personal data before tests start. Use data masking to rewrite emails, phone numbers, and card numbers in the test volume.
Related guides
In this post