Repository navigation
fix(nix,docs): correct mkAfter ordering and SETENV threat-model clauses (N1/N2) - #8
Merged
Merged
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: b56226d0-306c-43b4-844b-15d2d78c8011) |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
What
Closes the two residual LOW findings (N1, N2) from the Linux/NixOS port adversary review — both were flagged as "wrong statements in security-relevant prose".
nix/module.nix): thesecurity.sudo.extraConfigassignment was a barebuiltins.readFile, so the module-system ordering comment was wrong about where its line lands. Now wrapped aslib.mkAfter (builtins.readFile sudoersText)so it sorts after any default-priorityextraConfigdefiner, and the comment states the actual mechanism (sortPropertiesruns when any definition carries_type == "order").docs/design/dann-deployment-threat-model.md): the SETENV clause now states the last-match-wins reading precisely — the module's broker line matches last and carries noSETENV, sosudo VAR=… -u <svc> $BROKER …is refused, while the wheel rule'sSETENVstill coverssudo -u <svc> env VAR=… $BROKER ….One commit, two files. No policy text, grants,
Defaults!, paths, or permissions changed.Adversary verdict
Reviewed by
adversary(head052023dc11e79eff1686ee3b9032f8e988592da6):Both N1 and N2 closed; two INFO notes (an
env_keepnuance on "is refused" wording, and a pre-existingtest.nixcomment inaccuracy outside the delta) were treated as non-blocking.Note
Low Risk
Documentation and Nix merge ordering only; emitted sudoers policy is unchanged and adversary review reported no regression or privilege widening.
Overview
Closes adversary review items N1 and N2 by fixing security-relevant prose and NixOS merge behavior—no sudoers grants, paths, or permissions change.
Nix module:
security.sudo.extraConfigis nowlib.mkAfter (builtins.readFile sudoersText)so the module’s policy sorts after other modules’extraConfiglines (viasortPropertieswhen ordering metadata is present). The inline comment no longer claimsmkOrder/mkAfterare ignored ontypes.lines; it documents the real ordering story and the residual availability-only conflict if another module also usesmkAfter.Threat model (dann): The SETENV / last-match-wins bullet is rewritten so the module’s broker rule (last match, no
SETENV) refusessudo VAR=… -u <svc> $BROKER …, while%wheel’sSETENVstill allowssudo -u <svc> env VAR=… $BROKER …—clarifying which injection shape remains on a root-equivalent host.Reviewed by Cursor Bugbot for commit 052023d. Bugbot is set up for automated code reviews on this repo. Configure here.