Title: security(cold-store-reaper): PR #976's curl S3 fallback passes the R2 secret in argv — the pattern #948/#970 removed the same day · Issue #983 · developing-today/code · GitHub
Open Graph Title: security(cold-store-reaper): PR #976's curl S3 fallback passes the R2 secret in argv — the pattern #948/#970 removed the same day · Issue #983 · developing-today/code
X Title: security(cold-store-reaper): PR #976's curl S3 fallback passes the R2 secret in argv — the pattern #948/#970 removed the same day · Issue #983 · developing-today/code
Description: Finding PR #976 (merged 2026-10-26, fix(cold-store-reaper): curl fallback for S3 downloads urllib cannot deliver) added a curl fallback for S3 downloads in pkgs/cold-store-reaper/cold_store.py. The fallback passes the R2 credentials to c...
Open Graph Description: Finding PR #976 (merged 2026-10-26, fix(cold-store-reaper): curl fallback for S3 downloads urllib cannot deliver) added a curl fallback for S3 downloads in pkgs/cold-store-reaper/cold_store.py. The...
X Description: Finding PR #976 (merged 2026-10-26, fix(cold-store-reaper): curl fallback for S3 downloads urllib cannot deliver) added a curl fallback for S3 downloads in pkgs/cold-store-reaper/cold_store.py. The...
Opengraph URL: https://github.com/developing-today/code/issues/983
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"security(cold-store-reaper): PR #976's curl S3 fallback passes the R2 secret in argv — the pattern #948/#970 removed the same day","articleBody":"## Finding\n\nPR #976 (merged 2026-10-26, `fix(cold-store-reaper): curl fallback for S3 downloads urllib cannot deliver`) added a curl fallback for S3 downloads in `pkgs/cold-store-reaper/cold_store.py`. The fallback passes the R2 credentials to curl as a command-line argument:\n\n- `cold_store.py` `_curl_fetch` (on current main `d715adf9`, ~lines 1526–1545) builds `argv = [curl, \"-sS\", \"--fail\", \"--aws-sigv4\", \"aws:amz:auto:s3\", \"--user\", f\"{access}:{secret}\", url]` and runs it with `subprocess.run`. The docstring acknowledges it: \"Credentials travel in argv — the local process list sees them, as with any credentialed CLI\".\n- Introduced in PR #976, commit `14617a5958` (`fix(cold-store-reaper): curl fallback for S3 downloads urllib cannot deliver`).\n\nAny local process can read another process's argv (`ps`, `/proc/\u003cpid>/cmdline`), so the bucket-scoped `R2_SECRET_ACCESS_KEY` is exposed for the whole duration of the download — and this fallback exists specifically for the *large* objects, with `S3_CURL_TIMEOUT_SECONDS = 900`, so the exposure window can be minutes long. The PR does scrub the credentials from error text, but that does not address the argv exposure itself.\n\n## Why it matters\n\nThis is the exact pattern this repo removed the same day, twice:\n\n- Issue #948 / PR #970 (merged ~1 hour before #976): the fleet-feed push's socat `ProxyCommand` embedded `proxyauth=\u003cuser>:\u003cpw>` in process argv; the fix replaced it with an in-process CONNECT relay that keeps the credential off every process's argv, and added `pm-stack/aggregator/scripts/push-fleet-feed.guard.sh`, whose stated rule is: \"proxy credential must never be an argv token\". That guard only covers `push-fleet-feed.sh`, so #976's reintroduction in another package was not caught.\n- The scrubbing in #976 protects logs, not the process list — the leak channel #948 was about.\n\nFix direction (triage decides): keep the credential out of argv — e.g. hand curl its config via a stdin config (`curl -K -` / `--config` from a pipe or a mode-600 temp file that is unlinked after use, with `user = \"access:secret\"` inside), or sign the request in-process like the urllib path already does and let curl send a pre-signed request, or another mechanism the worker verifies. The byte-count verification and the one-attempt semantics of the fallback must stay.\n\n## Acceptance criteria\n\n- [ ] The R2 access key / secret never appear in any spawned process's argv on the curl fallback path (verifiable: a test stubs `subprocess.run` — or inspects the spawned argv — and asserts neither credential value is present in any argv element).\n- [ ] The curl fallback still works end-to-end: existing `TestS3CurlFallback` coverage (fallback only after urllib exhaustion, byte-count verified against caller size or HEAD, errors scrubbed and named) passes, updated for the new credential channel.\n- [ ] Credentials remain scrubbed from all error text raised on this path.\n- [ ] Consider a repo-level guard in the spirit of `push-fleet-feed.guard.sh` so a `--user \u003caccess>:\u003csecret>`-style argv pattern in `cold_store.py` fails a check instead of relying on review to catch it.\n- [ ] The `_curl_fetch` docstring / README wording no longer presents argv credentials as acceptable.\n\nFound by the pr-diff-review job reviewing PR #976 against current main.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-26T15:32:43Z","url":"https://github.com/developing-today/code/issues/983"}
| 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:5c5d8f0f-2366-de81-ad9d-530d03be5845 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 925E:17B76C:7F79E0:A53A20:6B062C9D |
| html-safe-nonce | 31287e7a36d7c88e200b3c123be47a5cefafc3263094a3f4abe963f1375d44eb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjVFOjE3Qjc2Qzo3Rjc5RTA6QTUzQTIwOjZCMDYyQzlEIiwidmlzaXRvcl9pZCI6IjU4NzgyNjY4Njc4ODE0ODc1MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f254525cf84569b60a255e2832de1ddc90ddf115c002640fa4dda9e938a0bbba |
| hovercard-subject-tag | issue:6042863617 |
| 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/983/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a15a1a2d94fc0662d1f0e4f8e5b29f8b980ce8478ac99f66aa62e5da83c97068/developing-today/code/issues/983 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a15a1a2d94fc0662d1f0e4f8e5b29f8b980ce8478ac99f66aa62e5da83c97068/developing-today/code/issues/983 |
| og:image:alt | Finding PR #976 (merged 2026-10-26, fix(cold-store-reaper): curl fallback for S3 downloads urllib cannot deliver) added a curl fallback for S3 downloads in pkgs/cold-store-reaper/cold_store.py. The... |
| 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 | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| 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 | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| 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