Skip to content

fix(config): stop a repo's ripr.toml from choosing a program ripr runs - #4438

Merged
EffortlessSteven merged 4 commits into
mainfrom
claude/0-11-issue-hunt-6646nm
Sep 28, 2026
Merged

EffortlessSteven merged 4 commits into
mainfrom
claude/0-11-issue-hunt-6646nm

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Requested by Steven · project thread

Summary

  • Before: a cloned repository's ripr.toml could set [perl] producer = "perl-ripr-facts" and executable = "sh" and commit a script named ripr-facts. ripr check, ripr doctor (the first command people run) and ripr lsp on didOpen/didSave then ran that script, even with Perl not enabled. Reproduced on swarm main 4cdad1a with the release binary for check and for lsp --stdio (marker file written). The managed argv starts with ripr-facts, so even a bare executable name was enough.
  • After: [perl].executable from ripr.toml is honored only when the invoking user sets RIPR_ALLOW_REPO_PERL_EXECUTABLE=1. Otherwise check and the LSP warn on stderr that the key was ignored and use the exporter on PATH; doctor prints executable: ignoring [perl].executable ... (not run) and probes only PATH candidates.
  • How: one gate in PerlConfig::executable() (config/model.rs), which both spawn sites (app/check.rs managed producer, cli/commands/doctor.rs probe) already read. Same threat model as the feat(doctor): probe verify-route runtimes for detected languages (#2071) #2183 isolated doctor tool probe (CWE-829). The VS Code extension already refuses to start the server in an untrusted workspace; Neovim/Helix/Zed-style clients and plain shells had no such gate.

Swarm / Source Boundary

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge, dependency, or repo-ops development for ripr-swarm

Source-of-truth Links

Governing issue or accepted claim: found by the 0.11 issue hunt (Steven's "any other issues we can find and fix" ask); no existing issue or PR (searched open/closed issues and open PRs for perl producer/executable).
Acceptance delta (one sentence): a repository config alone cannot make ripr execute a program.

Candidate Relationships

Candidate branch: claude/0-11-issue-hunt-6646nm. No stack parent, no replacement.

Scope

  • One production behavior: which Perl exporter executable ripr may spawn.

Non-goals: Perl managed-mode redesign, [perl].cache_dir validation, rustup/cargo's own rust-toolchain.toml / .cargo/config.toml behavior (cargo metadata --no-deps --offline was checked and does not run a configured rustc wrapper).

Support-tier Impact

  • changes a README, release, docs, CLI, JSON, editor, CI, or package claim — CHANGELOG entry, ripr check --help environment section, ripr.toml.example and ripr init template comment.

Policy Impact

  • none (no new spawn site; one new env read)

Proof

cargo test -p ripr --test cli_smoke repo_config_perl_executable   # ok
# negative control: gate forced open -> FAILED "ripr check ran repository code without opt-in"
cargo test -p ripr --lib perl_executable_from_repo_config        # ok
cargo xtask precommit                                             # exit 0

The end-to-end test (unix) commits the hostile ripr.toml + ripr-facts script, runs check and doctor with the opt-in 0 and asserts no marker plus the refusal wording, then runs check with 1 and asserts the marker exists, so the gate is the only thing that changed.

Claim Boundary

May claim: repository config cannot choose a program for ripr check, ripr doctor or ripr lsp to run. Must not claim: running ripr in an untrusted checkout is safe in general (cargo/rustup read repo-local toolchain config; agent verify-execute --authorize runs project tests by design).

Rollback

Revert the commit; no schema or artifact change.

Spec-Test-Code Traceability

  • Tests: crates/ripr/tests/cli_smoke.rs::repo_config_perl_executable_runs_only_with_user_opt_in, config::tests::perl_executable_from_repo_config_needs_user_opt_in
  • Code: crates/ripr/src/config/model.rs, app/check.rs, cli/commands/doctor.rs, cli/help/core.rs

Static Language Check

  • no static-output wording change

CI Economics

n/a

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented.
  • Errors are reported with actionable context (names the key and the opt-in).

Gates

  • cargo fmt --check
  • cargo xtask precommit (policy checks + on-diff Clippy)

Review note: exact-head review pending; CodeRabbit/Gemini/Devin are unavailable for this project's PRs (recorded as review missing, not clean).

🤖 Generated with Claude Code

https://claude.ai/code/session_01KbkbzVmEK3yrbNpw2SY5Ee


Generated by Claude Code

`[perl].executable` from a repository's ripr.toml was spawned by
`ripr check`, probed by `ripr doctor`, and spawned by `ripr lsp` on
didOpen/didSave, even with Perl not enabled. Because the managed argv
starts with `ripr-facts`, `executable = "sh"` plus a committed
`ripr-facts` script ran repository code in any editor or shell that
opened the clone.

The key is now honored only when the invoking user sets
RIPR_ALLOW_REPO_PERL_EXECUTABLE=1. Otherwise ripr says it ignored the
key and uses the exporter on PATH. Same threat model as the #2183
isolated doctor tool probe (CWE-829).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbkbzVmEK3yrbNpw2SY5Ee
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven EffortlessSteven self-assigned this Sep 28, 2026
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review September 28, 2026 17:48
@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: f3b0fd8d-c4ad-43ab-8963-7562b64a3a2f

📥 Commits

Reviewing files that changed from the base of the PR and between 2b85224 and 06f7a44.

📒 Files selected for processing (10)
  • CHANGELOG.md
  • crates/ripr/src/app/check.rs
  • crates/ripr/src/cli/commands/doctor.rs
  • crates/ripr/src/cli/help/core.rs
  • crates/ripr/src/config.rs
  • crates/ripr/src/config/model.rs
  • crates/ripr/src/config/tests.rs
  • crates/ripr/tests/cli_smoke.rs
  • docs/CONFIGURATION.md
  • ripr.toml.example

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T17:52:30.705593Z 705157f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbkbzVmEK3yrbNpw2SY5Ee

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 5 potential issues.

Devin Review

Comment thread crates/ripr/src/cli/commands/doctor.rs Resolved
Comment thread crates/ripr/src/cli/commands/doctor.rs Resolved
Comment thread crates/ripr/src/cli/help/core.rs Resolved
Comment thread crates/ripr/src/cli/commands/doctor.rs Resolved
Comment thread crates/ripr/tests/cli_smoke.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 705157f956

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/ripr/src/app/check.rs Resolved
Comment thread ripr.toml.example Resolved
Review follow-up on #4438: doctor's no-exporter line and next step
recommended [perl].executable without RIPR_ALLOW_REPO_PERL_EXECUTABLE=1,
and docs/CONFIGURATION.md still described the key as unconditional.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbkbzVmEK3yrbNpw2SY5Ee

Copy link
Copy Markdown
Member Author

Exact-head review record for 68ec2af. Disposition: REVIEW_READY.

  • Diff inspected in full (10 files). There is one gate in PerlConfig::executable(). Both spawn sites read it: the managed producer in app/check.rs, which serves check and lsp through check_workspace_worktree_with_config, and the probe in cli/commands/doctor.rs. Nothing else spawns from perl.executable, checked with a grep of executable() and .executable over crates/ripr/src. The identity field keeps the configured value, which is correct because it describes config, not what ran.
  • Oracle. repo_config_perl_executable_runs_only_with_user_opt_in runs the real binary against an external workspace. With the gate forced open it fails ("ripr check ran repository code without opt-in"). With the opt-in set to 1, the marker appears, so the gate is what the test discriminates.
  • Windows. The P1 on Windows cwd search is not reproducible: Rust std's search_paths does not search the current directory. The gate logic is platform-independent and the e2e test is cfg(unix), so Windows has no native execution evidence for this PR.
  • CI on 68ec2af. Routed Rust Small / Rust gates passed: policy, strict Clippy, required tests, doctests, goldens, fixture contracts, PR evidence. Ripr Rust Small Result, Rust-only feature lane, ub-review, cargo-deny, dependency-review and GitGuardian also passed.
  • Review threads. All 7 are answered and resolved: 3 fixed in 68ec2af, 4 answered with source evidence.
  • Missing review. CodeRabbit is rate-limited, Gemini is out of quota and droid is skipped, so review is missing for those providers, not clean. Codex and Devin reviewed 705157f; their findings are handled above.

Generated by Claude Code

Copy link
Copy Markdown
Member Author

Exact-head review refresh for 06f7a44 (merge of main 2b85224 into 68ec2af).

  • Changed dimensions: conflict resolution and integration basis. The production code, test stimulus, test oracle and public claim are unchanged from 68ec2af, which was reviewed in the earlier record.
  • Conflict: only CHANGELOG.md conflicted. I kept both sides; the Unreleased/Fixed list has this PR's entry plus every entry from main. cli_smoke.rs auto-merged.
  • Proof on the merged tree:
    • cargo fmt --check passes.
    • cargo xtask precommit exits 0.
    • repo_config_perl_executable_runs_only_with_user_opt_in and perl_executable_from_repo_config_needs_user_opt_in both pass.
  • Outside review: CodeRabbit is rate-limited, so its review is missing, not clean.
  • Disposition: REVIEW_READY, subject to required checks on this head. I am arming squash auto-merge so the ruleset holds the merge until they pass. Merge authority is Steven's standing LLM-convergence policy.

Generated by Claude Code

@EffortlessSteven
EffortlessSteven enabled auto-merge (squash) September 28, 2026 19:22
@EffortlessSteven
EffortlessSteven merged commit 96501de into main Sep 28, 2026
22 checks passed
@EffortlessSteven
EffortlessSteven deleted the claude/0-11-issue-hunt-6646nm branch September 28, 2026 19:44
EffortlessSteven pushed a commit that referenced this pull request Sep 29, 2026
…t order (#3921)

Codex on #4504: [perl].executable still runs with
RIPR_ALLOW_REPO_PERL_EXECUTABLE=1, so the security row names the opt-in.
#4414/#4440 and #4437/#4484 were grouped out of order; every row is now
one commit, and the 39 rows match git log --first-parent 112a834..66fd34f.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AYyUnjaq9zD4WsBujWEUpk
EffortlessSteven added a commit that referenced this pull request Sep 29, 2026
…#4504)

Adds a §0.6 table of every first-parent swarm merge from 112a834 through 66fd34f: 39 commits, each with its user-visible change and the notes section it belongs in. It flags the #4438 security fix and its opt-in, the exit-code changes, the workflow changes users must regenerate, the glibc floor and the classification changes. It also records that `exposed` at info is not a change from 0.10.0.

Merged under Steven's standing swarm merge policy. The exact head a62341a is green, has an exact-head COMMENT review with no blockers, has its findings answered and has no conflict. The Gemini and CodeRabbit reviews are missing (out of quota and rate-limited). Policy: cmsg_01PNTtQgh6otzUAgrEbiwJapLDNSeHy8MdztUC5UgRC71w, cmsg_01PNTtQgh6otzUAgrEbiwJapJ9t7fvZRC8p2kQ3xWU9c3m, cmsg_01PNTtQgh6otzUAgrEbiwJapXkeTSSUZZxybErtNj3dtgQ.

Refs #3921.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AYyUnjaq9zD4WsBujWEUpk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants