Security for Engineers/Secure SDLC & Operations

Security Incidents & On-Call

Contain, eradicate, recover, communicate; credential rotation playbooks; postmortem without blame — engineer role in security incidents.

3/5Overview: 25m

Incident phases (NIST lite)

  1. Prepare — runbooks, contacts, break-glass access
  2. Detect — alerts, user report, scanner
  3. Contain — revoke keys, isolate instance, block IP
  4. Eradicate — patch vuln, remove backdoor
  5. Recover — restore service, monitor
  6. Learn — blameless postmortem

App engineer often owns contain + eradicate for their service.

Credential leak playbook

  1. Revoke credential first (assume active exploitation)
  2. Audit access logs for abuse window
  3. Rotate dependent secrets
  4. Root cause — how it got in git/slack
  5. Communicate per company policy

Speed beats completeness in first 15 minutes.

vs availability incident

Security incident may require taking service down (isolate malware).

Different comms — legal/privacy team involved if data breach.

Logging for forensics

Retain security-relevant logs (auth failures, admin actions) with tamper-resistant storage.

Balance retention cost vs investigation need.

Behavioral interview

"Tell me about a security issue you handled" — STAR: detection, action, prevention added (scanner, review process).

What not to do

  • Hide incident
  • Rotate only one of many leaked keys
  • Wipe logs before investigation

Cross-reference: Observability → Alerting & Incidents for incident command structure.

Further Reading

Hands-On Tasks (Optional)

Security design drills — threat modeling, auth flows, and incident playbooks. Assumes Networking (TLS) fundamentals.

  • Respond to leaked API key in public GitHub

    Timeline: detect (scanner alert), revoke key, audit usage logs, rotate dependent secrets, notify customers if needed. First 30 minutes checklist.

    15m