DevOps Pipeline

Web Vuln Scanner — Containerized Deploy

Took a Python security tool and shipped it: FastAPI wrapper, slim-Python Docker image, pinned deps, and a one-click Render deploy.

Visit Project
Web Vuln Scanner — Containerized Deploy — view 1
Web Vuln Scanner — Containerized Deploy — view 2

Overview

Heads up: the backend runs on Render's free tier and sleeps after 15 min of inactivity. First scan after a cold period may take 30-60s to wake it up. The DevOps half of the Web Vuln Scanner: wrapped the Python scanner engine in a FastAPI process, Dockerized it with a slim Python base, caught the same scars as Spider_Commerce (lockfile/requirements drift between local venv and the container, build-cache invalidation when deps change, PATH/entrypoint mismatches), added a which-uvicorn sanity check inside the build so missing dependencies fail loudly, and shipped it to Render with a health-check endpoint for the keep-alive pinger. One Dockerfile, one compose file, one push to deploy.

Tech Stack

DockerPython 3.12 slimFastAPIUvicornRenderdocker compose

Process

  • Wrote a Dockerfile against python:3.12-slim with explicit COPY requirements.txt → pip install → COPY . layering so dep installs cache across code changes.
  • Added a RUN which uvicorn && uvicorn --version sanity step so a missing or broken dep fails the build loudly instead of at container start.
  • Fixed the classic scar: uvicorn/fastapi were installed into the local venv but never pinned to requirements.txt — added them, rebuilt with --no-cache to bust the stale pip layer.
  • Wrote a .dockerignore covering venv/ (not just .venv/), __pycache__, .git, and local notes so the build context stays small and the image doesn't ship Windows binaries into Linux.
  • Added a /health endpoint on the API, pointed Render's health check at it, and set up a cron-job.org ping so the container stays warm between scans.
  • Deployed to Render with the Docker runtime at the repo root, env-var free for now — safety gate (authorization checkbox + resource caps) lives in the app layer.