• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umputun / agterm / 30770898396
98%

Build:
DEFAULT BRANCH: master
Ran 02 Aug 2026 10:50PM UTC
Jobs 1
Files 86
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Aug 2026 10:48PM UTC coverage: 97.709% (+0.005%) from 97.704%
30770898396

push

github

web-flow
fix: sanitize control chars in names and --cwd on the control/GUI paths (#347) (#354)

* fix: sanitize control chars in names and --cwd on control/GUI paths (#347)

A session/workspace/window name and a session --cwd flow unquoted into a
/bin/sh -c line via the {AGT_SESSION_NAME}/{AGT_SESSION_PWD}/{AGT_WORKSPACE_NAME}/
{AGT_WINDOW_NAME} custom-command tokens, so an interior newline (a statement
separator to sh -c) is a command-injection vector. The OSC path already enforces
this with TerminalText.sanitized; the control-socket and GUI rename paths ran the
value through trimmedOrNil only, which strips surrounding whitespace but leaves
an interior newline intact.

Sanitize in the four agtermCore store methods (renameSession, renameWorkspace,
renameWindow, addSession) so the control arms, the GUI rename and any future
caller are all covered and the tests stay host-free. Scope is the invisible
control-character vector only; visible shell metacharacters stay the caller's
concern via the quoted $AGT_X env form.

Fixes #347

* fix: sanitize the create-side name arms and the workspace lookup needle

Review follow-up: addWorkspace and newWindow are the create-side twins of
the rename arms fixed in the previous commit — workspace new --name,
session new --workspace-name --create-workspace, and window new --name
still carried an interior newline into {AGT_WORKSPACE_NAME}/{AGT_WINDOW_NAME}.

The lookup needle in workspace(named:) sanitizes too, and in that method
rather than ensureWorkspace: session.new --workspace-name without
--create-workspace calls workspace(named:) directly, so a needle-side-only
fix there would leave a raw needle against a sanitized stored name and read
back as a silent "workspace not found". Sanitizing before the blank gate
also keeps ensureWorkspace idempotent for control-char-only input (blank →
nil, not a fresh unmatchable workspace per call).

The sanitize tests move to AppStoreNameSanitizeTests.swift — the new arms
pushed AppStoreTests... (continued)

22 of 22 new or added lines in 3 files covered. (100.0%)

6909 of 7071 relevant lines covered (97.71%)

4252067.98 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30770898396.1 02 Aug 2026 10:50PM UTC 86
97.71
GitHub Action Run
Source Files on build 30770898396
  • Tree
  • List 86
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30770898396
  • 97d4e6af on github
  • Prev Build on master (#30761838463)
  • Next Build on master (#30771384094)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc