Last updated: 2026-03-14 Maintained by: Clovr Labs Engineering
CreditCheck Dashboard is an internal B2B tool for the Clovr Labs Business Development team. It processes PII and financial data (names, emails, income, loan amounts, credit scores) of Open Banking lead applicants. Access is restricted to authorised team members only.
| Secret | Location | Rotation |
|---|---|---|
| Dashboard password hash | VITE_AUTH_PASSWORD_HASH in .env |
Rotate every 90 days or on team member departure |
| Storage encryption key | VITE_STORAGE_KEY in .env |
Rotate if suspected exposure (invalidates stored data) |
| Live API token | VITE_API_TOKEN in .env |
Rotate every 90 days or on exposure |
Rules:
.envis listed in.gitignore— never commit it.- Use
.env.exampleas a template; it contains no real secrets. - On a new machine, copy
.env.example→.envand fill in values. - If a secret is accidentally committed, rotate it immediately and treat the old value as compromised.
- For production deployments, inject env vars via the hosting platform (Vercel, Railway, etc.) rather than a
.envfile.
- On page load,
AuthGatecheckssessionStoragefor a valid session token (8h TTL). - If no valid session exists, a password prompt is shown.
- The submitted password is SHA-256 hashed client-side and compared to
VITE_AUTH_PASSWORD_HASH. - On match, an expiry record is written to
sessionStorage.
Limitations:
- This is a client-side gate only — it does not involve a server-side session.
VITE_AUTH_PASSWORD_HASHis embedded in the client bundle. A determined attacker who can read the minified bundle can attempt offline brute force. Mitigate with a long random passphrase (20+ chars) and network-level access controls (VPN, IP allowlist).- For higher assurance, replace this with OAuth2/OIDC (Google Workspace, Azure AD, etc.).
- The live data endpoint (
VITE_API_ENDPOINT) must use HTTPS. HTTP is not accepted. - All API requests include
X-Requested-With: XMLHttpRequestandX-CSRF-Tokenheaders. Authorization: Bearer <token>is included whenVITE_API_TOKENis set.
- Partner configurations, settings, and starred leads are encrypted in
localStorageusing AES-GCM 256-bit with a PBKDF2-derived key (100,000 iterations, SHA-256). - Lead data from XLSX uploads is held in React state only (memory) — not persisted to disk.
- Live data fetched from the API is also memory-only.
- A consent acknowledgement modal is shown on every browser session before accessing lead data.
- Data retention limit: 90 days (configurable in
GdprBanner.jsx). - The "Clear All Data" button in the navbar and the retention warning banner both trigger immediate deletion of all stored data.
- All data exports are logged to the audit trail (see below).
- No PII is transmitted to third-party analytics or logging services.
Sensitive actions are recorded with the auditLog() utility (src/utils/auditLog.js):
| Action | Logged metadata (no PII) |
|---|---|
data_upload |
file size, row count, truncated flag |
lead_export |
format, row count, field names, category filters |
partner_edit |
partner ID, action type |
data_cleared |
timestamp |
In development: events print to console.info.
In production: if VITE_AUDIT_ENDPOINT is set, events are POSTed there. Otherwise, they
are queued in sessionStorage (up to 100 events) for retrieval.
A CSP meta tag in index.html restricts resource loading:
- Scripts:
'self'only (XLSX library is now bundled, no CDN) - Styles:
'self'+'unsafe-inline'(required for inline-style React components) + Google Fonts - Connections:
'self'+ the API endpoint domain - Frames: blocked (
frame-ancestors 'none')
To harden further, migrate inline styles to CSS classes and remove 'unsafe-inline'.
| Risk | Mitigation | Accepted? |
|---|---|---|
| Client-side auth only | Password hash in bundle; mitigate with VPN/IP allowlist | ✅ Accepted for internal tool |
VITE_STORAGE_KEY in bundle |
Protects against casual snooping, not bundle analysis | ✅ Accepted — add server-side auth for stronger guarantee |
'unsafe-inline' in CSP |
Required for current inline-style architecture | |
| XLSX library (v0.18.5) | Not actively maintained upstream; monitored via npm audit:deps |
|
| No server-side rate limiting | Client-side 5-minute cooldown only |
If you discover a security vulnerability in this project:
- Do not open a public GitHub issue.
- Email the engineering team at: [email protected] (or your internal security contact)
- Include: description of the vulnerability, steps to reproduce, and potential impact.
- We aim to respond within 48 hours and resolve critical issues within 7 days.
Run npm run audit:deps to check for known CVEs in the dependency tree.
This command is recommended before every production deployment.
A finding of high or critical severity must be resolved before deploying.