This is the final article in the Security for Developers series. It brings everything together into a single, actionable checklist you can use for every project. Bookmark this page and review it whenever you start a new project or prepare for a security review.

How to Use This Checklist

Each item is marked with a priority level:

  • P0 (Critical): Do this before going to production. Skipping it means you are vulnerable.
  • P1 (High): Do this within the first week of production. Important for security posture.
  • P2 (Medium): Do this within the first month. Improves defense in depth.
  • P3 (Low): Nice to have. Do when you have time.

Authentication Checklist

#ItemPriorityDetails
1Hash passwords with bcrypt or Argon2P0Never store plaintext. Use cost factor 12+ for bcrypt.
2Enforce minimum password length of 8 charactersP0NIST recommends 8+ characters. Do not require special characters.
3Use HTTPS for all authentication endpointsP0Credentials in transit must be encrypted.
4Implement account lockout after failed attemptsP1Lock after 5-10 failed attempts for 15-30 minutes.
5Use JWT with short expiration (15-60 min)P1Combine with refresh tokens for longer sessions.
6Sign JWTs with RS256 or EdDSA (not HS256 for distributed)P1Asymmetric signing prevents key sharing.
7Store tokens in httpOnly cookies (not localStorage)P1Prevents XSS from stealing tokens.
8Implement refresh token rotationP1Invalidate old refresh token on each use.
9Validate JWT signature and expiration on every requestP0Never trust a token without validation.
10Support multi-factor authentication (MFA)P2TOTP or WebAuthn. SMS is better than nothing.
11Check passwords against breached lists (Have I Been Pwned)P2Reject passwords that appear in known breaches.
12Log all authentication eventsP1Successful and failed logins, password changes.

Reference: Tutorial #2: Authentication

Authorization Checklist

#ItemPriorityDetails
1Check authorization on every request (server-side)P0Never trust the client.
2Deny by defaultP0Whitelist allowed actions. Everything else is denied.
3Use role-based access control (RBAC)P1Define roles (admin, editor, viewer) with specific permissions.
4Validate ownership for resource accessP0User A cannot access User B’s data (prevent IDOR).
5Use UUIDs instead of sequential IDs in URLsP1/api/users/a1b2c3d4 instead of /api/users/123.
6Implement OAuth 2.0 with PKCE for third-party authP1Required for mobile and SPA applications.
7Validate OAuth state parameterP0Prevents CSRF in OAuth flows.
8Log all authorization denialsP1Detect privilege escalation attempts.

Reference: Tutorial #3: Authorization

Injection Prevention Checklist

#ItemPriorityDetails
1Use parameterized queries for all SQLP0Never concatenate user input into SQL.
2Use an ORM with parameterized queriesP1GORM, SQLAlchemy, Room, Prisma all use parameters by default.
3Validate and sanitize all user inputP0Whitelist approach: only allow expected characters.
4Escape output in HTML templatesP0Use auto-escaping template engines (Go html/template, React JSX).
5Set Content-Security-Policy headerP1Prevents inline scripts and unauthorized resources.
6Use HttpOnly flag on session cookiesP0Prevents JavaScript from accessing cookies.
7Sanitize HTML if you must accept itP1Use DOMPurify or a server-side equivalent.

Reference: Tutorial #4: Injection Prevention

HTTPS and Transport Security Checklist

#ItemPriorityDetails
1Use HTTPS everywhereP0All pages, all APIs, all environments.
2Use TLS 1.2 as minimum, prefer TLS 1.3P0Disable TLS 1.0 and 1.1.
3Use Let’s Encrypt for certificatesP1Free, automated, trusted by all browsers.
4Enable HSTS headerP1Strict-Transport-Security: max-age=31536000; includeSubDomains.
5Redirect HTTP to HTTPSP0All HTTP requests should redirect to HTTPS.
6Use strong cipher suitesP1Test with SSL Labs (target A+ rating).
7Enable certificate pinning for mobile appsP2Prevents MITM attacks on mobile.

Reference: Tutorial #5: HTTPS and TLS

CSRF and CORS Checklist

#ItemPriorityDetails
1Use SameSite=Lax or Strict on all cookiesP0Prevents most CSRF attacks.
2Implement CSRF tokens for state-changing requestsP1Synchronizer token pattern or double-submit cookie.
3Set CORS headers restrictivelyP1Never use Access-Control-Allow-Origin: * with credentials.
4Validate the Origin headerP1Reject requests from unexpected origins.
5Use custom headers for API requestsP2Custom headers trigger CORS preflight, adding a layer of protection.

Reference: Tutorial #6: CSRF, Tutorial #7: CORS

API Security Checklist

#ItemPriorityDetails
1Implement rate limitingP0Per-user and per-IP. Start with 100 requests/min.
2Validate all input (type, length, format)P0Reject unexpected input early.
3Return minimal data in responsesP1Never expose internal IDs, stack traces, or debug info.
4Set request size limitsP1Prevent resource exhaustion from large payloads.
5Use API keys or OAuth tokens for authenticationP0Never rely on IP-based authentication.
6Version your APIP2Deprecate old versions with a security timeline.
7Log all API accessP1Track who accessed what, when, and from where.

Reference: Tutorial #8: API Security

Secrets Management Checklist

#ItemPriorityDetails
1Never hardcode secrets in source codeP0Use environment variables at minimum.
2Add .env to .gitignoreP0Before your first commit.
3Use CI/CD secrets for pipelinesP0GitHub Actions secrets, GitLab variables.
4Install pre-commit hooks (gitleaks, detect-secrets)P1Catch secrets before they are committed.
5Use a secret manager in productionP1HashiCorp Vault, AWS Secrets Manager, GCP Secret Manager.
6Rotate secrets on a scheduleP190 days for passwords and API keys.
7Never log secretsP0Mask in logs and error messages.
8Commit .env.example with placeholder valuesP2Helps other developers set up the project.

Reference: Tutorial #9: Secrets Management

Security Headers Checklist

#ItemPriorityDetails
1Content-Security-PolicyP1Prevent XSS, clickjacking, and unauthorized resources.
2Strict-Transport-SecurityP1Force HTTPS for 1 year.
3X-Content-Type-Options: nosniffP1Prevent MIME-type sniffing.
4X-Frame-Options: DENYP1Prevent clickjacking.
5Referrer-Policy: strict-origin-when-cross-originP2Control referrer information.
6Permissions-PolicyP2Disable camera, microphone, geolocation if not needed.

Reference: Tutorial #10: Security Headers

Dependency and Supply Chain Checklist

#ItemPriorityDetails
1Use lockfiles for all package managersP0go.sum, package-lock.json, requirements.txt.
2Run vulnerability scans in CI/CDP0npm audit, govulncheck, pip-audit, Trivy.
3Enable Dependabot or RenovateP1Automated dependency updates.
4Pin exact dependency versionsP1No version ranges in production.
5Review new dependencies before addingP2Check maintenance status, license, and vulnerability history.
6Generate SBOMs for releasesP3Becoming required by regulation.

Reference: Tutorial #11: Dependency Scanning

Logging and Monitoring Checklist

#ItemPriorityDetails
1Log all authentication eventsP0Successes, failures, lockouts.
2Log all authorization denialsP1Detect privilege escalation.
3Never log sensitive dataP0Mask passwords, tokens, PII.
4Use structured logging (JSON)P1Easier to search and analyze.
5Centralize logsP1ELK, Loki+Grafana, or cloud logging.
6Set up alerts for brute force and anomaliesP110+ failed logins in 5 min from same IP.
7Define log retention policyP290 days hot, 1 year cold storage.

Reference: Tutorial #12: Logging and Monitoring

Container and Docker Checklist

#ItemPriorityDetails
1Run containers as non-rootP0USER directive in Dockerfile.
2Use minimal base imagesP1Alpine, distroless, or scratch.
3Scan images for vulnerabilitiesP0Trivy or Docker Scout in CI/CD.
4Never put secrets in DockerfilesP0Use mounted files or Docker secrets.
5Drop all capabilities, add only neededP1cap_drop: ALL in docker-compose.
6Use multi-stage buildsP1Smaller images, no build tools in production.
7Pin base image versionsP1Never use :latest in production.
8Set resource limits (CPU, memory)P2Prevent resource exhaustion.
9Do not expose unnecessary portsP1Only expose what clients need.

Reference: Tutorial #13: Container Security

Pre-Launch Security Review

Before going to production, walk through this abbreviated checklist:

Must-Have (P0)

  • HTTPS enabled with valid certificate
  • Passwords hashed with bcrypt or Argon2
  • Parameterized queries for all database access
  • Input validation on all user-facing endpoints
  • Authorization checked on every request (server-side)
  • Secrets not in source code or Docker images
  • .env in .gitignore
  • Rate limiting on authentication and API endpoints
  • JWT validation on every request
  • Containers running as non-root
  • No sensitive data in logs
  • Dependency vulnerability scan passing

Should-Have (P1)

  • Security headers configured (CSP, HSTS, X-Frame-Options)
  • CSRF protection for state-changing requests
  • CORS configured restrictively
  • Structured logging with centralized collection
  • Alerting for brute force and suspicious activity
  • Dependabot or Renovate enabled
  • Pre-commit hooks for secret detection
  • Docker images scanned and using minimal base

Nice-to-Have (P2+)

  • MFA support
  • Certificate pinning for mobile apps
  • SBOM generation
  • Audit trail for admin actions
  • Log retention policy documented

Security is a Journey

Security is not a one-time task. It is an ongoing process:

  1. Review this checklist at the start of every project
  2. Run dependency scans weekly (automate with Dependabot)
  3. Review logs and alerts weekly
  4. Update dependencies monthly
  5. Rotate secrets quarterly
  6. Conduct a security review annually (or when the architecture changes)

Series Complete

You have completed the entire Security for Developers series. You now have the knowledge to write secure code, prevent the most common attacks, and protect your users. Remember: most security breaches happen because developers skip the basics. Do not skip the basics.

Full series: Security for Developers