Skip to content

[Q&A] Risky file permission enable in linter and explicitely disabled in codebase#885

Merged
insatomcat merged 1 commit intoseapath:mainfrom
AntoineDupre:linter-permission-files
Mar 3, 2026
Merged

[Q&A] Risky file permission enable in linter and explicitely disabled in codebase#885
insatomcat merged 1 commit intoseapath:mainfrom
AntoineDupre:linter-permission-files

Conversation

@AntoineDupre
Copy link
Contributor

This PR enables the risky-file-permissions ansible-lint rule, which was previously skipped globally in ansible-lint.conf.

Going forward, all new contributions that create or copy files must explicitly set file permissions. This ensures we maintain clear and intentional permission settings across the project.

For existing tasks that are currently missing explicit permissions, this PR adds # noqa: risky-file-permissions annotations rather than guessing the intended permissions for each task. This allows us to enable the rule immediately without risking unintended behavioral changes.

In practice, all these tasks currently end up with 0644 for files and 0755 for directories. This is determined by the default umask 0022, which is the standard default on all four supported distributions (Debian, CentOS, OracleLinux, Yocto). Nothing in this repository modifies the umask. So while the current behavior is reasonable, the permissions are implicit rather than explicit. The #
noqa tags acknowledge this technical debt, without introducing new files without mode.

Each annotated task can be revisited individually in future commits to set explicit permissions where appropriate.

…debase

Signed-off-by: Antoine Dupre <antoine.dupre@savoirfairelinux.com>
@insatomcat insatomcat force-pushed the linter-permission-files branch from a8ef855 to 50bf115 Compare March 3, 2026 07:27
@insatomcat insatomcat merged commit 5ddbfce into seapath:main Mar 3, 2026
4 checks passed
@AntoineDupre AntoineDupre deleted the linter-permission-files branch March 3, 2026 14:19
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