Skip to content

Check permissions when file creation is templated - #11

Merged
dmillzilla merged 1 commit into
mainfrom
fix/templated-file-creation
Nov 18, 2026
Merged

dmillzilla merged 1 commit into
mainfrom
fix/templated-file-creation

Conversation

@dmillzilla

Copy link
Copy Markdown
Owner

lineinfile and blockinfile with create: "{{ allow_create }}" could exit clean without an explicit file mode: the permission rule treated an unresolved expression as the module's default create: false.

Require a mode for an explicit nonempty create value that cannot be reduced to a literal boolean. Preserve default behavior when create is absent, literal false/null handling, explicit modes and module-argument precedence over task-level args. No template evaluation or Python backend is introduced.

Validation: 205 Rust tests, strict Clippy, formatting, 21 distribution tests and 377-package notice verification pass. New standalone CLI regressions compare complete issue fields/exits with an empty PATH and cover both modules, task args, false/null values and explicit modes. Public pinned dependencies and synthetic fixtures reproduce the missing findings. All 20 differential controls agree on the permission finding; 18 also match complete CLI output. Two invalid-value controls retain an existing boolean-choice list ordering difference, independently reproduced with different Python hash seeds; argument checks remain enabled. Detailed comparison records stay private.

This prepares an unreleased 0.1.4 fix and does not claim full parity.

@dmillzilla-bot dmillzilla-bot 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.

Automated Codex review as dmillzilla-bot of 40bafe7.

Reviewed the complete four-file diff. Explicit nonempty unresolved create values now require a mode; absent defaults, literal booleans/null, supplied modes and module-over-task argument precedence are preserved. Templates are not evaluated, argument checking is unchanged, and no production interpreter or dependency was introduced. Standalone CLI regressions run with empty PATH. Local 205 Rust tests, strict Clippy, 21 distribution tests, notice verification, formatting and source/history secret scans pass. Reference policy fields agree in all 20 controls; the two raw invalid-boolean formatting differences remain recorded rather than counted as full matches.

No blocking findings in this scoped fix. Hosted CI must pass before merge; full parity and a release are not established by this approval.

@dmillzilla
dmillzilla merged commit 29c3022 into main Nov 18, 2026
6 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.

2 participants