Skip to content

Tailor: disable SELinux labeling only for cleanup janitors - #852

Open
Paco Huelsz (frhuelsz) wants to merge 4 commits into
mainfrom
user/frhuelsz/tailor-selinux-janitor-review
Open

Paco Huelsz (frhuelsz) wants to merge 4 commits into
mainfrom
user/frhuelsz/tailor-selinux-janitor-review

Conversation

@frhuelsz

@frhuelsz Paco Huelsz (frhuelsz) commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Only janitor containers use label=disable to 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 check passed. Real IC build/chown, Docker/rootless/remote engines, and live-mount safety remain untested; safety review needed.

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

Copy link
Copy Markdown
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.

@frhuelsz
Paco Huelsz (frhuelsz) marked this pull request as ready for review October 13, 2026 23:42
@frhuelsz
Paco Huelsz (frhuelsz) requested a review from a team as a code owner October 13, 2026 23:42
Copilot AI balanced review requested due to automatic review settings October 13, 2026 23:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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=disable only 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.

Comment thread tools/tailor/docs/explanation/threat-model.md Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 00:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

SELinux confinement changes affect rootful host cleanup, while Docker, rootless, remote-engine, and live-mount scenarios remain unvalidated.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 19:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Relaxing SELinux confinement on writable host binds needs human safety review, with live-mount safety and real Image Customizer build/chown behavior untested.

0 open findings

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 16, 2026 00:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Relaxing SELinux isolation over writable host binds needs human safety review, particularly while real IC cleanup and live-mount behavior remain unvalidated.

0 open findings

🧠 Review effort: Balanced

This branch has not been deployed

No deployments
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