Repository navigation
Conversation
…oup-id [WEB-5602] Report stable discovery agent group IDs
WEB-6954: Apply memory file fixes after the daily root scan
vigneshsubbiah16
left a comment
There was a problem hiding this comment.
✅ Security consensus: no issues found. (reviewers: Claude, Semgrep, Gitleaks)
Pre-existing (not introduced by this PR)
- [MEDIUM] API key is passed to curl on the command line —
scripts/coding_discovery_tools/s3_uploader.py:269- What:
_curl_post_jsonstill sends-H "Authorization: Bearer {api_key}"as a curl argument. Any local user can read curl's arguments in the process list while the request runs. - Why it matters now: this PR adds a comment that moves the request body to stdin because "the process list … every local user can read". The bearer token stays in the arguments anyway. The new memory-fix poll also makes repeated calls for up to 25 minutes after each scan, so the token is exposed for longer.
- Fix: Put the headers in a curl config file read from stdin, or a 0600 temp file passed with
-K/--config. Send the body with--data-binary @file, or put it in the same config, so the API key never appears in the arguments. - Flagged by: Claude
- What:
- Semgrep
python-logger-credential-disclosureatutils.py:2347andutils.py:2356is on lines this diff does not touch. Those calls log a file path and an exception message, not the credential itself. Not re-raised.
🤖 consensus review · reviewers: Claude, Semgrep, Gitleaks · head a7c5c2f2 · 2026-11-27T15:54Z
| mine = _identity(dir_fd, temp_name) | ||
| swapped = _exchange(dir_fd, temp_name, name) | ||
| if swapped is None: | ||
| os.rename(temp_name, name, src_dir_fd=dir_fd, dst_dir_fd=dir_fd) |
There was a problem hiding this comment.
P1 · Avoid overwriting concurrent saves on fallback (codex)
When atomic exchange is unavailable, a user save that lands after the preceding identity check is overwritten by the remediation file. The helper then reports success, losing the user's newer memory content.
memory_fix_helper.py:243-245 checks the file before calling _put_in_place; lines 220-223 fall back to an unconditional rename when _exchange returns None. The fallback cannot detect a save between the check and rename.
| memories = collect_claude_memories(user_home, user_name) | ||
| if memories: | ||
| tool_filtered["memories"] = memories | ||
| if memory_fixes_pending: |
There was a problem hiding this comment.
P1 · Collect fix candidates for resumed tools (codex)
A resumed scan skips Claude Code entries already reported by the interrupted run, so it never collects their memory files for pending fixes. The scan can complete successfully while the requested remediation is not attempted.
ai_tools_discovery.py:4524-4532 skips a fully resumed tool and lines 4570-4573 skip resumed user entries. The only collection of memory_fix_files occurs later at lines 4651-4658, and the fix step at lines 5109-5113 receives that incomplete list.
Scope
Promote the full staging branch to main. Includes #437, which reports stable discovery agent group IDs. Also includes #441 (WEB-6954 memory-fix agent), which is outside WEB-5602.
Verification
At creation, staging had six commits not in main, and main had seventeen commits not in staging. Review mergeability and the full release scope. Verify the scanner artifact used in staging includes #437 and reports the intended tool variant before relying on the end-to-end sanction test.
Unbound Review · Score 2/5 (2 P1s) ·
a7c5c2ffindings: 0 P0 · 2 P1 · 1 P2 (top 5 P0/P1 inline) · engines: codex ✅ · claude ✅
Findings not posted inline
scripts/coding_discovery_tools/memory_fix.py:222Result post retried back-to-back with no backoff — _post_result retries the results POST 3 times with no delay between tries. The file has already been edited at this point. A brief backend or network outage of a few seconds can fail all 3 tries, so the edit is never reported (it is only counted as results_post_failed). On the next run the file hash (claude)rules applied: CLAUDE.md