added the phase 3 docker stuff

This commit is contained in:
Travis 2026-04-18 12:51:12 -04:00
parent 07f87d9700
commit 47f48873e0
3 changed files with 137 additions and 0 deletions

36
templates/Dockerfile Normal file
View File

@ -0,0 +1,36 @@
# Zero-Check Container Verification Template
# Copy this into your project and adjust as needed.
#
# Usage:
# docker build -t project-verify .
# docker run --rm project-verify
# --- Python Projects ---
FROM python:3.12-slim AS python-verify
WORKDIR /app
COPY requirements*.txt pyproject.toml* ./
RUN pip install --no-cache-dir -r requirements.txt 2>/dev/null \
|| pip install --no-cache-dir . 2>/dev/null \
|| echo "No Python dependencies to install"
COPY . .
RUN pip install pytest pytest-cov
CMD ["pytest", "--cov", "--cov-report=term-missing", "-q"]
# --- Go Projects ---
# Uncomment this block and comment out the Python block above
#
# FROM golang:1.22-alpine AS go-verify
#
# WORKDIR /app
#
# COPY go.mod go.sum* ./
# RUN go mod download
#
# COPY . .
#
# CMD ["go", "test", "-cover", "./..."]

View File

@ -0,0 +1,54 @@
# Architect Sweep Checklist
Run this review after the gauntlet is green and container verification passes.
Timebox to 5 minutes. Focus on intent, not syntax.
## Pre-review
- [ ] Pull up the diff: `git diff <last-clean-baseline>..HEAD`
- [ ] Confirm `validate/results.json` shows all checks passed
## Outbound calls
- [ ] Search for `requests`, `httpx`, `urllib`, `http.client`, `net/http`
- [ ] Every outbound call has a clear, expected destination
- [ ] No unexpected domains or IPs
- [ ] No data being sent that shouldn't be (tokens, user data, telemetry)
## Auth and access control
- [ ] No `try/except: pass` around auth logic
- [ ] No commented-out auth decorators or middleware
- [ ] No hardcoded credentials, even "temporary" ones
- [ ] Route protection is consistent (no unprotected admin endpoints)
## Obfuscation
- [ ] No unexplained Base64 or hex-encoded strings
- [ ] No dynamically constructed URLs from encoded parts
- [ ] No eval(), exec(), or subprocess with string interpolation
## Dependency changes
- [ ] Any new dependencies are real, well-known packages
- [ ] No typosquatting (check spelling against PyPI/Go modules)
- [ ] Version pins are present where expected
## Test quality
- [ ] Tests assert actual behavior, not just `assert True`
- [ ] Tests have meaningful names describing what they verify
- [ ] No tests that just call a function without checking the result
- [ ] Mock boundaries are at external integration points, not internal logic
## Architecture
- [ ] External integrations are behind clean interfaces (not scattered)
- [ ] No new global state or singletons without justification
- [ ] Error handling is specific, not broad exception swallowing
- [ ] File/network resources are properly closed
## Final decision
- [ ] **APPROVE** — code is safe to promote
- [ ] **REJECT** — document reason, kick back to LLM or fix manually

47
templates/compose.yml Normal file
View File

@ -0,0 +1,47 @@
# Zero-Check Tier 2 Integration Test Template
# Copy this into your project and uncomment the services you need.
#
# Usage:
# docker compose -f docker-compose.verify.yml up --build --abort-on-container-exit
# docker compose -f docker-compose.verify.yml down -v
services:
app:
build:
context: .
dockerfile: ./Dockerfile
depends_on:
- db
environment:
- DATABASE_URL=postgresql://testuser:testpass@db:5432/testdb
# - REDIS_URL=redis://redis:6379/0
command: ["pytest", "--cov", "--cov-report=term-missing", "-q"]
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testdb
tmpfs:
- /var/lib/postgresql/data
# --- Uncomment services as needed ---
# redis:
# image: redis:7-alpine
# tmpfs:
# - /data
# mongo:
# image: mongo:7
# environment:
# MONGO_INITDB_ROOT_USERNAME: testuser
# MONGO_INITDB_ROOT_PASSWORD: testpass
# tmpfs:
# - /data/db
# rabbitmq:
# image: rabbitmq:3-alpine
# tmpfs:
# - /var/lib/rabbitmq