Security isn't just for security teams. Every developer should understand common vulnerabilities and how to prevent them.
The OWASP Top 10
OWASP publishes a list of the most critical security risks. Here are three to know first, with their place in the 2021 list:
A01: Broken Access Control
Users can access data they shouldn't. Test by:
- Trying to access other users' resources
- Manipulating IDs in URLs
- Testing API endpoints directly
A03: Injection
Untrusted data is sent to an interpreter. Prevent with:
- Parameterized queries
- Input validation
- ORM usage (like Prisma)
Cross-Site Scripting (XSS), also under A03
Scripts are injected into web pages. Since 2021 OWASP counts this as a kind of injection. Prevent with:
- Output encoding
- Content Security Policy
- React's automatic escaping
Security Testing Tools
We use these tools regularly:
- OWASP ZAP: Free automated security scanner
- Burp Suite: Professional penetration testing tool
- Snyk: Dependency vulnerability scanning
Integrating Security into CI/CD
Security testing should be automated:
- name: Run security scan
run: |
docker run -t ghcr.io/zaproxy/zaproxy:stable \
zap-baseline.py -t https://your-app.com
Security is everyone's responsibility. Build it into your process, not as an afterthought.