Skip to content

Security-hardening unit: CodeQL alert triage and fixes (Critical #12 lead) #425

Open

Description

@Alajmah

New bounded unit per maintainer direction at W3-03 hold. 421-A/B/C remain closed; this is not part of #421. Architectural premise recorded up front: the required analyze context proves CodeQL RAN — it is an analysis-execution gate, not a security-debt gate; 25 open alerts accumulated under green checks.

Triage (completed for the Critical/High lead set + composable pair)

#12 CRITICAL — js/code-injection, packages/rules/src/plugins/loader.js:55 — REAL

new Function(...keys, fnBody) executes plugin source verbatim. Two reachable sinks:

  1. Repo-controlled: customRulesService.js:370 → getPluginsForRepo fetches .gitwire/plugins/*.js from the managed repository; the filters run during custom-rule evaluation on webhook events. Anyone who can merge a file into a fleet repo's plugin directory executes arbitrary JavaScript inside the app process, which holds the GitHub App credentials for all installations and the superuser DB connection.
  2. API-controlled: POST /api/config/playground (routes/config.js:293) accepts plugins[].source in the request body (API-key gated).

The sandbox is unsound by JavaScript semantics: new Function bodies scope-chain to the true global object; shadowing safe names as parameters hides nothing — process, globalThis, Function.constructor are all reachable from plugin code. The sandbox.js comments ("no require, no fs, no process") do not hold. loader.js:100 itself admits the debt ("In production, we'd use worker_threads").

Severity honestly scoped: critical in the product's multi-tenant threat model (repo write → app RCE → all-installations credential theft). In the CURRENT single-operator deployment both sinks sit inside the operator trust domain (all fleet repos are the operator's; playground is key-gated) — a live but contained exposure, not an active breach vector today.

Planned fix (bounded): worker_threads isolation with message-passing (no ambient authority), an operator-side per-repo plugin authorization gate (repo-controlled files never load by default), and default-off posture. Details frozen in the unit plan before code.

#28 HIGH — js/unvalidated-dynamic-method-call, webhookHandlers/index.js:83 — REAL, low impact, one-line fix

handlers[eventName] dispatches on the webhook event name without an own-property guard: event names like constructor resolve truthy through the prototype chain, dispatch to an unexpected target, and skip the generic-event fallback (silent misrouting). Fix: Object.hasOwn(handlers, eventName) + regression test. Same root family as #36/#37 — unguarded property access on external input — which is why it was triaged alongside them per the composability concern.

#36 / #37 MEDIUM — js/prototype-polluting-function (resolve.js:151, parse.js:79) — FALSE POSITIVES, evidence-backed dismissal

Both flagged merges carry an explicit dangerous-key guard (resolve.js:133 and the mergeDeep loop head: if (isDangerousConfigKey(key)) continue;), a documented rationale, and regression suites proving Object.prototype untouched under direct crafted input (own __proto__ via JSON.parse, 20- and 24-deep nesting, cyclic documents). CodeQL cannot model the custom predicate. Dismissal will cite the guards and tests.

Rate-limiting cluster (#10, #13–#17, #23–#26, #29, #31–#35) — FAMILY FALSE POSITIVE; triage reverses the "no shared policy" premise

A shared policy already exists: app.use(rateLimiter) at app.js:84 runs before every route mount (rollouts mounted at :196; config/maintainer/webhooks/triage/phase4 in the same post-limiter block). Per-route analyzers cannot see the global middleware. The unit will verify each flagged route's mount order post-84 and dismiss per-alert citing the global limiter — no 15 local patches. (If stricter per-route limits are wanted beyond the global policy, that is a separate decision, not this backlog.)

Not yet inspected (queued tranches)

Unit plan (maintainer's order, amended by triage findings)

  1. Fix v0.20.3: Governance hardening — drift re-check, blocked reasons, marker comments #12 (isolation + authorization gate, default-off).
  2. Fix feat(governance): receipt evidence binding + pass-gate rewiring (v0.23.0 Task 6) #28 (own-property guard).
  3. Dismiss fix(deploy): propagate commit SHA into production build #36/feat: plan-execution conformance model — receipt-integrity enforcement #37 and the rate-limiting cluster with evidence.
  4. Triage + clear the regex/escaping/dashboard tranche.
  5. Durable gate: a check that fails on NEW open Critical/High code-scanning alerts (query the alerts API per PR) so analyze stays an execution gate while security debt gets its own.
  6. Hold: 421-D and the W3-03 freeze stay stopped until this unit closes.

No code has been changed yet; this issue is the triage record and unit charter. Fixes land as PRs through the 16 required contexts.

Activity

  1. Alajmah commented on Oct 2, 2026

    @Alajmah
    ContributorAuthor

    ARCHITECTURE CORRECTION ADOPTED (maintainer, pre-implementation) — worker_threads rejected as the security boundary

    worker_threads will NOT be the containment mechanism. Node's runtime model defeats it: a worker receives a copy of the parent process.env, is not OS-privilege-separated from the process, and the Node Permission Model does not inherit into worker threads. "Worker + message passing = no ambient authority" would recreate the same false-security assumption this unit was opened to remove (#12's cosmetic sandbox).

    Replacement isolation design (for the later PR): Replacement isolation design (HARDENED 2026-10-02 — bare child process EXCLUDED as the primary boundary; maintainer amendment): the primary security boundary must be a disposable container or equivalent OS sandbox with: no network, empty/minimal environment, no credentials of any kind, read-only root filesystem plus bounded scratch space, non-root UID, dropped capabilities, bounded CPU/memory/PIDs/runtime, a hard kill path, and a narrow serialized request/response interface. A bare child process separates JS heaps only — under the same host/user it still inherits the host network and that OS identity's filesystem permissions — so a child process is acceptable only inside such an OS sandbox, never as the sandbox itself. Node's Permission Model inside that process is optional defense-in-depth, never the primary boundary.

    Restructured unit order (supersedes the original plan's sequencing)

    1. Contain v0.20.3: Governance hardening — drift re-check, blocked reasons, marker comments #12 first (this PR): repository plugin loading becomes operator-gated default-off (deployment-environment authority, which repository content cannot write), and /api/config/playground rejects plugins[].source unless a separate operator-only flag is present. Small, auditable, closes the execution path before the isolation redesign exists.
    2. Then the real isolation boundary — disposable container or equivalent OS sandbox; a child process is permitted only inside that sandbox.
    3. feat(governance): receipt evidence binding + pass-gate rewiring (v0.23.0 Task 6) #28 hardening as its own small PR (Object.hasOwn(handlers, eventName) + regression), kept separate from plugin isolation for bounded review.
    4. Dismissals only with per-alert exact evidence: fix(deploy): propagate commit SHA into production build #36/feat: plan-execution conformance model — receipt-integrity enforcement #37 each cite the concrete guard line and the specific tests proving Object.prototype untouched; the rate-limit family is dismissed per-alert only after mechanically verifying each flagged route mounts after the global limiter and has no alternate ungated entry point. No bulk family dismissal.
    5. Remaining triage (deps: bump node from 20-alpine to 26-alpine #1–ci: bump actions/checkout from 4 to 7 #3, deps: bump pino-pretty from 10.3.1 to 13.1.3 #5, ci: bump actions/setup-node from 4 to 6 #4) as its own tranche — findings are not classified by analogy to v0.20.3: Governance hardening — drift re-check, blocked reasons, marker comments #12.
    6. Durable differential gate with semantics frozen before implementation: fails only on NEW Critical/High code-scanning findings attributable to the candidate PR (base-vs-head comparison, not the standing baseline); accounts for CodeQL indexing latency (bounded retry or consuming the current analysis result directly); read-only, narrowest-possible permissions.

    421-D and the W3-03 freeze remain held until this unit closes.


    Baseline note (2026-10-02, pre-isolation): triage job 3443 (transient EAI_AGAIN DNS failure, 06:30:23Z, pre-#427-merge) was retried exactly once per maintainer direction and completed at 08:19:32Z; the job left the failed set and /health returned to ok (470 disposed / 0 actionable). The dependency path to api.github.com is proven healthy; the security-critical runtime change now starts from a clean production baseline.

  2. Alajmah commented on Oct 2, 2026

    @Alajmah
    ContributorAuthor

    #12 containment DEPLOYED and VERIFIED in production — contained, not fixed

    Deployment chain (PR #427, merged at pinned head 875829eb → master e23338b0): genuine push CI #36980556844 success including publish-release-images; Deploy to Production #36980974924 success (unchanged trust gate); /health: git_sha=e23338b03023859efacff1344d67cd8a30a67e56, migrations 49/49 current.

    Production default-off assertions (per the closure requirement)

    1. Flags absent from the deployed environment — verified inside the running container (gitwire-gitwire-app-1): no GITWIRE_ENABLE_* variables set at all. Both gates default-off.
    2. Live playground rejection — a benign plugin-bearing request ({"expression":"true","plugins":[{"source":"module.exports = { benign: () => 2 + 2 }","filename":"benign-probe.js"}]}) against the running app from inside the container returned:
    HTTP 400
    {"error":"Playground plugin execution is disabled on this deployment (operator default-off; set GITWIRE_ENABLE_PLAYGROUND_PLUGINS=true to enable)"}
    

    This distinguishes "the code defaults off" from "production is actually running off" — production is running off, and the rejection fires before loadPlugins is ever reached.

    Honest health note (pre-existing, unrelated)

    /health reports status: degraded — workflows.triage has exactly 1 actionable failure: job 3443 (triage-issue), failed 2026-10-02T06:30:23.902Z — 74 minutes before this merge — with Configuration source currently unreadable (Octo-Lex/GitWire@.github/.gitwire.yml): getaddrinfo EAI_AGAIN api.github.com. A transient DNS failure from CT115 to GitHub; the #398 unreadable-source semantics failed honestly instead of degrading silently. No recurrence in the 1.5h since. Retry (operator API) or disposition is a maintainer decision; not touched.

    Disposition

    #12 is CONTAINED, NOT FIXED. The CodeQL alert stays open: new Function remains in the codebase, and setting either operator flag restores the unsafe in-process execution path. The next unit is the isolation replacement (child process/disposable container boundary per the amendment above), frozen before implementation per the maintainer's stop; #28 follows after the sink is actually removed. 421-D and W3-03 remain held.

  3. Alajmah commented on Oct 8, 2026

    @Alajmah
    ContributorAuthor

    #425 isolation unit DEPLOYED — master 7b07c72e, production verified default-off

    Merge: PR #445 squash-merged at maintainer-cleared head 21a5e8a7400c7c91bb92872b548f2ec643b73cd9 → master 7b07c72e2ad16150ee9c03dd1fe40cc0f532b811 (2026-10-08T17:42:50Z).

    Chain: 18 branches/PRs (#417→#445 supersession chain from the containment onward; this unit's final six: #428–#445), driven by maintainer blocker findings (containment before isolation; worker_threads rejected; bare child process rejected; playground named-expression regression; production wiring absent; strict-parse default-off kill; tag-only presence guarantee; errexit-exempt assertions; tag-inspect vs digest-only install; partial workspace cleanup; P1 result-to-mutation authority) plus CI-iteration fixes and four newly published dependency advisories.

    Deployment chain (unchanged trust gate): genuine push CI #37818695332 on 7b07c72e success including publish-release-images; Plugin Sandbox Proofs green on master push; Deploy to Production #37819373982 success (Security Scan + Deploy Immutable Release both success); /health: git_sha=7b07c72e2ad16150ee9c03dd1fe40cc0f532b811, migrations 49/49 current, status ok.

    Production isolation assertions (verified live on the running deployment):

    1. Both plugin-execution flags default-off — neither GITWIRE_ENABLE_REPO_PLUGINS nor GITWIRE_ENABLE_PLAYGROUND_PLUGINS set in the running app container env.
    2. No in-process plugin-loader path — zero @gitwire/rules/plugins imports in the running app source (the structural test holds in production).
    3. No Docker-runtime authority in the app — no docker socket mounted, no docker invocation anywhere in app source.
    4. Executor sandbox identity in the default posture — GITWIRE_PLUGIN_SANDBOX_IMAGE_REF/_DIGEST present but empty (compose passthrough live; plugin evaluation would refuse fail-closed; readiness unaffected).
    5. Live default-off behavior — a benign plugin-bearing playground request against the running app returns HTTP 400 with the exact containment message.

    Deployed security properties: untrusted plugin JavaScript never executes inside gitwire-app (OS sandbox via the executor; hardened flag set; immutable ref@digest execution and inspection; SIGKILL + named-container kill/remove); the sandbox returns matched-rule identifiers only, and the app reconstructs actions exclusively from the trusted resolved config with own-property fail-closed validation (five adversarial regressions prove fabricated output cannot reach propose). Plugins remain disabled fleet-wide — activation requires explicit operator authorization (the two app flags plus the digest-pinned sandbox identity pair).

    CodeQL #12 remains OPEN pending disposition review against this deployed OS-boundary evidence. The new Function in plugin-sandbox/runner.mjs is inside the disposable container by design; per the unit instruction that does not automatically justify dismissal or closure.

    Unit sequence state: containment (#427) → isolation (#445) COMPLETE. Next per the agreed order: #28 (own-property dispatch guard), per-alert evidence-backed dismissals (#36/#37 + rate-limit family with mount-order verification), the remaining CodeQL tranche (#1–#3, #5, #4), the differential Critical/High gate. 421-D and the W3-03 freeze remain held.

  4. Alajmah commented on Oct 8, 2026

    @Alajmah
    ContributorAuthor

    #28 remediation DEPLOYED — alert state: FIXED by CodeQL's own analysis

    Merge: PR #446 squash-merged at maintainer-cleared head fa8589cbc287cbb930b675859fb9123dfd118432 → master 6216fb8d0c078ab684e6b4f69941bb765dcd61ef (2026-10-08T19:36:57Z).

    Deployment chain (unchanged trust gate): genuine push CI #37833282478 on 6216fb8d success including publish-release-images; Deploy to Production #37833825134 completed success; /health: git_sha=6216fb8d0c078ab684e6b4f69941bb765dcd61ef, migrations 49/49 current, status ok. Plugin-execution flags verified absent post-merge (default-off posture unchanged).

    CodeQL alert #28 — actual state, not regression-inferred

    state:            fixed
    fixed_by:         CodeQL's own re-analysis (no manual dismissal; dismissed_reason null, closed_by null)
    master instance:  commit 7b07c72e, packages/web/src/lib/webhookHandlers/index.js:83 → state "fixed"
    open instances:   only on stale historical PR refs (refs/pull/157/merge, refs/pull/122/merge) —
                      artifacts of old analyses, not master
    

    Per instruction, this is the alert's actual post-merge state recorded with supporting evidence — the resolution was established by CodeQL analyzing the own-property dispatch guard, not by the passing regression suite. The stale PR-ref instances are pre-existing analysis artifacts on closed refs and carry no master exposure.

    Note on the guard-shape test: maintainer's correction accepted — the synthetic-object test documents own-property semantics but cannot independently verify the registry's contents; the behavioral dispatch tests exercising the real dispatcher are the coverage that matters.

    Unit sequence state: #12 containment+isolation DEPLOYED (alert #12 OPEN pending OS-boundary disposition) → #28 remediation DEPLOYED (alert FIXED by analysis). Next in the agreed order: per-alert evidence-backed dismissals (#36/#37 + rate-limit family with per-route mount-order verification), the remaining CodeQL tranche (#1–#3, #5, #4), the differential Critical/High gate. 421-D and W3-03 remain held.

  5. Alajmah commented on Oct 9, 2026

    @Alajmah
    ContributorAuthor

    Per-alert verification tranche — evidence matrix (READ-ONLY; no dismissals or mutations made)

    Part A — prototype-pollution alerts

    Shared guard fact (verified in source at master 6216fb8d): both flagged loops begin for (const key of Object.keys(source)) and their FIRST statement is if (isDangerousConfigKey(key)) continue;. Object.keys yields only own enumerable keys, and the guard rejects __proto__/constructor/prototype before ANY use of key (read, recursion, or assignment) in either function. The denylist is private (DANGEROUS_CONFIG_KEYS, not exported; immutable predicate exported only).

    Field #36 #37
    Location resolve.js:151 — target[key] = value (scalar branch of mergeSparse) parse.js:79 — target[key] = source[key] (else branch of mergeDeep)
    Exposure every sparse layer merge (org/repo/governed resolution) — validation REJECTS dangerous keys in documents, but resolveConfigLayers is exported and accepts unvalidated programmatic input exported legacy parseConfig() (runs its own validation first) AND exported mergeDeep() directly (no validation)
    Protection guard at resolve.js:133, before all 3 assignment paths (lines 138/147/151) guard at parse.js:72-74, before recursion and assignment
    Bypass analysis none found: no use of key precedes the guard; nested dangerous keys guarded identically (guard runs at every recursion depth); escapePointerToken(key) only feeds a JSON-pointer string none found: same structure; cycle guard (ancestors) orthogonal
    Regression resolve.test.js:425 "own proto keys fed DIRECTLY to the resolver cannot pollute Object.prototype" (crafted input bypassing validation); :357 depth-independence test resolve.test.js:370 "legacy parseConfig(): a 20+ deep dangerous key is rejected with Object.prototype untouched"; :381 mergeDeep direct-input test
    Classification false positive (guard demonstrably covers the flagged flow) false positive (same)
    Proposed disposition Dismiss after closing a coverage gap (below) Dismiss after closing a coverage gap (below)

    Honest coverage gap (both alerts): the DIRECT-path tests drive only __proto__. constructor and prototype are covered at the validation layer (resolve.test.js:348 parseConfigLayer test) and the predicate test (:386), but NOT through the direct resolveConfigLayers/mergeDeep paths the maintainers asked about. The guard is key-agnostic (one isDangerousConfigKey check), so the gap is evidentiary, not protective — but per this unit's dismissal standard the tests should exist first. Proposed next step: a test-only PR adding direct-path constructor/prototype (nested and top-level) assertions for both functions, THEN dismiss both alerts citing guard + tests.

    Part B — rate-limit family (15 alerts)

    Shared middleware facts (verified in source):

    • app.use(rateLimiter) at app.js:84 — BEFORE every mount below.
    • Limiter skips exactly req.path === "/health" and req.path.startsWith("/webhooks") (rateLimiter.js:17).
    • Redis failure → logged + next() (fail-open). Identity = Bearer key, else req.ip. Limit 120 req/min.
    • All 13 /api/* routes below are mounted once each (no duplicate/alternate mounts; no second Express app) and sit behind apiKeyAuth (app.js:96) — so their limiter identity is the API key.

    Routes that traverse the limiter (12 alerts) — per-alert verdicts:

    Alert Route (method + path) Mount Verdict
    #14 PUT /api/config/:owner/:repo app.js:180 False positive — traverses limiter; skip conditions don't match /api/config; per-key identity; behind apiKeyAuth
    #15 PATCH /api/config/:owner/:repo app.js:180 False positive — same chain
    #16 DELETE /api/config/:owner/:repo app.js:180 False positive — same chain
    #17 POST /api/config/:owner/:repo/restore/:historyId app.js:180 False positive — same chain
    #23 PUT /api/maintainer/collaborators/:owner/:repo/:login app.js:160 False positive — same chain
    #25 DELETE /api/maintainer/collaborators/:owner/:repo/:login app.js:160 False positive — same chain
    #26 PUT /api/maintainer/branch-rules/:owner/:repo/:pattern app.js:160 False positive — same chain
    #29 POST /api/triage/failures/:jobId/disposition app.js:191 False positive — same chain; additionally repository-scoped authorize() gate in-handler
    #31 POST /api/rollouts/ app.js:196 False positive — same chain
    #32 PATCH /api/rollouts/:id/evidence app.js:196 False positive — same chain
    #33 POST /api/rollouts/:id/transition app.js:196 False positive — same chain
    #34 POST /api/rollouts/:id/approve app.js:196 False positive — same chain
    #35 POST /api/rollouts/:id/reject app.js:196 False positive — same chain

    Proposed disposition for all 12: dismiss with per-route rationale (the table rows are the rationale; each cites mount line + chain). Two shared caveats recorded with each: (a) operational limitation — Redis outage makes the limiter fail open by design; (b) no regression test pins the limiter itself (skip conditions, identity, fail-open) — recommend a small test-only follow-up before/with dismissal.

    Routes deliberately outside the limiter (2 alerts):

    Field #10 #13
    Location routes/webhooks.js:33 — POST /webhooks/github (mounted app.js:152) app.js:108 — GET /health (inline)
    Protection NONE from the rate limiter — startsWith("/webhooks") skip is explicit; integrity control is HMAC signature verification (401 on invalid signature) NONE — path === "/health" skip is explicit
    Bypass analysis Real abuse case found: express_raw_body_middleware (webhooks.js:211-220) buffers the ENTIRE request body into memory with no size limit, and signature verification runs only AFTER buffering completes. The 400 missing-headers path also fires after buffering. So: unauthenticated + unlimited rate (skip) + unbounded per-request memory (no cap) = resource-exhaustion surface. The 1MB express.json cap explicitly does NOT apply (it skips /webhooks) Anonymous, read-only, bounded queries (deployment info + triage counts, each try/catch-wrapped). Abuse surface: unauthenticated per-request DB reads with no limit — real but small; health endpoints are conventionally unthrottled for load-balancer probes (the deploy gate itself polls /health)
    Classification True positive — real coverage defect (deliberate skip + applicable abuse case the compensating HMAC control does not cover, since HMAC runs post-buffering) False positive as a defect — by-design exclusion with an accepted, bounded residual surface
    Proposed disposition Remediate — bound the raw body (size cap in express_raw_body_middleware, e.g. 25MB GitHub ceiling or tighter) and optionally add a webhook-specific high-threshold limiter; do NOT subject it to the 120/min API limiter (GitHub delivery reliability) Dismiss with rationale documenting the deliberate skip + LB semantics + bounded residual; optionally note the residual in the rationale

    Summary for review

    No CodeQL state changes and no source mutations were made in this step, per authorization.

  6. Alajmah commented on Oct 9, 2026

    @Alajmah
    ContributorAuthor

    Matrix corrections (maintainer review of the verification tranche)

    Accepted and applied to the record; three corrections to comment 6074964634:

    1. Census corrected: 13 API-route alerts, not 12. Final accounting over the 17 verified alerts: 13 API routes protected by middleware (docs: validator execution model decision (Gap 1 design note) #14–17, docs(v0.23): container-runtime executor service design + CT 115 feasibility #23, feat(executor-service): app-side client + registration (v0.23.0 Task 3) #25, feat(executor-reachability): backend-level reachability + /health integration (v0.23.0 Task 4) #26, feat(deploy): compose + runbook wiring for executor service (v0.23.0 Task 7) #29, fix(release): v0.23.1 — executor-service proof-capture hotfix #31–35) + 2 guarded prototype-pollution findings (fix(deploy): propagate commit SHA into production build #36, feat: plan-execution conformance model — receipt-integrity enforcement #37) + 1 intentional health exemption (v0.21.0: Executor reachability layer — topology detection, selection policy, health exposure #13) + 1 real webhook resource-exhaustion defect (docs(runbook): repository ID reconciliation procedure #10) = 17 total: 15 potential false-positive dismissals, one intentional risk exception, one remediation.

    2. v0.21.0: Executor reachability layer — topology detection, selection policy, health exposure #13 reclassified: intentional exception, not false positive. The health endpoint genuinely has no rate limiting; the finding is accurate about the absence. Its eventual disposition rests on explicit risk acceptance — the operational need for unthrottled health probes (load-balancer and deploy-gate polling) weighed against the residual unauthenticated per-request DB-read surface — not on "CodeQL detected incorrectly."

    3. Identity statement corrected: authenticated Bearer requests are limited per API key; authenticated session-cookie requests fall back to IP-based identity (the limiter reads the Authorization header only). Both classes traverse the limiter.

    Implementation sequence per authorization: Unit A (#10 body-size enforcement, HIGH) first; Units B (#36/#37 direct-path regressions) and C (limiter behavior regressions) as separate test-only PRs. Each returns its exact head; no automatic merges; no alert state changes in this phase.

  7. Alajmah commented on Nov 22, 2026

    @Alajmah
    ContributorAuthor

    Dependency-alert triage — the open critical and high alerts (read-only; nothing changed)

    Scope: the 6 open critical/high Dependabot alerts on master bba0a08, out of 32 open alerts. Each is classified by where it comes from, whether it reaches a production image, whether it is exploitable there, and the available fix.

    Headline

    • None of the 6 is exploitable in production.
    • All 6 are scope: development in Dependabot. That label is accurate for 3 of them and misleading for the rest: the validator image installs the whole development tree.
    • 3 of the 4 distinct packages are physically present in the pinned validator image, at vulnerable versions. They sit inside an isolated sandbox whose purpose is to run pull-request code.
    • All 6 have non-breaking lockfile fixes (npm audit fix --dry-run).

    The six alerts

    Alert Severity Package and advisory Lockfile Pulled in by In a production image? Exploitable there? Fix
    #85 critical, CVSS 9.8 handlebars ≤ 4.7.9 — JavaScript injection via AST type confusion in compile root, dev ts-jest 29.4.12 ← web-dashboard Not in app, dashboard, bot, executor-service, plugin-sandbox. Yes, in the validator image (4.7.9) No. It needs an attacker-controlled template passed to compile(). ts-jest calls compile() in exactly one place, on a template constant of its own (dist/cli/config/init.js). 4.7.10 — inside ts-jest's ^4.7.9
    #86 critical handlebars ≤ 4.7.9 — JavaScript injection via own-property check bypass root, dev same same same same
    #105 high vite ≤ 6.4.3 — launch-editor existence-check bypass (Windows dev server) docs, dev vitepress No. It exists only in the docs build stage. The final image is nginx plus .vitepress/dist. No. It affects the development server only. CI runners are Linux, and nothing untrusted reaches it. 6.4.4
    #77 high, CVSS 7.5 source-map-js < 1.2.2 — event-loop denial of service through indexed source-map sections docs, dev vitepress → vite / postcss No for docs. Yes, in the validator image (1.2.1). The root lockfile is already at 1.2.2. No. It needs an attacker-controlled source map. The only input is the repository's own build. 1.2.2
    #76 high, CVSS 7.2 @vue/server-renderer < 3.5.42 — XSS through a CR in an attribute name docs, dev vitepress No No. Server-side rendering runs at build time, on Markdown from this repository. Nothing is rendered from untrusted input at run time. 3.5.42
    #41 high, CVSS 7.5 postcss ≤ 8.5.17 — path traversal in sourceMappingURL auto-loading docs, dev vitepress → vite No for docs. Yes, in the validator image (8.4.31). The root lockfile is already at 8.5.22 / 8.5.23. No. It runs at build time on repository-controlled CSS, and the published docs contain no source-map files (0 .map files among 416, checked in the production container). ≥ 8.5.18

    How each production image gets its dependencies

    Image Install, per its Dockerfile Flagged packages on board
    app (Dockerfile) npm ci --omit=dev none
    dashboard builder stage installs everything; the runner copies .next/standalone, .next/static, public none
    docs builder stage installs everything; the final image is nginx with .vitepress/dist none
    demo dashboard builder stage; final image is nginx with the static export in out/ none
    bot, plugin-sandbox npm install --omit=dev none
    executor-service no dependencies none
    validator npm ci --include=dev, from the root package.json and package-lock.json handlebars 4.7.9, postcss 8.4.31, source-map-js 1.2.1

    Evidence for the validator image's contents

    The image has no labels, so this is an inference with a short chain, not a direct read.

    • Its Dockerfile copies the root manifests and runs npm ci --include=dev. npm ci installs exactly what the lockfile says.
    • The pinned image, sha256:e2c10a61…, was created 2026-06-25T19:50:27Z.
    • In every commit that changed package-lock.json from 2026-05-31 to 2026-07-19 — 27 commits — the locked versions are identical: handlebars 4.7.9 (development, via ts-jest), postcss 8.4.31, source-map-js 1.2.1.
    • No direct read was made: it would mean starting a container on CT 115, which is outside this triage's authorization.

    Why the validator image does not change the verdict

    • How it is run. The executor starts it with --network=none, --read-only, --user=1000:1000, a memory limit and a PID limit. The only writable paths are one workspace and a size-limited /tmp.
    • What runs in it. The entrypoint copies the baseline repository into the workspace, overlays the workspace's original contents (the change under validation), and executes the requested command. The code that runs inside is, by design, the pull request's own code.
    • Consequence. Exploiting one of these three packages there yields nothing that this code does not already have inside the same container.

    Facts outside the requested scope

    A gap this exposes

    The production dependency audit assumes that production images omit development dependencies. The validator image does not. So a critical finding in the development tree can sit inside a pinned production image while the audit gate stays green — which is the current state. The audit's coverage model misses it, not its thresholds. This relates to #115.

    Remediation — proposed, not executed

    1. Two lockfile-only pull requests, both non-breaking. Root: handlebars 4.7.9 → 4.7.10. Docs: vite, source-map-js, @vue/server-renderer, postcss. Together they close all 6 alerts. They change nothing in production: the docs image is a static local build.
    2. The validator image only loses its three packages through a rebuild and a new pinned digest. That is a digest change, and it needs its own provenance and change-control review. Until then the exposure is the sandbox-bound one described above.
  8. Alajmah commented on Nov 22, 2026

    @Alajmah
    ContributorAuthor

    Correction to the triage record above — level of certainty

    The maintainer's review of 2026-11-22 accepted the classification of the six alerts, with one reservation, which is adopted here. The headline of comment 7079168276 — "None of the 6 is exploitable in production" — was stronger than the evidence supports.

    Accepted wording: no practical exploitation path has been demonstrated for the six alerts within the documented production usage. A potential exposure remains inside the validator image and calls for remediation.

    What the evidence shows, and what it does not:

    • The known exploitation paths of the six advisories are not directly exposed in the public services examined.
    • The validator image contains development tooling and executes pull-request code inside an isolated sandbox. Those are significant security boundaries. They do not make every vulnerability inside that sandbox inconsequential.
    • The presence of the three packages in the pinned image is a strong historical inference — the Dockerfile plus 27 lockfile commits with identical versions around the build date — not a direct inspection of the image.

    Decisions from the same review, as executed:

    Item State
    Lockfile-only update, root — handlebars #492, opened; not merged
    Lockfile-only update, docs #493, opened; not merged. It closes 3 of the 4 high alerts; vite (#105) has no lockfile-only fix
    Rebuilding the validator image, changing its pinned digest HOLD. The old image and its residual risk stay documented until a separate change
    Audit coverage gap for the validator image Recorded on #115, comment 7081222451
  9. Alajmah commented on Nov 22, 2026

    @Alajmah
    ContributorAuthor

    Status of the six triaged alerts (2026-11-22, end of day)

    Alert Package State Closed by
    #85, #86 handlebars fixed #492 — merged and deployed as a1b3665
    #76 @vue/server-renderer fixed #493 — merged and deployed as 3847171
    #77 source-map-js fixed #493
    #41 postcss fixed #493
    #105 vite open no lockfile-only fix: VitePress 1.6.4 declares Vite 5 only

    Five of the six are fixed. #105 stays open by decision: no overrides for Vite 6 under VitePress 1.6.4 and no permanent exception; the path is a study of a VitePress upgrade.

    Still recorded as accepted risk, unchanged: the pinned validator image carries vulnerable development packages until a change-controlled rebuild (#115).

    One finding from today widens the audit-coverage gap on #115: the dashboard and docs images are built without the lockfile, so neither the audit gate nor these alerts describe their contents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions