Harden worker secret logging#2784
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This comment has been minimized.
This comment has been minimized.
|
Codex review: needs maintainer review before merge. Reviewed June 24, 2026, 9:26 PM ET / 01:26 UTC. Summary Reproducibility: yes. Source inspection on current main shows failed worker downloads can include raw signed URLs and raw worker errors can flow into logs or Convex failure fields; I did not run a live production worker in this read-only review. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the centralized redaction, structured logging, persistence sanitization, and diagnostics scan gate after worker/security owners accept the redaction non-goals and workflow artifact boundary, with a focused spec note if maintainers want the contract recorded. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows failed worker downloads can include raw signed URLs and raw worker errors can flow into logs or Convex failure fields; I did not run a live production worker in this read-only review. Is this the best way to solve the issue? Yes. The PR addresses the implicated layers: shared cleanup, structured worker logging, download error text, diagnostics redaction, workflow secret scope, and Convex persistence; the remaining question is maintainer acceptance of the security/operator boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3ef5f14d84a7. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Summary
This hardens ClawHub production worker logging so signed artifact URLs and auth headers do not move through GitHub Actions logs, diagnostics artifacts, or persisted Convex failure fields. The worker-side cleanup is intentionally narrow: it strips URL/auth transport leak paths, masks exact runtime values in GitHub Actions, and structurally redacts diagnostics content instead of trying to detect arbitrary secrets. TruffleHog remains the broad verified-secret detector before diagnostics artifacts can be uploaded.
What Changed
workerRedactionnow handles URL cleanup, bearer/basic auth header cleanup, safe artifact path labels, and GitHub Actions exact-value masking. It does not maintain generic token/API-key/provider-key regex detection.failCodexScanJobreceives sanitized error text.failSkillCardJobarguments use the same narrow logging and masking boundary.console.log,console.warn, orconsole.errorcreeping back into job lifecycle/failure paths.Proof
Behavioral proof:
http(s)URLs and bearer/basic auth headers, but deliberately leaves generic token-looking text to TruffleHog instead of duplicating secret-detection rules.type,status,verdict, andseverity; content-like and unknown string fields are structurally summarized.::add-mask::commands are emitted for dynamic artifact URLs and known runtime worker secrets before later logs are written.actions/upload-artifactfor security scan diagnostics, and upload is conditioned on the scan step succeeding.Reviewer-checkable examples:
Verification
Automated checks:
static,unit,types-build,packages,e2e-http,playwright-smoke, allplaywright-local-authshards, both verified-secret scans, Vercel, dispatch, and auto-response. CodeQL Light Analyze is skipped as expected for this matrix.0; pinned TruffleHog broad local scan with--no-verification --results=verified,unknown,unverifiedexited0.bun run test -- scripts/lib/workerRedaction.test.ts scripts/lib/workerLogger.test.ts scripts/security/run-codex-scan-worker.test.ts scripts/skill-cards/run-skill-card-worker.test.ts scripts/security/security-scan-worker-workflow.test.ts scripts/skill-cards/skill-card-worker-workflow.test.ts scripts/worker-console-guard.test.ts convex/securityScan.test.tspassed: 8 files, 97 tests.bun run ci:unitpassed: 288 files passed, 3697 tests passed, 1 skipped; coverage above threshold.bun run format:check -- convex/securityScan.ts convex/securityScan.test.ts scripts/lib/workerRedaction.ts scripts/lib/workerRedaction.test.ts scripts/security/run-codex-scan-worker.ts scripts/security/run-codex-scan-worker.test.ts scripts/skill-cards/run-skill-card-worker.tspassed.bunx oxlint --type-aware --tsconfig ./tsconfig.oxlint.json convex/securityScan.ts convex/securityScan.test.ts scripts/lib/workerRedaction.ts scripts/lib/workerRedaction.test.ts scripts/security/run-codex-scan-worker.ts scripts/security/run-codex-scan-worker.test.ts scripts/skill-cards/run-skill-card-worker.tspassed.actionlint .github/workflows/security-scan-codex.yml .github/workflows/skill-card-worker.ymlpassed.bunx tsc -p convex/tsconfig.json --noEmitpassed.bunx tsc -p packages/schema/tsconfig.json --noEmitpassed.bunx tsc -p packages/clawhub/tsconfig.json --noEmitpassed.git diff --checkpassed.Local-only baseline observations:
bun run ci:staticfailed locally on unrelated oxlint findings inconvex/search.test.ts:2288andconvex/skills.resolve.test.ts:21, but the GitHubstaticcheck passed on this PR head.bun run ci:types-buildfailed locally on the known unrelated root TypeScript issue ine2e/prod-http-smoke.e2e.test.ts:94:Cannot find name 'lastError', but the GitHubtypes-buildcheck passed on this PR head.Screenshots
No screenshots are included because this is backend worker, Convex persistence, and CI workflow hardening with no reviewer-visible UI change.