[codex] Address post-merge review follow-ups#18
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Follow-up hardening/correctness fixes from post-merge review on config-path privilege detection, SQLite sidecar permission handling, SHA256 validation messaging, and integration test harness robustness.
Changes:
- Secure SQLite
-wal/-shmsidecar permissions by appending suffixes to the full DB filename (not replacing extensions), with added tests. - Make privileged config-path detection fail safe when
/proc/self/statuscan’t be read/parsed, with added parser/unit tests and test serialization. - Align SHA256 validation error messages with accepted input (uppercase hex allowed) and add coverage; make integration harness
run_test_containshandlepipefaillikerun_test.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/run-integration-tests.sh | Align run_test_contains pipefail handling with run_test for consistent pipeline behavior. |
| crates/facelock-store/src/db.rs | Fix SQLite sidecar path derivation and add tests ensuring actual sidecars are secured. |
| crates/facelock-core/src/paths.rs | Fail-safe privileged detection when procfs UID parsing fails; add tests and serialize env-mutating tests. |
| crates/facelock-core/src/config.rs | Update SHA256 validation messaging and add tests for uppercase hex + message text. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Summary
-waland-shmfilesrun_test_containsin the integration container harness handlepipefailconsistently withrun_testWhy
PR #16 merged with four unresolved review threads. Two were real hardening/correctness gaps:
/proc/self/statuscould not be readThe other two were smaller follow-ups:
pipefailImpact
db_pathvalues now secure the actual SQLite sidecar filesVerification
cargo test -p facelock-core -p facelock-storebash -n test/run-integration-tests.shcargo test --workspacecargo clippy --workspace -- -D warningsjust test-pamjust test-integrationNotes
just test-oneshotwas skipped because this patch set does not change the oneshot-specific direct camera/auth flow; it only touches shared config/storage logic already covered by workspace tests, plus the daemon integration test harness.