Repository navigation
feat(doctor): report whether the process guard is in force - #691
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
# Conflicts: # docs/threat-model.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
tole doctorprints one line saying whether the #675 process guard is in force. It showsprocess guard: ✓ non-dumpablewhen same-user children cannot read tole's/proc/<pid>/environor memory, and! dumpableotherwise. The line appears on Linux only and names no secret.Why
The owner asked for it after #687 merged:
PR_SET_DUMPABLEis now in force, and an owner should be able to see that the guard is active without reading/procby hand.Changes
doctor::process_guard_line(Option<bool>): a pure function overtole_core::process_guard::inspection_denied(). It returnsNone(no line) where the platform has no such switch.run_cliprints it after the secrets report.[Unreleased]/ Added: one entry.Testing
doctor::tests::the_process_guard_line_says_which_state_and_nothing_elsewhere: both states, and no line off Linux.tests/doctor_ecosystem.rs::doctor_reports_the_process_guard(real binary, Linux): the output containsprocess guard: ✓ non-dumpable.deny_inspectioncall inmaindisabled, the end-to-end test fails and the doctor printsprocess guard: ! dumpable: ....cargo fmt --all --check,cargo clippy --workspace --all-targets --all-features -- -D warnings,cargo test --workspace,cargo test -p tole-core --no-default-features,cargo test -p tole-cli --no-default-features --features shell-tools, andcora review --no-llm --base origin/develop(no issues).Refs #675