Skip to content

fix(tier3): preserve scoped NUL-delimited temporary-file cleanup - #790

Merged
rng1995 merged 2 commits into
NVIDIA:mainfrom
YMuskrat:followup/scoped-find-xargs
Nov 19, 2026
Merged

rng1995 merged 2 commits into
NVIDIA:mainfrom
YMuskrat:followup/scoped-find-xargs

Conversation

@YMuskrat

Copy link
Copy Markdown
Contributor

Summary

Preserve Security 1.0 for a narrow temporary-file cleanup pipeline: find /tmp/cache -type f -print0 | xargs -0 -r rm -f. Recognize only one literal temporary-root producer, non-following file selection, NUL output/input and force-only removal without written targets. Optional quoted name filters and the documented null/no-run-if-empty spellings are supported.

Unknown producers, whitespace-delimited output, unquoted globs, link-following options, traversal, alternate xargs inputs, replacement targets, recursive removal, extra commands and earlier symlink evidence keep the destructive finding. This is the existing command-text policy, not a runtime filesystem-containment guarantee.

Implements the optional producer-aware direction on #231 with a deliberately narrower NUL-safe first version; the plain whitespace examples remain conservative.

Verification

  • Familiar with contributing guidelines; commit signed off
  • Deletion/cache suites and new host/verifier coverage: 3,734 passed, including 58 new cases
  • make lint, wheel/source build and Fern validation passed
  • Updated policy documentation
  • Ran make test: 2,621 passed, 3 skipped, 4 failed before the failure limit. Those four cases also fail on unchanged upstream affe1ac with the same locked dependencies and isolated temporary directory. Full-suite success is not claimed.
  • No credentials, private datasets or proprietary benchmark content added

Python 3.12; test commands are classifier strings, not executed deletions. The exemption is bounded to 4 KiB and 128 words and retains conservative handling when parsing is uncertain.

Release Impact

  • Updated CHANGELOG.md

Follow up on the reviewed Tier 3 cleanup policy with focused host and verifier regressions.

Signed-off-by: YMuskrat <101849520+YMuskrat@users.noreply.github.com>
Comment thread docs/tier3-results.mdx Resolved

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for the contribution! Reviewed the narrow NUL-delimited cleanup grammar, root containment, rejection cases and host/verifier parity. Destructive-command, scoped-cleanup and cache suites passed (3,734 tests). No blocking findings; the existing characters-versus-bytes documentation nit remains nonblocking.

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @YMuskrat for this contribution! I reviewed 78ebecc366. I reproduced the problem on main, and ran the new and related tests on this head (all pass). I left 3 inline comments (1 P2, 2 P3); please address them before this is merged.

Comment thread CHANGELOG.md Resolved
Comment thread docs/tier3-results.mdx Resolved
Refresh from upstream main, compare retained quotes with actual POSIX shell words, and cover the reported producer bypass in both security checkers. Clarify the restored scoring behavior, literal filters, and character bound.

Co-authored-by: Codex <codex@openai.com>
Signed-off-by: YMuskrat <101849520+YMuskrat@users.noreply.github.com>
@YMuskrat

Copy link
Copy Markdown
Contributor Author

Fixed and pushed in 2fdf147. The quoted-word bypass is covered by the POSIX word check and host/verifier regressions. Focused local tests pass; full-suite failures also reproduce on unchanged main.

@rng1995
rng1995 merged commit 1f6b0e1 into NVIDIA:main Nov 19, 2026
25 checks passed
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.

3 participants