Git, CI/CD & GitOpsXCIV · Incident: Secret LeakIncidentResponse
The incident arrives — first alert, first scope, first ten minutes
What you'll learn
- Distinguish an alert about a possible secret leak from a confirmed incident
- List the four scope questions answered in the first ten minutes
- Identify the four channels that surface a leak: scanner, CI scan, vendor abuse signal, partner disclosure
- Open a response channel and assign an incident commander before any remediation begins
Prerequisites
Verified against Git 2.55.x teaching target; 2.40+ minimum · GitHub Actions continuous service; Aug 2026 documentation baseline · Argo CD v3.5.x teaching target; v3.0+ minimum · Flux v2.9.x · Sigstore Cosign v3.1.x · SLSA v1.2 · OCI Distribution Specification v1.1 · Git LFS v3.7.1 · Kubernetes (cross-course target) 1.36.x
A secret leak is an incident to respond to, not a problem to solve. The first signal reaches the on-call engineer through one of four channels, and the first ten minutes are spent on scope, not on remediation. The questions answered in those ten minutes determine every subsequent decision.
How the alert reaches the team
The four channels are not equivalent. Each carries different evidence, different urgency, and a different starting assumption:
flowchart LR
A["secret reaches public surface"] --> B["scanner alert"]
A --> C["CI scan failure"]
A --> D["vendor abuse signal"]
A --> E["partner disclosure"]
B --> F["on-call paged"]
C --> F
D --> F
E --> F
F --> G["scope question set"]
G --> H["incident commander assigned"]
H --> I["response channel opened"]
- Scanner alert. A git host scanner detected a string matching a known provider’s pattern. Urgency is high; proof is in the alert.
- CI scan failure. A
gitleaksjob failed on a pull request that is not yet merged. Urgency is moderate; the branch may be public via a fork. - Vendor abuse signal. The cloud provider observed anomalous activity attributable to the credential. Urgency is highest; an attacker is provably active.
- Partner disclosure. A security researcher or bounty participant found the credential and is reporting it.
The four scope questions
Before any remediation, the on-call answers:
- What secret. Cloud access key, registry token, database URL with embedded password, SSH private key, JWT signing key, or webhook secret — each has a different revocation path.
- Where committed. Which repository, branch, file, commit. Determines whether the leak is on the default branch, on a feature branch, or in a public mirror.
- When committed. A commit made seconds ago has not been indexed by every mirror; a commit made a year ago has been indexed by every mirror and every archive.
- Who can read. Public default branch: the entire internet. Internal default branch: every employee. Private feature branch: the author and reviewers.
Opening the response
Three artefacts are produced before remediation: a dedicated response channel, an incident commander who owns the sequence, and a timestamped timeline that becomes the artefact the security team audits.
Production discipline
- Log everything. A timestamped entry for every action before the action is taken.
- One commander. A single decision-maker who sequences the response.
- No remediation before scope. Rotation, rewrite, and consumer updates are deferred until the four scope questions are answered.
Cross-course references
- Linux for Production Sysadmins - Part XXX (AuditAndLog) covers the syslog and journald patterns that surface vendor abuse signals.
- Ansible for Production Sysadmins - Part XXXVIII (IncidentRunbooks) covers the runbook structure that the response channel and commander pattern extend.
- Terraform for Production Sysadmins - Part XII (State) covers state-file leak response, a special case of the scope question set above.
Quiz
Knowledge check · 4 questions
Q1. A vendor abuse signal arrives at 03:14 stating an AWS access key prefixed AKIA has been observed making API calls from an IP that does not match the team's egress range. What is the highest-leverage first action?
Q2. An alert from a secret scanner on a public repository is not sufficient evidence that the credential has been used by an attacker.
Q3. Name the four scope questions the on-call engineer must answer in the first ten minutes of a confirmed secret leak.
Q4. A gitleaks CI job fails on a pull request against the default branch of an internal infrastructure repository. The match is a GCP service account JSON key with `roles/owner`. Triage the alert.
The pull request is from a contractor's fork. The contractor's fork is public. The match is a single file, `gcp-sa-prod.json`, containing a service account key with the `roles/owner` role on the production project.
Passing score: 75%. Answers are checked in this browser.