Web SecurityWeb Security · Lesson 10
API, Secrets & Supply Chain Security
Keys, rate limits, dependencies and CI/CD risk.
Video tutorialTrack course · freeCodeCamp
Speed
Transcript & captions
8/8
- Never ship private keys to the browser - anything in client code is public.
- Separate publishable keys from secret keys and rotate on exposure.
- Rate limit and authenticate every API route, including webhooks.
- Verify webhook signatures before trusting a payload.
- Validate all input server-side with a schema, and allowlist fields to prevent mass assignment.
- Audit dependencies, pin versions, and watch for typosquatted packages.
Most modern breaches are not clever exploits - they are a leaked token in a repository, an unauthenticated internal endpoint, or an outdated dependency.
Knowledge check
0/2 answeredA secret key placed in front-end code is...
Before processing a webhook you must...