Skip to content

Directory warning RUNTIME_FETCH_EXEC (download-and-run) rose from 2 to 3 findings on v0.38.0; find the real matches #864

Closed

Description

@fdaviddpt

The Anthropic directory's scan of the release tree raises the warning "Contains a download-and-run command" (RUNTIME_FETCH_EXEC):

  • v0.37.0 (e6cf58f): 2 findings, in pipeline/shell.py and scripts/log.sh.
  • v0.38.0 (e3cfd5b): 3 findings, files not yet seen.

#861 reworded a docstring in pipeline/shell.py and a comment in scripts/log.sh, on the guess that the matcher hit comment text. That guess did not hold: the count went up. v0.38.0 also added #845's SessionStart budget code.

It is a warning, not a hold. The portal says "Where it only appears in documentation, nothing needs to change." Still, it's worth knowing what triggers it, both for us and for claude-supertool and claude-jit-context.

Steps

  1. In the portal: Versions → v0.38.0 · e3cfd5b → expand "Contains a download-and-run command". Record the files (and lines, if shown).
  2. For each: does the plugin really download and run something? If yes, fix it or disclose it. If no, document it as a false positive in docs/releasing.md, with the exact trigger.
  3. If a pattern is identifiable, consider teaching .github/scripts/check_release_tree.py to flag it as a REVIEW line.

[AI-generated]

Activity

  1. added
    priority:low
    lane-other
    on Oct 2, 2026
  2. self-assigned this
    on Oct 2, 2026
  3. added a commit that references this issue on Oct 2, 2026
  4. removed their assignment
    on Oct 2, 2026
  5. fdaviddpt commented on Oct 2, 2026

    @fdaviddpt
    ContributorAuthor

    Portal row for RUNTIME_FETCH_EXEC on v0.38.0, expanded. The maintainer screenshotted it on 2026-10-02 at 21:23 CEST; the latest check had run 4 hours before.

    "Contains a download-and-run command", 3 findings, one per file:

    • CHANGELOG.md
    • pipeline/shell.py
    • scripts/log.sh

    The portal names the files only, with no line numbers. Its remedy text: "Where the plugin runs this, ship the script inside the plugin and run that file instead. Where it only appears in documentation, nothing needs to change."

    What is left for a lane: find the matching text in pipeline/shell.py and scripts/log.sh, which are executed code, and decide for each whether it really downloads and runs something or is a false positive (a string, a comment, or a pattern that only looks like one). CHANGELOG.md is documentation, so by the portal's own rule it needs nothing.

    [AI-generated]

  6. fdaviddpt commented on Oct 2, 2026

    @fdaviddpt
    ContributorAuthor

    Checked on main (2026-10-02): all 3 findings are false positives, and nothing downloads anything.

    • pipeline/shell.py: no curl, wget, urllib or Invoke-WebRequest. The only matches are the words eval and safe_eval in docstrings: the module prints KEY=VALUE lines, and scripts/log.sh:safe_eval assigns them with printf -v, never through eval.
    • scripts/log.sh: no curl, wget or | sh. It has eval "NAME=value" at L518 and L532, applied only to lines that have already passed _remember_cfg_flatten_cache_valid_line (one %q-quoted assignment from a local cache file), plus a comment at L1126 showing safe_eval <<< "$(python3 -m pipeline.shell extract ...)". That is local output assigned as variables, not fetched code. The heuristic most likely matches the shape "eval of a command substitution".
    • CHANGELOG.md: no curl ... | sh-style line. It mentions curl/wget only as prose, as the binaries named in the allowed-tools rule (L34-35), and the text describing this very finding (L42-43).

    By the portal's own remedy text ("Where it only appears in documentation, nothing needs to change"), there is nothing to change, and no new version is needed for it. PR #871 already recorded the analysis in docs/releasing.md. Closing.

    [AI-generated]

  7. added
    priority:medium
    and removed
    priority:low
    on Oct 2, 2026
  8. fdaviddpt commented on Oct 2, 2026

    @fdaviddpt
    ContributorAuthor

    Reopened: the goal is now zero RUNTIME_FETCH_EXEC findings, not just an explanation. The maintainer's reasoning (2026-10-02): every warning is something a reviewer has to look at, so a warning we can remove is reviewer time we save. This matters while the plugin-level hold (#863) is open.

    What we know, so the fix is measured rather than guessed:

    • Rewording comments alone does not work. fix(#859): scope /remember:doctor's allowed-tools, match the directory's ALLOWED_TOOLS_BROAD rule, add listing links, document the observed portal scans #861 reworded the shell.py docstring and a log.sh comment, and the count went from 2 to 3. Do not repeat that on its own.
    • CHANGELOG.md is new on v0.38.0. The likely trigger is the v0.38.0 entry text at L34-43, which names curl/wget and describes "eval of a command substitution". It is prose in the newest entry, so cheap to reword (reasoned; the portal gives no line numbers).
    • scripts/log.sh has real eval calls at L518 (eval "_identity=$_identity_raw") and L532 (eval "$_assign"), plus the safe_eval function and a comment at L1126 showing safe_eval <<< "$(python3 -m pipeline.shell extract ...)". The matcher most likely keys on eval with a command substitution, or on the word eval in an executed file.
    • pipeline/shell.py still says eval/safe_eval/"shell-evaluable" in its docstrings (L1, L4, L48-57).

    Plan

    1. CHANGELOG.md: reword the v0.38.0 entry so it does not spell out curl, wget or eval "$(...)".
    2. Remove eval from executed code in scripts/log.sh: replace L518 and L532 with assignments that do not go through eval, for example printf -v on a decoded value. Rename safe_eval to a name without eval, along with every caller and the pipeline/shell.py docstrings. This is the risky part. It sits on the hot path tuned in SessionStart hook averages ~12.5s on Windows (Git Bash) — measured over 36 session starts on v0.29.1 #660, has to keep Bash 3.2 compatibility, and has Auto-save pipeline broken on Windows/Git Bash: CRLF + single-quote path wrapping in safe_eval #84's and the Turkish-locale history. Red tests first: identical assignments for every value shape %q emits, ~ and : included (see the L326-347 comments).
    3. Teach .github/scripts/check_release_tree.py a REVIEW line for eval and curl|wget … | sh in shipped files (ties into Release tooling reuse: make smoke_release_tree.py configurable, and close the gaps where check_release_tree.py is weaker than the portal #866), so the next one is caught before upload.
    4. Verify on the next release's portal scan. Only the portal can confirm the count reached 0.

    Ships with the next regular release, not a special one.

    [AI-generated]

  9. added 2 commits that reference this issue on Oct 2, 2026
  10. added 8 commits that reference this issue on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lane-otherpriority:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions