What
src/lib/usage-limits.js:1354 runs /bin/ps with ["-ax", "-o", "pid=,command="]. -a widens the
scan to every account on the machine. detectAntigravityProcess then reads the matched process's
command line and extracts --csrf_token (usage-limits.js:1365) and --extension_server_port,
returning them together with the pid.
On a shared host, the process it matches need not belong to the user running TokenTracker.
What is and is not established
- Established: the scan is machine-wide, and a CSRF token is lifted out of whatever process
matches first. Verified on the reporting machine: /bin/ps -axo user= | sort -u lists 40 distinct
users including a second human account.
- Established: the token is used to make an internal request
(usage-limits.js:1593-1616 passes it as the X-Codeium-Csrf-Token header).
- NOT established: whether the token or pid reaches the
GET /functions/tokentracker-usage-limits
response. The served shape at usage-limits.js:1434 / :1486 is quota data, but not every
getUsageLimits branch was traced. This should be settled before deciding severity.
Why it is filed separately
#129 narrowed the other ps call site — src/lib/process-list.js PS_ARGS is now -x — because
that one feeds an unauthenticated HTTP endpoint. This call site was deliberately left alone there:
nothing in that PR exercises this path, so changing it would have been an untested edit to an
unrelated feature.
Suggested work
- Trace every
getUsageLimits return branch and confirm whether csrfToken/pid can reach the
HTTP response. That answer sets the severity.
- Scope the scan to the current user (
-x, or an explicit euid filter), or if a machine-wide scan
is genuinely needed here, add user= to the -o spec and filter by owner in code before
matching.
- Add a regression test on the literal argv, as
test/process-list.test.js:23 does — a real ps
run on a single-user machine looks identical either way, so observed output cannot catch this.
Context
Found during the QA gate on #129: #129 (comment)
What
src/lib/usage-limits.js:1354runs/bin/pswith["-ax", "-o", "pid=,command="].-awidens thescan to every account on the machine.
detectAntigravityProcessthen reads the matched process'scommand line and extracts
--csrf_token(usage-limits.js:1365) and--extension_server_port,returning them together with the pid.
On a shared host, the process it matches need not belong to the user running TokenTracker.
What is and is not established
matches first. Verified on the reporting machine:
/bin/ps -axo user= | sort -ulists 40 distinctusers including a second human account.
(
usage-limits.js:1593-1616passes it as theX-Codeium-Csrf-Tokenheader).GET /functions/tokentracker-usage-limitsresponse. The served shape at
usage-limits.js:1434/:1486is quota data, but not everygetUsageLimitsbranch was traced. This should be settled before deciding severity.Why it is filed separately
#129 narrowed the other
pscall site —src/lib/process-list.jsPS_ARGSis now-x— becausethat one feeds an unauthenticated HTTP endpoint. This call site was deliberately left alone there:
nothing in that PR exercises this path, so changing it would have been an untested edit to an
unrelated feature.
Suggested work
getUsageLimitsreturn branch and confirm whethercsrfToken/pidcan reach theHTTP response. That answer sets the severity.
-x, or an explicit euid filter), or if a machine-wide scanis genuinely needed here, add
user=to the-ospec and filter by owner in code beforematching.
test/process-list.test.js:23does — a realpsrun on a single-user machine looks identical either way, so observed output cannot catch this.
Context
Found during the QA gate on #129: #129 (comment)