Skip to main content

Module zero_js

Module zero_js 

Source
Expand description

Zero-JavaScript Validation for WASM-First Applications (PROBAR-SPEC-012).

Validates that WASM applications contain NO user-generated JavaScript, CSS, or HTML. Zero-JavaScript Validation for WASM-First Applications (PROBAR-SPEC-012)

Validates that WASM applications contain NO user-generated JavaScript, CSS, or HTML. All web assets must be programmatically generated via probar-js-gen or typed builders.

§Toyota Way Application:

  • Poka-Yoke: Type system prevents user-injected code at compile time
  • Jidoka: Validation stops the line if unauthorized code detected
  • Andon: Clear error messages identify exactly what violated zero-JS policy

§Critical Defect Vectors Addressed:

  1. User-created JavaScript files
  2. Inline <script> tags not from WASM
  3. External CSS files not generated by builders
  4. HTML files without WASM generation markers

§References:

  • whisper.apr CLAUDE.md: “ABSOLUTE ZERO JAVASCRIPT”
  • DO-178C Section 6.3: Configuration management
  • OWASP: Third-party JavaScript injection prevention

Structs§

DangerousPatternViolation
Dangerous pattern violation
InlineScriptViolation
Inline script violation details
ZeroJsConfig
Zero-JS validator configuration
ZeroJsValidationResult
Zero-JS validation result
ZeroJsValidator
Zero-JavaScript validator for WASM-first applications

Enums§

ZeroJsError
Error type for zero-JS validation

Constants§

DANGEROUS_JS_PATTERNS
Dangerous patterns in JavaScript that should NEVER appear
FORBIDDEN_DIRECTORIES
Forbidden directory names that indicate non-WASM tooling
FORBIDDEN_EXTENSIONS
Forbidden file patterns for zero-JS WASM applications
FORBIDDEN_FILES
Forbidden files that indicate JavaScript tooling