Title: 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 · GitHub
Open Graph Title: 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
X Title: 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
Description: 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/
Open Graph Description: 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 v...
X Description: 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-...
Opengraph URL: https://github.com/developing-today/code/issues/1027
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"cold-store-reaper: export-turso.sh passes Turso platform token and per-DB JWTs to curl in argv (process-list exposure, PR #993)","articleBody":"## Finding\n\n`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/\u003cpid>/cmdline`) for the whole life of the curl process — this is exactly the exposure pattern this repo has already removed twice:\n\n- #948 / PR #970 removed credential-bearing argv from `push-fleet-feed.sh`.\n- #983 / PR #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 #986 merged the same day PR #993 introduced the Turso script with the old pattern.\n\n## Evidence (verified on current main `76672b97df023607d8469d462f21420604fe92d5`, cross-checked via `gh pr diff 993` and the local clone)\n\n`pkgs/cold-store-reaper/scripts/export-turso.sh`:\n\n- Line 58–59: platform token in argv, `--max-time 60`\n ```\n curl -fsS --max-time 60 \\\n -H \"Authorization: Bearer ${TURSO_PLATFORM_API_TOKEN}\" \\\n \"${API_BASE}/v1/organizations/${ORG}/databases\"\n ```\n- Line 93–94: platform token again in argv for the per-database token mint (`-X POST …/auth/tokens`), `--max-time 60`.\n- 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:\n ```\n curl -fsS --max-time 300 \\\n -H \"Authorization: Bearer ${jwt}\" \\\n \"${dump_url}\" -o \"${dump_sql}\"\n ```\n\nThe 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.\n\nDeduped 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.\n\n## Why it matters\n\nAnyone (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).\n\n## Acceptance criteria\n\n- 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 #986, with the header value escaped the same way).\n- 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 #986 argv-guard test is the precedent).\n- 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.\n- The script header comment is updated so its credential-handling claim covers argv as well as logs/disk.\n\nSource: PR #993 — https://github.com/developing-today/code/pull/993 (commits `db58a67`, `00410ed`). Filed by the pr-diff-review job, 2026-10-26.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-26T23:29:12Z","url":"https://github.com/developing-today/code/issues/1027"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:295a9d1d-3044-498d-8553-420373485b57 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CAFE:1139E2:472F02:5F70CB:6B061E35 |
| html-safe-nonce | 96858302dd2d6c74a76275112df77b8283bd86b222f5b3da72f817cf24aaa875 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUZFOjExMzlFMjo0NzJGMDI6NUY3MENCOjZCMDYxRTM1IiwidmlzaXRvcl9pZCI6IjM3Njk5NTY4NDc3ODkxNTM4NDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 73b327de93dd71d1dac7ae9cbe56c3e2ee2f027f925fe4fd8cc89fbcbb91ac41 |
| hovercard-subject-tag | issue:6049998778 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/1027/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2c6f9eee382731bd1b73b07c73c66e39f3556364de9a98d69c698408648cc645/developing-today/code/issues/1027 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2c6f9eee382731bd1b73b07c73c66e39f3556364de9a98d69c698408648cc645/developing-today/code/issues/1027 |
| og:image:alt | 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 v... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9a7c5824b75ea2ec5e3de73a483229c7bb9f32a774ffd401f010dd9bacf1483d |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b25c3080e84402f75431d8dc7a96b2635219cec7 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width