Repository navigation
feat: add CSP-safe Web Worker scanner entry point - #287
Conversation
|
@collinsezedike Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…r-csp # Conflicts: # etc/sdk.api.md
truthixify
left a comment
There was a problem hiding this comment.
The protocol version is declared but never travels in either worker message envelope, and neither validator nor handler rejects a version mismatch. That means incompatible host and worker builds can still exchange messages despite the compatibility guarantee. Include the version in requests and responses, validate it at both boundaries, and cover rejected mismatches.
truthixify
left a comment
There was a problem hiding this comment.
Issue #269 ownership verified: collinsezedike is the current assignee and PR author. Malware preflight passed for head 79762b0. The new commit only updates the bundle-size baseline, so the prior protocol blocker remains: the version constant is not carried through scanner requests and responses, and validation does not reject a mismatched peer version. Current CI is also failing.
6c919d8 to
c769187
Compare
truthixify
left a comment
There was a problem hiding this comment.
Reviewed exact head c769187. Remote malware preflight and full changed risk-file scan passed; linked issue #269 is assigned to @collinsezedike; required checks pass. The protocol-version blocker is resolved.
Resolves #269.
Semver: minor. Adds a new package entry point and new root exports; no existing export changes.
Changes:
@wraith-protocol/sdk/scanner/workerfor off-main-thread scanningstart,progress,cancel,result,failurecreateWorkerScanner()client withAbortSignalcancellation, progress forwarding, typedScannerWorkerErrorexposeScannerWorker()for explicit controleval,Function, blob URLs; verified bypnpm test:worker-csprunning bundles witheval/FunctionpoisonedTesting:
test/scanner/worker.test.tscover protocol, cancellation, progress and equivalence to the main-thread scannerpnpm build,pnpm api:check,pnpm sizeandpnpm test:worker-cspall passDocs:
docs/guides/worker-scanner.mdxwith protocol, ordering and Vite/Next/plain setup