Web Security and WAF · Defense in Depth: Headers, WAF, Edge and SDLC
Secure Development Lifecycle
Threat modeling, security testing and response built into everyday engineering.
Security works best as part of normal development: threat model new features (STRIDE: spoofing, tampering, repudiation, information disclosure, denial of service, elevation of privilege), write abuse cases, review security-sensitive changes, automate SAST, SCA, secret scanning and DAST in CI, test authorization rules explicitly, run periodic penetration tests and bug bounties, and maintain an incident response plan with logging that supports investigations.
Lightweight threat model for "Share document via public link"
- Spoofing: link guessable? → 128-bit random tokens
- Tampering: can link holders edit? → view-only scope enforced server-side
- Repudiation: who created/accessed links? → audit log entries
- Info disclosure: link leaks via Referer/search engines? → Referrer-Policy, noindex, expiry
- DoS: link scraping? → rate limits per token
- Elevation: link token reused on other endpoints? → token scoped to one document + action
Common pitfalls
- Security reviews only before launch.
- Scanners producing ignored noise (triage and tune).
- No authorization tests in the test suite.
Key points
- Threat model features (STRIDE)
- Automate SAST/SCA/DAST/secret scanning
- Test authorization; plan incident response
Further reading: OWASP ASVS
Practice questions
What is STRIDE?
Answer
A threat-modeling mnemonic: Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege — used to systematically find threats in a design.
Which automated security checks fit in CI?
Answer
Static analysis (SAST), dependency/composition analysis (SCA), secret scanning, container/IaC scanning, and dynamic scans (DAST) against preview environments.
Open in the app to mark lessons complete, take notes and track your progress.