Repository navigation
Tailor: disable SELinux labeling only for cleanup janitors - #852
Open
Paco Huelsz (frhuelsz) wants to merge 4 commits into
Open
Paco Huelsz (frhuelsz) wants to merge 4 commits into
Paco Huelsz (frhuelsz) wants to merge 4 commits into
Conversation
Give ownership and removal janitors a per-container label=disable option without changing IC security options, privilege or guarded bind paths. Document the unresolved live-loop and mount hazard. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
It weakens host isolation for cleanup while live loop and mount safety remains unresolved, requiring human security review.
1 open finding
What changed in this PR
Limits SELinux label disabling to cleanup janitors while preserving Image Customizer security settings.
Changes:
- Adds per-container SELinux label control.
- Enables
label=disableonly for janitors. - Adds regression tests and threat-model guidance.
| File | Description |
|---|---|
threat-model.md |
Documents janitor security implications. |
janitor.rs |
Enables label disabling and tests constraints. |
executor.rs |
Preserves IC labeling. |
runtime.rs |
Maps the option to Docker configuration. |
ports.rs |
Extends container configuration. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.

Only janitor containers use
label=disableto clean SELinux-labeled host paths; IC is unchanged and janitors remain non-privileged. On a rootful engine, janitor root can write anywhere in its bound target/parent directories. Host labels are unchanged.Fedora 43 enforcing/rootful Podman: baseline cleanup and stale tools-dir pre-clean failed; patched cleanup passed. The fake IC then failed intentionally.
just checkpassed. Real IC build/chown, Docker/rootless/remote engines, and live-mount safety remain untested; safety review needed.