test: exercise XSS regressions in headless Chrome (#4)
This commit is contained in:
1 parent
e8dd03c4f5
commit
ffdbe4fbd0
3 files changed
+114
-2
No files matched your search
@@ -10,7 +10,7 @@ on `fix/issue-acceptance-and-migration-safety`.
|
||||
| Order | Issue | Implementation and acceptance | Status |
|
||||
| --- | --- | --- | --- |
|
||||
| 1 | [#2](https://git.mchus.pro/mchus/QuoteForge/issues/2) | Block foreign Host/Origin/Referer and cross-site browser requests in both routers; validate API body types; refuse saved-password reuse for a changed host/port/user. Middleware and real setup/runtime router tests reject attacks without changing saved credentials or user data. | Acceptance passed |
|
||||
| 2 | [#4](https://git.mchus.pro/mchus/QuoteForge/issues/4) | Move LOT-bearing cart/rental events to delegated listeners and escaped data attributes; escape BOM and sync output; share HTML escaping; render toast as text. Malicious LOT regression checks and template tests must pass. | Implemented |
|
||||
| 2 | [#4](https://git.mchus.pro/mchus/QuoteForge/issues/4) | Move LOT-bearing cart/rental events to delegated listeners and escaped data attributes; escape BOM and sync output; share HTML escaping; render toast as text. Malicious LOT regression checks and headless Chrome DOM checks pass. | Acceptance passed |
|
||||
| 3 | [#7](https://git.mchus.pro/mchus/QuoteForge/issues/7) | Require a fresh verified archive outside rotation before reset, refuse unsynced/legacy states without explicit force, use transactional deletion, remove environment-triggered reset. Verify refusal, ZIP restore, backup failure and rollback. | Implemented |
|
||||
| 4 | [#5](https://git.mchus.pro/mchus/QuoteForge/issues/5) | Persist TLS mode/CA in SQLite, expose setup controls, share policy across setup/sync/migration DSNs. Verify certificate trust, hostname checks, plaintext fallback policy and settings round-trip. | Implemented |
|
||||
| 5 | [#3](https://git.mchus.pro/mchus/QuoteForge/issues/3) | Keep each migration file in one session, execute verify headers before history insertion, propagate FK failures. Verify failed queries/checks never enter history. | Implemented |
|
||||
@@ -57,3 +57,14 @@ password reuse for a changed destination. Local reads still succeed. Saved
|
||||
credentials, project/configuration counts and the pending queue remain unchanged.
|
||||
The setup router construction was extracted without changing its routes so
|
||||
this regression exercises the same middleware registration as startup.
|
||||
|
||||
### Issue #4
|
||||
|
||||
`node scripts/tests/html-security-browser.cjs` passes in headless Chrome with
|
||||
an isolated temporary profile. It executes the actual template rendering
|
||||
functions in a browser DOM with controlled API responses. Both cart layouts,
|
||||
rental, parsed BOM, toast, pending sync errors, error history and repair errors
|
||||
preserve malicious strings as text. Real click/change/focus events preserve
|
||||
LOT values through delegated handlers; no injected elements or payload execution
|
||||
are observed. This is a rendering integration check, not a full application
|
||||
navigation test. Set `CHROME_BIN` outside macOS to select a Chrome executable.
|
||||
Reference in new issue
Block a user