LearnNewsExamplesServices
Frontmatter
titlefix: sanitize child_process call in daemon.mjs...
authoranupamme
stateClosed
createdAtJul 22, 2026, 2:39 PM
updatedAtJul 22, 2026, 4:28 PM
closedAtJul 22, 2026, 4:28 PM
mergedAt
branchesdevfix-repo-neo-fix-child-process-injection-orchestrator-daemon
urlhttps://github.com/neomjs/neo/pull/15709
contentTrust
projected
quarantined0
signals[]
Closed
anupamme
anupamme commented on Jul 22, 2026, 2:39 PM

Moderation record\n\nThis automated submission was closed and de-fanged under the repository's content-trust policy. The external promotional payload was removed; no engagement is requested.

neo-kimi-iris
neo-kimi-iris COMMENTED reviewed on Jul 22, 2026, 3:19 PM

PR Review Summary

Status: Comment

🪜 Strategic-Fit Decision

  • Decision: Comment
  • Rationale: The change is behavior-equivalent hygiene in the right direction (array-form spawn over template-string exec), but it addresses no reachable injection risk and arrives with no CI and no ticket — a maintainer merge-or-close call rather than an approval or a repair cycle.

Peer-Review Opening: Welcome, and thanks for hardening attention on the orchestrator daemon. The direction of the change is the generally preferred shape; the review below gives the honest severity context so the merge decision is made with the real risk picture.


🧭 Patch-Blind Premise Snapshot

  • Inputs Read Before Patch: ai/daemons/orchestrator/daemon.mjs at current dev (processCommand(pid) and its callers — the daemon's own PID-lock bookkeeping), the PR's HIGH-severity claim, and the diff.
  • Expected Solution Shape: A security fix should name the reachable attacker-controlled input; the minimal correct hardening for a numeric internal identifier is exactly the array form proposed, with error-path behavior preserved.
  • Patch Verdict: Matches the shape, misses the threat model. pid is an integer from the daemon's own PID-lock file / process bookkeeping — for shell interpolation to matter, an attacker would need write access to the daemon's private state directory, at which point the host is already compromised far beyond ps -p. So the HIGH severity is a context-free pattern match. The change itself is correct hygiene: spawnSync('ps', [...]) removes the shell from the path entirely, and on POSIX it is behavior-equivalent. On Windows both the original and the new code fail (no ps); the original threw from execSync, the new would surface a null-stdout TypeError — a cosmetic error-path difference on a platform this code path already never served.
  • Premise Coherence: N/A — no value-surface (scope: one-line spawn hygiene in an internal daemon helper).

🕸️ Context & Graph Linking

  • Target Epic / Issue ID: none linked (external automated security submission)
  • Related Graph Nodes: ai/daemons/orchestrator/daemon.mjs PID-lock lifecycle

🔬 Depth Floor

Challenge: if this is merged, CI needs a maintainer to approve first-time-contributor workflow runs — currently no checks have executed, so there is zero machine verification of even a one-line change in a hot daemon path. Secondary: the PR description's "user-influenced input" framing should be corrected for the record — pid is internally sourced, which is exactly why this is hygiene and not a vulnerability fix.

Rhetorical-Drift Audit (per guide §7.4):

  • PR description: "The code path handles user-influenced input" — not supported by the call sites (internal PID bookkeeping).
  • Severity framing: HIGH — a pattern-match assessment, not a reachable-risk assessment.

Findings: drift noted (documentation-level, not merge-blocking).


🧠 Graph Ingestion Notes

  • [KB_GAP]: Same scanner-lesson as its sibling PR: severity from a pattern match ≠ reachable risk. The two-sentence reachability chain (attacker-controlled input → sink) is what separates a finding from a vulnerability.

🎯 Close-Target Audit

Findings: N/A — no close-target keywords or linked ticket.


📑 Contract Completeness Audit

Findings: N/A — internal helper, no consumed-surface contract.


🪜 Evidence Audit

Findings: N/A — no runtime-observable AC; CI has not run on the branch (first-time-contributor workflows require maintainer approval).


🧪 Test-Evidence & Location Audit

  • Execution evidence: no checks reported on the branch; "build passes / re-scan confirms" are not reviewer-reproducible.
  • Reviewer falsifier: call-site read at current devpid is internally sourced; POSIX behavior of the new form is equivalent to the old.

Findings: author evidence gap (verification not reproducible as presented).


📋 Required Actions

No required actions — eligible for human merge. (Maintainer note: merge is reasonable as hygiene once a workflow run is approved; closing as inessential is equally defensible — the finding's HIGH severity does not survive context either way.)


📊 Evaluation Metrics

  • [ARCH_ALIGNMENT]: 75 — correct shape in the correct file; no structural concerns.
  • [CONTENT_COMPLETENESS]: 55 — the change is documented, but the threat-model framing overstates the risk and there is no ticket or test.
  • [EXECUTION_QUALITY]: 70 — behavior-equivalent on the platforms this path serves; Windows error-path difference is cosmetic and pre-existing in spirit.
  • [PRODUCTIVITY]: 45 — real but marginal: better-practice form with zero reachable-risk delta.
  • [IMPACT]: 20 — small hygiene delta in an internal daemon helper.
  • [COMPLEXITY]: 10 — one line, low reader load.
  • [EFFORT_PROFILE]: Maintenance — scanner-hygiene class.

Thank you for the contribution — the array-form shape is the right instinct; pairing it with the reachability chain next time will make the reviews faster for everyone. 🌈