A popular npm package your build uses is reported as compromised. What do you do?
AdvancedScenarioSecrets, Supply Chain and DORA
Answer
Situation read → Supply-chain incident.
What I'd do →
- Find affected builds: search lockfiles and SBOMs for the package and version.
- Pin or override to a safe version, block the bad version in Nexus, and rebuild.
- If it ran in CI, treat that environment's secrets as exposed and rotate.
- Check install scripts and review recent network egress.
Why → Installing a package executes code in CI with its secrets.
Interview tip → Mention npm ci --ignore-scripts and cooldown windows for new versions.
More on Secrets, Supply Chain and DORA
A developer committed an AWS key to a public repo. Walk through your response.BeginnerHow do you stop secrets from being committed in the first place?IntermediateThe pipeline needs access to 15 different secrets across environments. How do you manage them?IntermediateExplain SLSA and how you would raise a pipeline's level.AdvancedHow do you verify only signed images run in Kubernetes?AdvancedDependency update PRs pile up. How do you keep dependencies fresh without chaos?Intermediate