Repository navigation
Conversation
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.
Intent
Herdr presentation locks use a shared local directory. A setgid temporary parent can leave an owner-only namespace at mode 2700, which the previous exact-0700 check rejected. This PR gives the lock namespace a portable private-directory check: it normalizes safe directories to 0700 and refuses replaceable parents, symlinks, and pre-existing open directories.
What Changed
Risk Assessment
✅ Low: The focused change normalizes private lock directories and fails closed on unsafe directory states, with behavioral tests covering the safe and refusal paths.
Testing
Ran the focused directory-permission and Herdr backend behavior suites, then exercised setgid normalization and unsafe-parent, open-directory, and symlink refusals through the real adapter against an isolated Herdr session; all scenarios passed and the session and worktree fixtures were cleaned up. The host did not reproduce setgid inheritance from a parent, so the live normalization case started with a private directory explicitly set to 2700.
Evidence: Live Herdr lock-path behavior
Source: Live Herdr lock-path behavior
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
tests/fm-dir-perms.test.shtests/fm-backend-herdr.test.shbin/fm-herdr-lab.sh provision fm-lab-lockguardproof-91946-1943bin/fm-herdr-lab.sh run fm-lab-lockguardproof-91946-1943 session list --jsonLivefm_backend_herdr_presentation_session_lock_pathassertions against the lab session, followed bybin/fm-herdr-lab.sh teardown fm-lab-lockguardproof-91946-1943✅ **Document** - passed
✅ No issues found.
🔧 **Lint** - 1 issue found → no changes applied ✅
🔧 No changes applied.
✅ Re-checked - no issues remain.
✅ **Push** - passed
✅ No issues found.