registry  /  @opentf/web-docs  /  0.6.0

@opentf/web-docs@0.6.0

Documentation-site generator for OTF Web — themed shell components (sidebar, TOC, callouts, tabs), a build-time nav generator, and a default light/dark theme.

AI Security Review

scanned 2h ago · by lpm-firewall-ai

No confirmed malicious attack surface. The package provides docs UI components and build-time generators for nav, posts, feeds, last-updated metadata, llms text, and Pagefind search indexes.

Static reason
High-risk behavior combination matched malicious policy.
Trigger
Importing components or running the host docs build/dev toolchain with @opentf/web-docs build integration.
Impact
Build reads project docs metadata/pages and may write dist/pagefind search files; no exfiltration or unconsented control-surface mutation identified.
Mechanism
docs-site generation with local filesystem reads, git metadata lookup, and same-origin Pagefind runtime loading
Rationale
Static inspection shows the scanner findings are explained by legitimate docs build behavior: dynamic imports load generated same-origin Pagefind assets or project-owned metadata, and git subprocesses compute last-updated timestamps. With no lifecycle hooks, exfiltration, persistence, destructive behavior, or AI-agent control-surface mutation, this should be marked clean.
Evidence
package.jsonindex.jscomponents/Search.jsxbuild/frontmatter.jsbuild/index.jsbuild/pagefind.jsbuild/docs-nav-plugin.jsbuild/blog-posts-plugin.jsbuild/last-updated-plugin.jsbuild/last-updated.jsbuild/feed.jsbuild/llms.jsapp/**/page.{mdx,md,jsx,tsx}app/**/_meta.{js,mjs,json}dist/pagefind
Network endpoints3
github.com/Open-Tech-Foundation/Web-App-Framework.gitgithub.com/Open-Tech-Foundation/Web-App-Framework#readmegithub.com/Open-Tech-Foundation/Web-App-Framework/issues

Decision evidence

public snapshot
AI called this Clean at 93.0% confidence as Benign with low false-positive risk.
Evidence for block
  • build/last-updated*.js invoke git via execFileSync at build/dev time.
  • build/docs-nav-plugin.js dynamically imports project _meta.js files during build.
Evidence against
  • package.json has no preinstall/install/postinstall hooks and no bin entry.
  • components/Search.jsx imports only /pagefind/pagefind.js from the built same-origin site on user search.
  • build/frontmatter.js contains only an optional BOM match, not bidi control obfuscation.
  • No credential/env harvesting, destructive file operations, persistence, or external exfiltration endpoints found.
  • Filesystem reads and Pagefind writes are package-aligned docs build behavior.
Behavioral surface
Source
ChildProcessDynamicRequireFilesystemShell
Supply chain
HighEntropyStringsUrlStrings
ManifestNo manifest risk signals triggered.
scanned 45 file(s), 92.7 KB of source, external domains: www.w3.org

Source & flagged code

3 flagged · loading source
components/Search.jsxView file
16const path = "/pagefind/pagefind.js"; L17: pagefindPromise = import(/* @vite-ignore */ path).then(async (pf) => { L18: await pf.init?.();
Medium
Dynamic Require

Package source references dynamic require/import behavior.

components/Search.jsxView on unpkg · L16
build/frontmatter.jsView file
18contains invisible/control Unicode U+FEFF (zero width no-break space) const m = source.match(/^<U+FEFF>?---\r?\n([\s\S]*?)\r?\n---/);
Critical
Trojan Source Unicode

Source contains bidi control or invisible Unicode characters associated with Trojan Source attacks.

build/frontmatter.jsView on unpkg · L18
Trigger-reachable chain: manifest.exports -> build/index.js -> build/blog-posts-plugin.js -> build/frontmatter.js Reachable file contains a blocking source-risk pattern.
Critical
Trigger Reachable Dangerous Capability

A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.

build/frontmatter.jsView on unpkg

Findings

2 Critical2 Medium4 Low
CriticalTrojan Source Unicodebuild/frontmatter.js
CriticalTrigger Reachable Dangerous Capabilitybuild/frontmatter.js
MediumDynamic Requirecomponents/Search.jsx
MediumStructural Risk Force Deep Review
LowScripts Present
LowFilesystem
LowHigh Entropy Strings
LowUrl Strings