# Benchside: OWASP ASVS 4.0 Level 1 review

Benchside is a static, client-only application: no server code, no accounts, no database, no third-party scripts. Many ASVS sections (authentication, session management, server-side access control, database injection) therefore have nothing to apply to. The table covers every L1 area that does apply.

| ASVS area | Control | Status |
|---|---|---|
| V1 Architecture | Static site; trust boundary is the browser; no secrets shipped | Pass |
| V5.1 Input validation | Name limited to 60 characters with control and markup characters stripped; LRS URL must match https pattern; class codes validated by pattern, size (3 kB) and per-field type and range | Pass |
| V5.3 Output encoding | Every dynamic value is escaped before it reaches HTML or SVG (`esc`), or written with `textContent` | Pass |
| V5.5 Deserialisation | Stored state is parsed and rebuilt through a schema whitelist (`clean`), so tampered or prototype-polluting storage is discarded | Pass |
| V7 Error handling | Storage, clipboard, network and service-worker failures are caught and reported in plain language; no stack traces shown | Pass |
| V8 Data protection | Data stays on device; LRS key held in memory for one request and never stored; `credentials:'omit'`, `no-referrer` | Pass |
| V9 Communications | HSTS and `upgrade-insecure-requests` in `deploy/_headers.txt` (deploy as `_headers`); LRS accepts https only | Ready (hosting) |
| V10 Malicious code | No `eval`, no `Function`, no remote scripts, no inline event handlers; all JavaScript from first-party files | Pass |
| V12 Files | No uploads | Not applicable |
| V13 API | Only outbound xAPI POST to a user-supplied https endpoint | Pass |
| V14.4 HTTP headers | CSP (`script-src 'self'`, `frame-ancestors 'none'`, `object-src 'none'`), nosniff, Referrer-Policy, Permissions-Policy, COOP, CORP, X-Frame-Options | Ready (hosting) |
| V14.2 Dependencies | No third-party runtime dependencies; build uses Node standard library only | Pass |

**Residual items:** `style-src` allows inline styles because chart widths are set in markup; this does not allow script execution. Security contact: `/.well-known/security.txt`. Run an external scan (e.g. OWASP ZAP baseline) against the production URL after deployment and attach the report here.

## Research workspace controls (November 2026)

- V6 Stored cryptography: AES-GCM 256 via Web Crypto; PBKDF2-SHA-256 with 250 000 iterations and a random salt; new IV per write; no key or passphrase persisted. Gap: no passphrase strength meter beyond an 8-character minimum.
- V5 Validation: imported files are capped at 20 MB, must carry `app:"benchside-research"`, and every field, id and value is type-checked and length-limited; all rendering goes through HTML escaping.
- V5.3 Output encoding: CSV cells starting with `= + - @` tab or carriage return are prefixed with an apostrophe to stop formula injection.
- V8 Data protection: no network calls from the research module; data stay in the origin's IndexedDB. Gap: a device without a screen lock exposes unencrypted projects; the UI recommends encryption and a phone PIN.
