Work 03

CSW, Credential Security Watcher

Credential hygiene
Oct 2026

CSW answers four questions from metadata alone: what certificates and credentials exist and who owns them, what expires or has not been rotated, which risks need action and why, and what CSW can prove it observed and when. The current build runs against a synthetic provider only.

The CSW Risk findings page in its hosted demo: a notice that this is a static demo over synthetic data, a warning that two sources’ latest collection was incomplete, then run details and counts of open findings by severity, asset type and environment tier.
CSW risk findings overview, hosted demo, synthetic data. The amber notice states that incomplete collection means the counts are not a claim that the rest of the estate is clean.

01 Overview

CSW is a standalone application that observes certificate and credential metadata (ownership, expiration, rotation posture, state changes and actionable risk) and produces auditable evidence of what it observed and when. Certificates are handled as public X.509 material only. Credentials are handled as metadata: identifiers, kinds, holders, timestamps and scopes, never values.

The backend is Python with FastAPI, PostgreSQL and SQLAlchemy; the interface is Next.js. The repository defines four roles (observer, operator, inventory administrator, auditor) with server-side authorization, and a Docker Compose stack runs the database, migrations, seed, API, worker and web application.

02 The secret boundary

The central design constraint is that CSW is not a secret vault. It never intentionally retrieves, stores, transmits, displays, exports, screenshots or logs secret values, and any private key that reaches it is rejected rather than stored. The contract is enforced by closed provider schemas, a forbidden-name rule, nine detectors and whole-run rejection with quarantine.

Capabilities that would need a value are refused as unsupported. Where a key pair is involved, only public-key fingerprints are kept. A hostile-provider test supplies value-bearing records through thirty vectors to show that no value enters the system.

03 Architecture

Observations are immutable and change-compressed, with a per-field knowledge state that distinguishes a value, an unknown, a field the source cannot report and a field withheld from the viewer’s role. Presence is derived from complete collection runs only, so a failed or partial run never marks anything absent.

Authorization is deny-by-default through a route registry checked at startup. Queries are written so that filters, sorts, counts and cursors reveal nothing about objects the caller may not see, and the repository records an authorization test matrix of every route, field and object type against every role.

Module boundaries are enforced mechanically: the risk and watch engines are pure and depend only on the domain, only persistence imports the database driver, and exports can never reach a provider.

04 Risk, watches and evidence

A deterministic, versioned risk policy (26 rules in policy v1, 29 in policy v2) evaluates certificates, credentials, ownership, application lifecycle and source completeness. Each finding records its severity, rationale and supporting facts. A result that could not be evaluated because a needed fact is unknown is reported as such and never counted as passing, and CSW computes no single risk score.

Watches detect rotation, threshold crossings and finding changes on a PostgreSQL job queue, with in-app notifications re-authorized at delivery. Evidence exports (CSV and JSON, twelve datasets) are built asynchronously, refused rather than truncated above 50,000 rows, and carry a permanent SHA-256 digest recorded in the audit log.

The hosted demo is a static build that replays answers captured from the real application over synthetic data at build time. It runs no authorization, worker or persistence, and its personas choose which captured answers are shown; they are not access control.

05 Testing and evaluation

The repository’s hosted-demo evidence report records a full backend run on PostgreSQL of 3,149 passing tests with none failing, alongside the frontend suite, a Playwright scan and eight repository gates with a self-test that proves each gate can fail. Continuous integration runs the same checks.

Each development stage has an evidence report in the repository, and the project status file marks capabilities as validated only where a synthetic end-to-end scenario backs the claim.

06 Known limitations

CSW has no real-system providers: only a deterministic synthetic provider exists, and the application refuses to start unless its environment is dev, test or demo. It performs no trust-store or revocation validation, and chain relations are cryptographic only. Notifications are in-app only, with no email, chat, paging or webhook delivery, and exports are CSV and JSON only.

The repository states that the strongest state this program can reach is a production-shaped, synthetic-data-validated demo candidate awaiting real provider validation, and that CSW is not production-ready.

The CSW Certificates page: filters for kind, chain and presence above a table of certificates with expiry date, derived validity, chain status, SHA-256 fingerprint, application, owner and source.
CSW certificate inventory, hosted demo, synthetic data. Fields a source did not report are labelled as such, not left blank.