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 — cold-store-reaper: export-turso.sh passes Turso platform token and per-DB JWTs to curl in argv (process-list exposure, PR #993) · Issue #1027 · developing-today/code

cold-store-reaper: export-turso.sh passes Turso platform token and per-DB JWTs to curl in argv (process-list exposure, PR #993) #1027

New issue
Copy link
New issue
Copy link
Closed
#1034
Closed
cold-store-reaper: export-turso.sh passes Turso platform token and per-DB JWTs to curl in argv (process-list exposure, PR #993)#1027
#1034
Copy link
Assignees
dezren39
Labels
app/cold-store-reaperPackage/app: cold-store-reaper (pkgs/ or apps/ in this repo)kind/securitySecurity issue or security hardeningpriority/highImportant and time-sensitivesource/pr-diff-reviewFiled by the pr-diff-review jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 26, 2026
Issue body actions

Finding

pkgs/cold-store-reaper/scripts/export-turso.sh (added by PR #993) passes Turso credentials to curl as -H "Authorization: Bearer …" argv elements. Command-line arguments are world-readable via the process list (ps, /proc/<pid>/cmdline) for the whole life of the curl process — this is exactly the exposure pattern this repo has already removed twice:

  • security(aggregator): fleet-feed push exposes the proxy credential in process argv and disables SSH host-key verification #948 / PR security(aggregator): keep fleet-feed proxy credential off argv, pin laptop host key #970 removed credential-bearing argv from push-fleet-feed.sh.
  • security(cold-store-reaper): PR #976's curl S3 fallback passes the R2 secret in argv — the pattern #948/#970 removed the same day #983 / PR fix(cold-store-reaper): keep R2 secret out of curl argv via stdin config (#983) #986 removed the R2 secret from cold_store.py's curl argv, moving it to a curl config fed on stdin (_curl_fetch, --config -). PR fix(cold-store-reaper): keep R2 secret out of curl argv via stdin config (#983) #986 merged the same day PR cold-store: nightly Turso exports via HTTP APIs #993 introduced the Turso script with the old pattern.

Evidence (verified on current main 76672b97df023607d8469d462f21420604fe92d5, cross-checked via gh pr diff 993 and the local clone)

pkgs/cold-store-reaper/scripts/export-turso.sh:

  • Line 58–59: platform token in argv, --max-time 60
    curl -fsS --max-time 60 \
      -H "Authorization: Bearer ${TURSO_PLATFORM_API_TOKEN}" \
      "${API_BASE}/v1/organizations/${ORG}/databases"
    
  • Line 93–94: platform token again in argv for the per-database token mint (-X POST …/auth/tokens), --max-time 60.
  • Line 120–121: the minted per-database JWT in argv for the dump download, --max-time 300 — up to five minutes of exposure per database:
    curl -fsS --max-time 300 \
      -H "Authorization: Bearer ${jwt}" \
      "${dump_url}" -o "${dump_sql}"
    

The script's own header says "the script stores nothing and never prints a token value" — true for logs and disk, but argv is a third channel it does not cover. The platform token is long-lived and org-wide (it can mint per-database tokens); the per-DB JWTs are shorter-lived but grant full dump access to that database's contents while valid.

Deduped 2026-10-26: gh issue list --search 'turso curl argv', --search 'export-turso', and --search 'Bearer argv process list' return no existing issue. #983/#986 are closed and cover cold_store.py only, not this script.

Why it matters

Anyone (or any process) able to read the process list on the machine running the nightly backup can harvest the Turso platform token during any of the three curl windows — the dump download window is up to 300s per database, every night. This reintroduces a credential-exposure class the fleet explicitly decided to eliminate (#948, #983).

Acceptance criteria

  • No Turso credential (platform token or per-database JWT) appears in any process's argv during export-turso.sh runs: credentials reach curl via a non-argv channel (e.g. the stdin curl-config pattern _curl_fetch established in fix(cold-store-reaper): keep R2 secret out of curl argv via stdin config (#983) #986, with the header value escaped the same way).
  • A regression test in the existing Turso test harness (TestTursoExportScript) asserts no argv element of any spawned curl contains the platform token or a minted JWT (the fix(cold-store-reaper): keep R2 secret out of curl argv via stdin config (#983) #986 argv-guard test is the precedent).
  • Existing behaviour unchanged: skip contract when TURSO_PLATFORM_API_TOKEN is unset, per-database failure isolation, integrity-check gating, and the existing fake-Turso tests all still pass.
  • The script header comment is updated so its credential-handling claim covers argv as well as logs/disk.

Source: PR #993 — #993 (commits db58a67, 00410ed). Filed by the pr-diff-review job, 2026-10-26.

Activity

Next
  1. dezren39
    added
    kind/securitySecurity issue or security hardening
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/pr-diff-reviewFiled by the pr-diff-review job
    on Oct 26, 2026
  2. developing-today commented on Oct 26, 2026

    @developing-today
    developing-todayBot
    on Oct 26, 2026 – with developing.today
    Contributor
    More actions

    CODE-181

  3. dezren39
    added
    priority/highImportant and time-sensitive
    queue/queuedHas a queued queue task
    app/cold-store-reaperPackage/app: cold-store-reaper (pkgs/ or apps/ in this repo)
    on Oct 26, 2026
  4. github-actions
    assigned
    dezren39
    on Oct 26, 2026
  5. dezren39 commented on Oct 26, 2026

    @dezren39
    dezren39
    on Oct 26, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: pr-diff-review job
    • Session / ID: pr-diff-review cron run 2026-10-26 18:24 CDT
    • Found via: filed this run
    • Task: PR cold-store: nightly Turso exports via HTTP APIs #993's export-turso.sh passes the Turso platform token (lines 59, 94) and per-database JWTs (line 121, --max-time 300) to curl as -H argv elements, readable in the process list — the exposure class security(aggregator): fleet-feed push exposes the proxy credential in process argv and disables SSH host-key verification #948 and security(cold-store-reaper): PR #976's curl S3 fallback passes the R2 secret in argv — the pattern #948/#970 removed the same day #983/fix(cold-store-reaper): keep R2 secret out of curl argv via stdin config (#983) #986 already removed elsewhere in this repo. Verified on current main 76672b9 via gh pr diff 993 and the local clone; deduped (no existing turso/argv issue). Enqueued as a triage packet to repo-health-code-pilot.
    • Expectation: triage confirms the channel and routes the stdin-config fix (the fix(cold-store-reaper): keep R2 secret out of curl argv via stdin config (#983) #986 _curl_fetch precedent) plus an argv-guard regression test; done when no Turso credential appears in any curl argv and existing Turso tests pass.
    • Links: PR cold-store: nightly Turso exports via HTTP APIs #993 · body hidden_files/issue-code-993-turso-token-argv-body.md
  6. 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 Oct 26, 2026
  7. 9 remaining items

  8. developing-today
    added
    status:in-review
    on Oct 26, 2026
  9. dezren39 commented on Oct 26, 2026

    @dezren39
    dezren39
    on Oct 26, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), Lane B shift
    • Session / ID: queue task 1199
    • Found via: queue claim
    • Task: Fix complete — PR fix(cold-store-reaper): keep Turso credentials out of curl argv in export-turso.sh (#1027) #1034 routes all three export-turso.sh curl calls through a stdin-fed curl config; argv-capture regression test added.
    • Expectation: done looks like PR fix(cold-store-reaper): keep Turso credentials out of curl argv in export-turso.sh (#1027) #1034 CI green and merged (closes this issue); worker is polling CI now, and will park the task if CI outlives the poll window.
    • Links: PR fix(cold-store-reaper): keep Turso credentials out of curl argv in export-turso.sh (#1027) #1034 · branch queue/1199-1027-turso-stdin-config @ e2a3ee6
  10. dezren39
    added
    queue/needs-reviewQueue task finished and is awaiting review
    status/needs-reviewReady for review
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Oct 26, 2026
  11. dezren39
    added a commit that references this issue on Oct 26, 2026

    style(cold-store-reaper): treefmt export-turso.sh and its test (#1027)

    f0ef1bc
  12. dezren39
    closed this as completedin #1034on Oct 26, 2026
  13. dezren39
    added a commit that references this issue on Oct 26, 2026

    Merge pull request #1034 from developing-today/queue/1199-1027-turso-…

    d95b9c3
  14. developing-today
    added
    status:done
    and removed
    status:in-review
    on Oct 26, 2026
  15. dezren39 commented on Oct 26, 2026

    @dezren39
    dezren39
    on Oct 26, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), Lane B shift
    • Session / ID: queue task 1199
    • Found via: queue claim
    • Task: Done — PR fix(cold-store-reaper): keep Turso credentials out of curl argv in export-turso.sh (#1027) #1034 merged (merge commit d95b9c3); this issue closed by the PR.
    • Expectation: met — all three curl calls in export-turso.sh now take the Authorization header from a stdin-fed curl config; new tests/test_export_turso.py argv-capture regression test passes; full cold-store suite 61 tests OK; CI green (treefmt, Nix flake evaluation).
    • Links: PR fix(cold-store-reaper): keep Turso credentials out of curl argv in export-turso.sh (#1027) #1034 · branch queue/1199-1027-turso-stdin-config @ f0ef1bc
  16. dezren39
    removed
    status/needs-reviewReady for review
    queue/needs-reviewQueue task finished and is awaiting review
    work/assignedQueue worker lifecycle state
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/cold-store-reaperPackage/app: cold-store-reaper (pkgs/ or apps/ in this repo)kind/securitySecurity issue or security hardeningpriority/highImportant and time-sensitivesource/pr-diff-reviewFiled by the pr-diff-review 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.