Skip to content

Transport CodeQL: resolve Darwin bounded-command shell-injection finding #2113

Closed

Description

@integry

Problem

Transport epic PR #2035 at exact head b3ce045 has a medium CodeQL js/shell-command-injection-from-environment finding at apps/desktop/scripts/run-bounded-darwin-command.mjs:155 (check/job 101128142786). The wrapper currently invokes an argv array through spawn with shell: false, but the security gate is red and the command boundary must be made unambiguously safe to both execution and static analysis.

Required correction

Trace the CodeQL flow from environment/CLI input to process creation. Make the smallest robust correction or precise documented suppression that proves:

  • no shell is invoked;
  • the executable is selected from a fixed allowlist or otherwise authenticated before spawn;
  • argument boundaries cannot be reinterpreted as shell syntax;
  • existing bounded timeout, process-group termination, output cap, and cleanup behavior remain intact;
  • no secrets or raw commands are logged.

Do not weaken the macOS ephemeral signing/verification evidence and do not touch Windows-specific behavior. Add focused adversarial tests for metacharacters, executable substitution, and environment influence.

Acceptance

The exact CodeQL medium finding is absent on fresh CI; bounded-command tests, packaged Darwin x64/ARM64 signing and Connect journeys, Linux lanes, full suite, and unsigned Mac/Linux validation remain green.

Activity

  1. propr-dev commented on Sep 4, 2026

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using codex agent with gpt-5.6-sol model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Agent: codex
    • Model: gpt-5.6-sol
    • Branch: 2113/gpt-5.6-sol-transport-codeql-resolve--20260904-1822-sak
    • Base Branch: 1953-epic-desktop-transport-api
    • Worktree: issue-2113-20260904-1822-gpt-5.6-sol-sak

    🔍 Track Task Execution

  2. added a commit that references this issue on Sep 4, 2026
  3. integry commented on Sep 4, 2026

    @integry
    OwnerAuthor

    Implemented by #2116, merged into 1953-epic-desktop-transport-api (d4226b2). Closing the completed child issue during epic issue/PR reconciliation. Final desktop integration and delivery remain tracked by #1950 / #1970; this does not claim a main-branch release.

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

    AIAI-donebugllm-codex-gpt56-sol

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions