Skip to content

fix(guardrails): unwrap sg/setpriv/prlimit/systemd-run in root-delete (#4685) - #4717

Merged
cursor[bot] merged 8 commits into
mainfrom
cursor/4685-root-delete-launchers-37e9
Sep 28, 2026
Merged

cursor[bot] merged 8 commits into
mainfrom
cursor/4685-root-delete-launchers-37e9

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

Closes #4685

Summary

block-root-delete-target unwraps sg, setpriv, prlimit, systemd-run plus abbreviated long-option readings (env --spl=…, nsenter --t, sudo forms). Issue-measured rc 0 rows now exit 2; benign launcher+ls stays 0.

guardrails → 0.37.6.

Test plan

  • Issue command table + cwd cases (per implementer)
Open in Web Open in Cursor 

…delete (#4685)

block-root-delete-target ended its launcher walk at any unlisted name, so
sg root -c 'rm -rf /', setpriv --reuid=0 rm -rf /, prlimit --nofile=10
rm -rf / and systemd-run rm -rf / all exited 0. setpriv, prlimit and
systemd-run join the launcher table with their operand-taking options,
and sg re-parses the one word it hands to sh -c.

Launcher spellings the walk read one way only are judged on a second
reading as well, blocking if either does: an abbreviated env
--split-string, an ambiguous nsenter prefix (any operand-taking
candidate), su and runuser argv as getopt reads it under an inherited
POSIXLY_CORRECT, and sudo's -R / --chroot, operand-taking clusters and
abbreviated long options, which were declared gaps. sudo -R rm -rf /
stays refused.

A replay of the 989 Bash commands the guard suites send, plus the
issue's rows, found no command main refuses that this allows, with or
without a payload cwd.

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR body contract — issue linkage

This PR body does not yet satisfy the issue-linkage contract:

  • Missing a "## Fix" section. State the concrete change and how it addresses the problem.
  • Missing a "## Verification" section. Record concrete evidence the change works (commands, gates, output).
  • Missing a "## Related" section. List related PRs, ADRs, or decision-log entries this PR does not close.

Edit the body and this comment updates itself on the next run.

cursoragent and others added 2 commits September 27, 2026 23:55
Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
Re-bump guardrails to 0.38.2 after 0.38.1 landed.

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
@cursor
cursor Bot marked this pull request as ready for review September 27, 2026 23:58
cursoragent and others added 5 commits September 28, 2026 00:10
Re-bump guardrails to 0.38.3 after 0.38.2 landed.

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
# Conflicts:
#	plugins/guardrails/CHANGELOG.md

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
# Conflicts:
#	plugins/guardrails/CHANGELOG.md

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
# Conflicts:
#	plugins/guardrails/CHANGELOG.md

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
# Conflicts:
#	plugins/guardrails/CHANGELOG.md

Co-authored-by: Kyle Sexton <kyle-sexton@users.noreply.github.com>
@cursor
cursor Bot merged commit 65c560b into main Sep 28, 2026
15 checks passed
@cursor
cursor Bot deleted the cursor/4685-root-delete-launchers-37e9 branch September 28, 2026 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(guardrails): unwrap sg, setpriv, prlimit and systemd-run in root-delete

2 participants