How k2aep1/secureconfigai- works
SecureConfigAI assesses Windows endpoint configuration through evidence collection, deterministic control evaluation, and reporting; AI is an advisory explanation layer only. The scanner produces evidence, the backend ingests and scores it, and the React client presents results and administrative capabilities. The README documents the overall assessment flow and major capabilities; sampled source and the SOURCE INDEX support the specific module relationships shown. Some backend routes and services were not excerpted, so their internal calls are not expanded.
Main entry points: client.ts HTTP API client · scan_service.py Assessment ingestion · cli.py Scan CLI · scans.py Scan endpoints
Components 31
Evidence scanner
- Scan CLI
scanner/cli.py - Collector orchestration
scanner/base/collector.py - Windows collectors
scanner/collectors.py - Evidence normalizer
scanner/normalizer.py - Evidence snapshot
scanner/snapshot.py
Assessment backend
- API router
backend/app/api/v1/router.py - Scan endpoints
backend/app/api/v1/scans.py - Scan job manager
backend/app/services/jobs.py - Assessment ingestion
backend/app/services/scan_service.py - Control baseline
backend/app/services/baseline.py - Deterministic scoring
backend/app/services/scoring.py - Report generation
backend/app/services/report_service.py - AI explanation API
backend/app/api/v1/ai.py - AI provider client
backend/app/services/ai_client.py
Identity and operations
- Authentication API
backend/app/api/v1/auth.py - Token service
backend/app/services/token_service.py - Audit chain
backend/app/core/audit.py - Database sessions
backend/app/core/database.py - Application records
backend/app/db/models.py
Web client
- Application routes
frontend/src/App.tsx - Session provider
frontend/src/auth/SessionProvider.tsx - HTTP API client
frontend/src/api/client.ts - Query state
frontend/src/state/queryClient.ts - Scan and result views
frontend/src/pages/Scans.tsx - Dashboard view
frontend/src/pages/Overview.tsx - Reports view
frontend/src/pages/Reports.tsx - Administration views
frontend/src/pages/Admin.tsx
Other components
- Security operator
- Windows endpoint
- PostgreSQL
- Authenticated user
Connections 32
- Security operator → Scan CLI: starts scan
- Windows endpoint → Windows collectors: provides evidence
- Scan CLI → Collector orchestration: runs collectors
scanner/cli.py - Collector orchestration → Windows collectors: dispatches to
scanner/collectors.py - Scan CLI → Evidence normalizer: normalizes results
scanner/cli.py - Scan CLI → Evidence snapshot: writes snapshot
scanner/cli.py - Evidence snapshot → Scan endpoints: uploads evidence
- API router → Scan endpoints: mounts routes
backend/app/api/v1/router.py - Scan endpoints → Scan job manager: starts jobs
- Scan job manager → Assessment ingestion: processes evidence
- Scan endpoints → Assessment ingestion: ingests uploads
- Assessment ingestion → Control baseline: loads controls
backend/app/services/scan_service.py - Assessment ingestion → Deterministic scoring: evaluates controls
backend/app/services/scan_service.py - Deterministic scoring → Control baseline: uses baseline
backend/app/services/scoring.py - Assessment ingestion → Application records: stores assessment
backend/app/services/scan_service.py - Database sessions → PostgreSQL: connects to
backend/app/core/database.py - Database sessions → Application records: provides sessions
backend/app/core/database.py - Report generation → Deterministic scoring: uses assessment
backend/app/services/report_service.py - AI explanation API → AI provider client: requests explanation
- AI explanation API → Application records: uses findings
- Authentication API → Token service: manages tokens
backend/app/api/v1/auth.py - Authentication API → Audit chain: records actions
backend/app/api/v1/auth.py - Token service → Application records: persists tokens
backend/app/services/token_service.py - Authenticated user → Application routes: uses client
frontend/src/App.tsx - Application routes → Session provider: gates pages
frontend/src/App.tsx - Session provider → HTTP API client: requests session
frontend/src/auth/SessionProvider.tsx - Query state → HTTP API client: handles API errors
frontend/src/state/queryClient.ts - Scan and result views → HTTP API client: loads scan data
- Dashboard view → HTTP API client: loads dashboard data
- Reports view → HTTP API client: requests reports
- Administration views → HTTP API client: requests administration
- Security operator → Authenticated user: reviews results