Skip to content

fix(rules): anchor system var tmp paths - #93

Open
be-student wants to merge 2 commits into
Coding-Moves:mainfrom
be-student:fix/anchor-var-tmp
Open

fix(rules): anchor system var tmp paths#93
be-student wants to merge 2 commits into
Coding-Moves:mainfrom
be-student:fix/anchor-var-tmp

Conversation

@be-student

Copy link
Copy Markdown

Fixes #81.

What & why

Anchors the actionable var/tmp rule to Linux /var/tmp and macOS /private/var/tmp. User, project, and Homebrew var/tmp paths now remain unknown instead of being offered for quarantine.

Checklist

  • cargo fmt --all and strict clippy pass for diskern-core and diskern-cli
  • All 57 core and CLI tests pass
  • Commit is one focused safety-boundary change
  • Deterministic verdict and quarantine-only safety principles remain intact

The recursive var/tmp glob also matched user projects and Homebrew state, exposing them as actionable temporary files. Restrict the rule to the Linux and macOS system roots and pin both intended and excluded paths in tests.

@Muawiya-contact Muawiya-contact left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This one's spot on. Mirroring unix-system-logs is the right shape, and you covered all four cases from the issue plus the macOS path. Rebased and ran it here: fmt, clippy and 57 tests all clean.

Only outstanding thing is the changelog line, same as the other two.

@be-student

Copy link
Copy Markdown
Author

Merged current main and moved the changelog entry to Unreleased. cargo test -p diskern-core passes (61 tests).

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.

Rule temp-dirs still reaches a user's own var/tmp

2 participants