StackPractices

security

Practical resources about security for software engineers.

107 results

Protecting Applications and Data

Security is not a checkbox — it is a mindset. From input validation and XSS prevention to secrets management and compliance frameworks, every layer of the stack needs defensive design.

Browse recipes for implementing Content Security Policy, encrypting data at rest and in transit, managing API keys, and conducting dependency audits. Guides also cover OWASP Top 10 mitigations and secure coding practices by language.

intermediate

Implement API Rate Limiting with Redis

Protect APIs from abuse using token bucket and sliding window algorithms with Redis, including...

intermediate

WebSocket Authentication and Security Patterns

How to authenticate WebSocket connections, implement token validation, and handle authorization for...

intermediate

How to Hash Passwords Securely (Python, JavaScript, Java)

Learn how to hash and verify passwords with bcrypt, Argon2, and PBKDF2. Practical examples in...

advanced

Rate Limiting with Redis Token Bucket Algorithm

Implement a distributed token bucket rate limiter using Redis atomic operations for API throttling...

intermediate

Container Image Security Scanning with Trivy

Scan Docker images for vulnerabilities, misconfigurations, and secrets using Trivy, integrate...

intermediate

Scan Docker Images for CVEs with Trivy and Grype

Scan Docker images for vulnerabilities before deployment using Trivy and Grype. Covers CI...

intermediate

Docker Network Isolation and Inter-Container Security

Secure inter-container communication with custom Docker networks, network segmentation, and access...

intermediate

Docker Secrets Management Without Hardcoding Credentials

Inject secrets into containers using Docker secrets, env files, and external secret managers...

beginner

Build Responsive Email Templates with MJML

Create cross-client responsive email templates with MJML, compile them with TypeScript, inject live...

email frontend mjml handlebars
intermediate

Validate and Sanitize GraphQL Input Types Server-Side

Implement centralized input validation in GraphQL using custom validation functions, Zod schemas,...

beginner

Secure APIs with HTTP Security Headers

How to configure essential security headers like HSTS, CSP, and X-Frame-Options to protect APIs and...

intermediate

Configure iptables Firewall Rules with Bash

Set up basic firewall rules with iptables and bash scripts

intermediate

SSH Key Management in Bash

Generate, rotate, and distribute SSH keys with bash scripts

intermediate

Container Security Scanning

Scan container images for vulnerabilities, misconfigurations, and secrets with Trivy, Clair, and...

beginner

Protect Web Forms Against CSRF Attacks

How to prevent Cross-Site Request Forgery attacks using synchronizer tokens, SameSite cookies, and...

intermediate

Data Privacy and GDPR Compliance

Implement data privacy controls, consent management, data anonymization, and GDPR-compliant data...

beginner

Schema-Based Data Validation with Zod in TypeScript

Validate and sanitize incoming data using Zod schemas with TypeScript inference, custom...

intermediate

Implement Encryption at Rest for Databases and File Storage

How to encrypt sensitive data before storing it in databases, object storage, and backups using...

beginner

Escape HTML Entities

How to escape HTML entities to prevent XSS attacks in Python, Java, and JavaScript.

intermediate

HMAC Request Signing

Secure API requests with HMAC-SHA256 signatures to ensure integrity and authenticity.

No results found.