Web Application Security

Secure Development & Bug Hunting

55 min

Secure Software Development Lifecycle (SSDLC)

Security must be integrated throughout the entire software development process, not added as an afterthought.

SSDLC PHASES ══════════════════════════════════════════════ REQUIREMENTS → Security requirements, abuse cases Compliance requirements (GDPR, PCI) DESIGN → Threat modeling (STRIDE, PASTA) Security architecture review DEVELOPMENT → Secure coding guidelines Code reviews, pair programming TESTING → SAST (Static Application Security Testing) DAST (Dynamic Application Security Testing) SCA (Software Composition Analysis) Penetration testing DEPLOYMENT → Security hardening Infrastructure-as-Code security scan Secrets management (no hardcoded keys!) MAINTENANCE → Vulnerability disclosure program Patch management Security monitoring ══════════════════════════════════════════════

Security Headers

ESSENTIAL HTTP SECURITY HEADERS ────────────────────────────────────────────────────── Content-Security-Policy: default-src 'self' → Prevents XSS by restricting script/resource sources Strict-Transport-Security: max-age=31536000; includeSubDomains → Forces HTTPS for 1 year (HSTS) X-Frame-Options: DENY → Prevents clickjacking (iframe embedding) X-Content-Type-Options: nosniff → Prevents MIME sniffing attacks Referrer-Policy: strict-origin-when-cross-origin → Controls referrer information leakage Permissions-Policy: geolocation=(), microphone=() → Restricts browser feature access ──────────────────────────────────────────────────────

DevSecOps Pipeline

  • SAST Tools: SonarQube, Semgrep, CodeQL, Checkmarx — scan source code
  • DAST Tools: OWASP ZAP, Burp Suite Enterprise — test running app
  • SCA Tools: Snyk, Dependabot, OWASP Dependency-Check — scan dependencies
  • Secrets Detection: GitLeaks, TruffleHog — find hardcoded credentials in repos
  • Container Scanning: Trivy, Grype — scan Docker images for CVEs

🛡️ OWASP Web Security Testing Guide

The OWASP WSTG is the definitive guide for testing web application security. Available free at owasp.org — covers every test case with methodology, tools, and remediation. Essential reading for any web security professional.

Previous
Login to Track Progress