Mutual TLS between internal services with Nginx

mTLS is one of the cleanest ways to tighten internal service trust when you control both sides of the connection. I use it for sensitive east-west traffic where bearer credentials alone are too weak. Certificate lifecycle and revocation planning matte

Incident response severity matrix and first hour checklist

The first hour of an incident should be structured enough that teams do not invent process under pressure. I keep severity definitions, communication paths, and containment priorities explicit. A good checklist reduces panic and preserves evidence at

Interactive Plotly figures for exploratory stakeholder reviews

Static plots are fine for papers, but product and business reviews often benefit from interactive filtering and hover details. I use Plotly when I need fast exploratory dashboards without spinning up a full app. It is especially useful for cohort anal

PostgreSQL hardening with pg_hba and strict role separation

Database hardening starts with connection control and role hygiene. I separate app, migration, reporting, and admin roles so compromise impact is constrained. The default question is not what permissions are convenient, but which ones are actually nec

SQL window functions for feature extraction and behavioral ranking

A surprising amount of feature engineering is best done in SQL before Python ever runs. ROW_NUMBER, LAG, rolling windows, and partitioned aggregates are ideal for deriving customer behavior signals close to the source. I use SQL here when it reduces m

Preventing path traversal in download endpoints

Any endpoint that reads from disk needs path normalization and strict base-directory enforcement. I never trust user-supplied file names and I avoid passing them straight into shell commands. Safe file access is mostly about refusing to be clever.

Dependency vulnerability scanning for Ruby and Node projects

Known vulnerable dependencies are one of the easiest attack paths to close. I scan lockfiles in CI, fail builds on high-severity issues that have fixes, and document exceptions tightly. The goal is not zero alerts at any cost; the goal is fast visibil

Redis hardening with ACLs protected mode and network isolation

Redis should not be assumed safe just because it sits inside a VPC or private subnet. I enable authentication or ACLs, bind deliberately, and keep the service off public networks entirely. Fast infrastructure becomes dangerous infrastructure when team

Trivy image scanning in pull request pipelines

I scan container images before they ever reach a registry promotion step. Trivy gives quick visibility into OS packages, language dependencies, and misconfiguration issues in IaC. The important part is failing only on risk that the team is prepared to

CSRF protection for Rails and JSON APIs

CSRF is still relevant whenever browsers automatically attach credentials. I keep standard anti-forgery tokens on server-rendered forms and use same-site cookies plus explicit bearer tokens for SPA APIs. The key is matching the defense to the authenti

A B testing analysis with confidence intervals and guardrails

Experiment analysis should not stop at a binary win or lose label. I calculate uplift, confidence intervals, and guardrail metrics like latency or refund rate before recommending rollout. The point of the analysis is decision quality, not statistical

Security focused CORS configuration for browser APIs

CORS is not an authentication control, but bad CORS settings still widen attack surface unnecessarily. I allow exact origins, restrict methods and headers, and avoid wildcard credentials combinations entirely. If the front-end origin list is unclear,