How simplyy-shadin/secureflow-devsecops works
SecureFlow is both a small FastAPI identity service and a hands-on application-security/DevSecOps project. Its main runtime path is client request → API routing → registration or login, with authenticated profile reads passing through bearer-token validation before accessing the user store. The README also documents security gates, hardened container deployment, signed release evidence, and a digest-pinned Kubernetes deployment, so these product capabilities appear as separate branches. Runtime call edges cite source excerpts; pipeline and deployment relationships are documented in the README, not inferred from unsampled workflow or deployment files.
Main entry points: main.py FastAPI app · auth.py Auth routes · database.py Database sessions · dependencies.py Auth dependencies
Components 22
API runtime
- FastAPI app
app/main.py - Auth routes
app/api/auth.py - Profile route
app/api/users.py - Request and response schemas
app/schemas - Security headers
app/security/headers.py
Identity and data
- Auth dependencies
app/api/dependencies.py - Password hashing
app/security/password.py - JWT tokens
app/security/tokens.py - Runtime settings
app/core/config.py - Database sessions
app/db/database.py - User records
app/db/models.py - SQLite database
Security assurance
- Security gates
.github/workflows - Semgrep rules
security/semgrep/secureflow.yml - Threat model
docs/threat-model.md
Release and deployment
- Hardened container
Dockerfile - Release workflow
.github/workflows/release-image.yml - GHCR image
- Signed release evidence
- Kubernetes deployment
deploy/k8s
Other components
- API client
- JWT signing key
Connections 27
- API client → FastAPI app: sends requests
README.md - FastAPI app → Auth routes: registers routes
app/main.py - FastAPI app → Profile route: registers routes
app/main.py - FastAPI app → Security headers: adds middleware
app/main.py - FastAPI app → Database sessions: creates tables
app/main.py - Auth routes → Request and response schemas: validates and returns
app/api/auth.py - Auth routes → Password hashing: hashes and verifies
app/api/auth.py - Auth routes → JWT tokens: creates token
app/api/auth.py - Auth routes → User records: reads and writes
app/api/auth.py - Auth routes → Runtime settings: reads settings
app/api/auth.py - Profile route → Auth dependencies: requires current user
app/api/users.py - Profile route → Request and response schemas: returns profile
app/api/users.py - Auth dependencies → JWT tokens: validates token
app/api/dependencies.py - Auth dependencies → Database sessions: gets session
app/api/dependencies.py - Auth dependencies → User records: loads user
app/api/dependencies.py - Database sessions → Runtime settings: reads database URL
app/db/database.py - Database sessions → SQLite database: connects to
README.md - User records → Database sessions: uses ORM base
app/db/models.py - JWT tokens → Runtime settings: gets signing settings
app/security/tokens.py - Runtime settings → JWT signing key: loads key from
app/core/config.py - FastAPI app → Security gates: validated by
README.md - Security gates → Semgrep rules: runs custom rules
README.md - Threat model → Security gates: documents risk controls
- Hardened container → FastAPI app: packages service
README.md - Release workflow → GHCR image: publishes image
README.md - Release workflow → Signed release evidence: creates signed evidence
README.md - GHCR image → Kubernetes deployment: supplies pinned image
README.md