Review finding
The source-policy scanner only walks .ts files under src, but the project tooling can bundle JavaScript if tracked JavaScript is added under the application source tree.
Evidence
tests/runtime/source-policy.ts:42 documents the scanner as returning every .ts file.
tests/runtime/source-policy.ts:47 implements walkTsFiles().
tests/runtime/source-policy.ts:59 includes only entries ending in .ts.
- The file header describes the policy as a scan over
src/**/*.ts, not over every source extension Vite may bundle.
Impact
Future tracked .js, .jsx, .mjs, .cjs, or .tsx files under src could bypass source-policy checks such as dynamic import, eval, or policy-boundary scans. There are no tracked JavaScript source files today, so this is a preventive process gap rather than a current exploit.
Recommended fix
Either formally ban bundled JavaScript source files under src, or expand the source-policy scanner to include every extension that can participate in the bundle.
Acceptance checks
- The repository has an explicit test or policy gate that rejects tracked unsupported source extensions under
src, or the scanner includes those extensions.
- If JavaScript is allowed, Q007-style tests prove forbidden dynamic import/eval patterns are detected in
.js fixtures.
- Comments and test names no longer describe the protected surface as only
src/**/*.ts unless that is the enforced rule.
Review finding
The source-policy scanner only walks
.tsfiles undersrc, but the project tooling can bundle JavaScript if tracked JavaScript is added under the application source tree.Evidence
tests/runtime/source-policy.ts:42documents the scanner as returning every.tsfile.tests/runtime/source-policy.ts:47implementswalkTsFiles().tests/runtime/source-policy.ts:59includes only entries ending in.ts.src/**/*.ts, not over every source extension Vite may bundle.Impact
Future tracked
.js,.jsx,.mjs,.cjs, or.tsxfiles undersrccould bypass source-policy checks such as dynamic import, eval, or policy-boundary scans. There are no tracked JavaScript source files today, so this is a preventive process gap rather than a current exploit.Recommended fix
Either formally ban bundled JavaScript source files under
src, or expand the source-policy scanner to include every extension that can participate in the bundle.Acceptance checks
src, or the scanner includes those extensions..jsfixtures.src/**/*.tsunless that is the enforced rule.