An external pod needs enough access to build, test and ship software, and nothing more. In practice, the weakest point is rarely the repository permission itself. It is the secrets around it: API keys in environment files, cloud credentials on laptops, signing keys shared over chat during a stressful release. The principle that solves this is simple to state: secrets live in the pipeline and in a vault, never with people. This guide turns that principle into a model you can write into the technical annex of your contract and verify every sprint.

Why secrets are the soft spot

The scale of leakage is large and growing. GitGuardian's State of Secrets Sprawl 2025 report counted 23.8 million new secrets leaked on public GitHub in 2024, a 25 percent increase over the previous year, and found that 70 percent of secrets leaked in 2022 were still valid. Leaks are not only frequent, they are rarely cleaned up.

Remediation is slow even when leaks are found. Verizon's 2025 Data Breach Investigations Report, based on 12,195 confirmed breaches, put the median time to remediate leaked secrets discovered in GitHub repositories at 94 days. The same report found that third-party involvement in breaches doubled to 30 percent, up from 15 percent the year before. External teams are part of your supply chain, whether you treat them that way or not.

The German picture is similar. IBM's Cost of a Data Breach Report 2025 found that supply chain or third-party compromise was the most frequent initial vector in Germany at 16 percent of cases, with an average cost of EUR 4.52 million per breach, above the German average of EUR 3.87 million.

The pipeline-first model

In a pipeline-first model, engineers write code and configuration that refers to secrets by name. The pipeline, running under its own identity, fetches the actual values from a vault at build or deploy time. Engineers never need the production values to do their job.

AssetWhere it livesWho can read itPod engineer access
Production secrets (database, payment, third-party APIs)Client vaultProduction pipeline identityNone
Staging and test secretsClient vault, separate pathStaging pipeline, named engineersRead, through vault with audit log
Local development secretsGenerated per engineer, short-livedThe engineerOwn credentials only
Code signing keysHardware security module or managed key serviceRelease pipeline, after approvalNone; signing is a pipeline step
Cloud deployment credentialsWorkload identity federation, no static keysPipeline per environmentNone for production

Eight rules for the technical annex

  1. Client-owned vault. Secrets for your systems are stored in your vault, in your tenant. The vendor may operate pipelines but does not hold the master copy.
  2. No static cloud keys. Pipelines authenticate to cloud providers through short-lived federated tokens instead of long-lived access keys.
  3. Separate identities per environment. The staging pipeline cannot read production secrets, and the production pipeline only runs from protected branches after approval.
  4. Signing as a gated step. Release artefacts and firmware images are signed by the pipeline after the client's release approval. No human holds the private key on a laptop.
  5. Pre-commit and server-side scanning. Secret scanning runs on engineers' machines before commit and again on every push. A detected secret blocks the merge.
  6. Rotation on every leaver. When a pod member leaves, any secret that person could read is rotated, not just their account disabled.
  7. Revocation playbook. A written procedure for leaked secrets: revoke first, investigate second, with a target time measured in hours, not days.
  8. Evidence per sprint. Scan results and vault access logs for pod identities are part of the sprint evidence package.

Repository and pipeline permissions

Secrets discipline fails if the pipeline itself can be rewritten by anyone with commit rights. Three controls close that gap:

  • Protected pipeline definitions. Changes to pipeline files and deployment configuration require review by a client-designated owner, enforced by code owner rules.
  • Branch protection. Main and release branches require pull request review and passing checks; no direct pushes, including for administrators of the vendor side.
  • Least privilege on the platform. Pod engineers are members with write access to the relevant repositories, not organisation owners. Repository creation, webhook configuration and integration installs stay with the client.

These controls are not a sign of distrust. They are the same controls a well-run internal team applies to its own engineers, and they make audits under ISO 27001 or TISAX considerably simpler. Our page on security and compliance describes the broader baseline.

The onboarding sequence

The model is easiest to introduce in the first week of an engagement, before habits form. A proven order: first, pod accounts are created in the client's identity provider, with multi-factor authentication and no exceptions. Next come repository permissions and pre-commit secret scanning hooks on all development machines. Only then are pipelines connected to the vault, starting with staging. The client enables production pipeline access once the first release has passed the full approval path. Each step is recorded with a date in the onboarding log, which doubles as the first piece of audit evidence.

When a secret leaks anyway

Assume it will happen once. The response should be mechanical:

  1. Revoke or rotate the secret immediately; do not wait to establish whether it was used.
  2. Remove it from the repository history only after rotation, since history rewriting does not invalidate copies already pulled.
  3. Check access logs of the affected system for the exposure window.
  4. Record the event, the cause and the control that will prevent recurrence, and review it in the next retrospective.
  5. If personal data may have been affected, involve your data protection officer, since DSGVO Art. 33 notification deadlines can apply.

This article is general information and does not constitute legal advice; notification duties after a security incident should be assessed with qualified counsel and your data protection officer.

Keeping secrets out of people's hands is mostly a question of designing the pipeline correctly from the first week. In a niogod™ engagement, the Senior Consultant sets up the delivery pipeline against your vault and identity provider during onboarding, so the pod ships code without ever holding production keys. If external access to your build and release chain is on your risk list, it is a conversation worth having early.

Talk to niogod™

Planning engineering capacity in DACH? Book a 30-minute consultation with the niogod™ team.

Book consultation
← All insights