GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deploy(deploy.py): targets entries have no shape rule — newline/ANSI/space targets pass validate() and are printed verbatim by list, injecting fake table rows · Issue #6510 · developing-today/code

deploy(deploy.py): targets entries have no shape rule — newline/ANSI/space targets pass validate() and are printed verbatim by list, injecting fake table rows #6510

New issue
Copy link
New issue
Copy link
Closed
#6586
Closed
deploy(deploy.py): targets entries have no shape rule — newline/ANSI/space targets pass validate() and are printed verbatim by list, injecting fake table rows#6510
#6586
Copy link
Labels
app/deployPackage/app: deploy (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Nov 6, 2026
Issue body actions

deploy(deploy.py): targets entries have no shape rule — newline/ANSI/space targets pass validate() and are printed verbatim by list, injecting fake table rows

pkgs/deploy/deploy.py's module docstring states the contract: validation "is the oracle for 'well-formed definition'… a registry that cannot be validated must never be enumerated as if it were trustworthy." Service names get a shape pattern (NAME_RE, deploy.py:52), but targets entries — described by the validator's own error text as "host/class names" — get no shape check at all, and list prints them verbatim.

Evidence (verified this run)

At origin/main 85c435ec6c:

  • deploy.py:138-144 — the entire targets rule is: a non-empty list of non-empty strings. No character, shape, or control-character restriction.
  • deploy.py:182 — cmd_list prints ','.join(defn['targets']) raw into the table.

Probe on the laptop (~/git/fleet/probe-deploy-target-newline/probe.py, driving the real deploy.py from origin/main against hand-written registries; all other fields valid):

  • X1 — newline target: targets: ["laptop\nFAKE systemd evil"] → exit 0, and the output contains an injected fake row:
    NAME  CLASS       TARGETS
    svc  systemd     laptop
    FAKE  systemd     evil
    
  • X2 — ANSI target: targets: ["lap\x1b[31mtop"] → exit 0, the raw escape sequence is emitted into the terminal output unchanged.
  • C2 — space target: targets: ["bad name"] → exit 0 (a "host/class name" with a space is not a host or class name in any downstream consumer).
  • C1 — valid control: the ordinary registry (targets: ["laptop"]) → exit 0, normal table. Correct.

Why it matters

  • list output is operator-facing and script-consumable; a registry value that can forge table rows (or smuggle terminal escapes) breaks the "enumerated as trustworthy" contract exactly as the service-name newline did in deploy(deploy.py): validate() accepts shapes its own rules reject — newline service names, duplicate targets/secrets, host-less healthCheck URLs #6383 — through a different field that issue does not cover (deploy(deploy.py): validate() accepts shapes its own rules reject — newline service names, duplicate targets/secrets, host-less healthCheck URLs #6383 scopes its fix to service names, duplicate targets/secrets, and healthCheck hosts).
  • Targets are not display-only: later deploy tool v1: target registry (deployTargets) + systemd generation activation #5766 slices iterate targets as deploy destinations. A target that is not a plausible host/class name should fail at the oracle, not at activation time on a real host.

Acceptance criteria

  • validate() rejects, with a field-named error in the existing style, any targets entry that is not a plausible host/class name: at minimum no whitespace, no control or format characters, no ANSI escapes — e.g. reuse the name-pattern discipline used for service names, or an explicitly documented target pattern.
  • The existing valid registry (pkgs/deploy/services.nix rendered via the flake) still validates and deploy list output is unchanged for it.
  • Regression coverage: extend the malformed-registry flake check (deploy-list-malformed) or add equivalent cases exercising a newline target and a space target.
  • Controls keep behaving: valid registry exits 0; the deploy(deploy.py): validate() accepts shapes its own rules reject — newline service names, duplicate targets/secrets, host-less healthCheck URLs #6383/deploy(deploy.py): duplicate JSON keys in the registry are silently discarded at load — an invalid first definition is never validated #6384/deploy(deploy.py): validate() crashes with a TypeError traceback on unhashable restart/class values instead of reporting a validation error #6388 shapes keep their current verdicts.

Related: #6383 (same validator, service-name newline class — names only), #5766 (the deploy tool epic this validation gates).

Activity

Next
  1. developing-today commented on Nov 6, 2026

    @developing-today
    developing-todayBot
    on Nov 6, 2026 – with developing.today
    Contributor
    More actions

    CODE-1969

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    source/creatorFiled by the new-issue-creator job
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    app/deployPackage/app: deploy (pkgs/ or apps/ in this repo)
    queue/queuedHas a queued queue task
    on Nov 6, 2026
  3. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane A, new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a run, Fri 2026-11-06 06:05 CST
    • Found via: filed this run
    • Task: Filed after verifying on the laptop against origin/main 85c435e with a probe driving the real deploy.py (~/git/fleet/probe-deploy-target-newline): a newline-bearing target injects a fake list row at exit 0, an ANSI-bearing target is emitted raw, and a space-bearing target is accepted — targets entries have no shape rule (deploy.py:138-144) while list prints them verbatim (deploy.py:182). Deduped against deploy(deploy.py): validate() accepts shapes its own rules reject — newline service names, duplicate targets/secrets, host-less healthCheck URLs #6383 (service-name newline / duplicate targets / healthCheck host — names and duplicates only, not target content shape), deploy(deploy.py): duplicate JSON keys in the registry are silently discarded at load — an invalid first definition is never validated #6384, deploy(deploy.py): validate() crashes with a TypeError traceback on unhashable restart/class values instead of reporting a validation error #6388, deploy(deploy.py): arguments after list are silently ignored and a duplicate --registry silently overrides the first — the typo-flag class, in the parser the activation slices will build on #6376.
    • Expectation: effort s — triage routes a small validator fix: a documented shape rule for targets entries plus regression coverage in the malformed-registry check.
    • Links: queue packet enqueued to repo-health-code-pilot this run (task id in the run's backlog entry)
  4. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 6, 2026
  5. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane code-o
    • Session / ID: task 11027, repo-queue-worker-shift-o run, Fri 2026-11-06 06:12 CST
    • Found via: queue claim
    • Task: Triage issue deploy(deploy.py): targets entries have no shape rule — newline/ANSI/space targets pass validate() and are printed verbatim by list, injecting fake table rows #6510 — verify the deploy.py targets shape gap at current main, scope the fix path, record blockers/ordering, and route the implementation.
    • Expectation: s — done looks like: verification evidence posted on issue deploy(deploy.py): targets entries have no shape rule — newline/ANSI/space targets pass validate() and are printed verbatim by list, injecting fake table rows #6510, a scoped follow-up fix task enqueued if the gap confirms, and task 11027 completed as triaged.
    • Links: issue deploy(deploy.py): targets entries have no shape rule — newline/ANSI/space targets pass validate() and are printed verbatim by list, injecting fake table rows #6510; related issue deploy(deploy.py): validate() accepts shapes its own rules reject — newline service names, duplicate targets/secrets, host-less healthCheck URLs #6383 (service-name shape), issue deploy tool v1: target registry (deployTargets) + systemd generation activation #5766 (deploy slices)
  6. 55 remaining items

  7. dezren39
    added
    status/in-progressQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 8, 2026
  8. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane code-w
    • Session / ID: task 11197
    • Found via: queue claim
    • Task: Triage of issue deploy(deploy.py): targets entries have no shape rule — newline/ANSI/space targets pass validate() and are printed verbatim by list, injecting fake table rows #6510 — duplicate coverage: already triaged, fix already tracked
    • Expectation: done — no new follow-up created (creating one would duplicate task 11028)
    • Links: prior triage task 11027 (note 6684636488) · fix task 11028

    Triage verdict: confirmed, already triaged and tracked elsewhere.

    • Lane code-o triaged issue deploy(deploy.py): targets entries have no shape rule — newline/ANSI/space targets pass validate() and are printed verbatim by list, injecting fake table rows #6510 on 2026-11-06 (task 11027): verdict CONFIRMED, fix path scoped (a NAME_RE-class shape rule for targets entries in pkgs/deploy/deploy.py validate(); regression home is the deploy-list-malformed flake check), and the implementation was routed to follow-up task 11028, which has been cycling through opencode handoffs since.
    • Re-verified fresh this shift at current main: the gap is unchanged — validate()'s entire targets rule is still "non-empty list of non-empty strings" and cmd_list still prints ','.join(defn['targets']) verbatim, so a newline/ANSI/space target still passes and reaches the output unsanitized.
    • Blockers/ordering: none recorded by task 11027 and none found now. The remaining work is task 11028 executing (claimant binding is its bottleneck, as with the other opencode-routed tasks), not another triage.
  9. dezren39
    removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 8, 2026
  10. dezren39
    added 3 commits that reference this issue on Nov 8, 2026

    fix(deploy): validate target identifier shape (#6510)

    23ce935

    fix(deploy): validate target identifier shape (#6510)

    63c2fb7

    test(deploy): cover target identifier shape with property tests (#6510)

    49d2ed3
  11. dezren39 commented on Nov 11, 2026

    @dezren39
    dezren39
    on Nov 11, 2026
    MemberAuthor
    More actions

    Agent note — task 13322 resumed (lane code-d): PR #6586 shepherded under Drew's #7297 per-item ruling

    The recorded blocker was the authorship hard stop, overturned by Drew's 2026-11-11 #7297 ruling (dezren39 = fleet identity; authorship is not a hold; merge what should be merged). Task 13322 was in the batch unblock list; lane assignment returned direct.

    Fresh verification on head 49d2ed3: the Codex P1 (cover target identifier invariants with property tests) was fixed in this head — pkgs/deploy/test_target_shape_property.py with an independent is_valid_target oracle — and its reply was posted 2026-11-08; the thread was still UI-unresolved, now resolved by this lane. Local runs on the head: test_deploy_slice2.py 22 tests OK; test_target_shape_property.py property holds over 500 cases. The scripts-test failures on the PR are stale 2026-11-09 stall runs (21h50m duration); the deploy suites those checks exercise pass locally on this head. Proceeding to merge per the per-item rule.

  12. dezren39
    added a commit that references this issue on Nov 11, 2026

    Merge pull request #6586 from developing-today/queue/11028-6510-deplo…

    d9abe4d
  13. dezren39
    closed this as completedin #6586on Nov 11, 2026
  14. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 11, 2026
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

    app/deployPackage/app: deploy (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.