Skip to content

feat(e2e): keep Linux security protections on during desktop tests and fail on blocked actions - #1109

Merged
Danathar merged 9 commits into
mainfrom
danathar/supersede-1037
Nov 5, 2026
Merged

Danathar merged 9 commits into
mainfrom
danathar/supersede-1037

Conversation

@Danathar

@Danathar Danathar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Summary: This carries @codebymarshall's change from #1037 into a branch in this repository, unchanged: an opt-in lane for the desktop tests that keeps SELinux protections switched on and fails the run when the system blocks something unexpected. The original came from a fork and its author's agent has been offline since 10-28. The hive won't move fork PRs that edit workflow files, and it couldn't push fixes to the fork, so a maintainer has to bring it in.

What I need from you: A maintainer merges it by hand once checks pass, because it edits e2e.yml.


Supersedes #1037. Refs #1024.

  • The commits are feat(e2e): keep Linux security protections on during desktop tests and fail on blocked actions #1037's head 7d9d3b0. Authorship and sign-offs are unchanged, so credit stays with @codebymarshall. That head includes Danathar's rebase onto main.
  • The lane is opt-in. selinux_enforcing defaults to false, so existing runs don't change.
  • I reviewed it for a trusted run.
    • The e2e.yml additions only talk to the local test VM over SSH and run an in-VM SELinux canary.
    • scripts/selinux_qualify.py only reads files and parses JSON/YAML. scripts/selinux_collect_avc.sh only reads the guest's audit log.
    • Nothing touches secrets, tokens, downloads or pull_request_target.
  • One note. Commit a0460ac was written by the hive's fixer and carries the App's sign-off. A squash merge keeps attribution simple.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SnzFs53Qcer1xDySyxv1Vj

codebymarshall and others added 9 commits October 27, 2026 21:32
Drop selinux=0 from the guest kernel arguments so the candidate runs
with its own policy, and make the run prove it:

- Label only the files the harness writes on the non-SELinux runner,
  using the candidate's own setfiles and file_contexts. Files already
  unlabeled before injection are candidate-owned and left alone so
  labeling defects stay product failures.
- Fail early when a guest with a policy store is not Enforcing, and
  again after the suite (covers lifecycle reboots). Images without a
  policy store are reported as unsupported.
- Fail on enforced AVC denials not named in selinux_allowlist.yaml
  (narrow type/permission/comm/tclass matching, reason required).
- Trigger a deliberate httpd_t denial after judging the scenario log
  and fail if it does not reach the gate.

Evidence goes to results/selinux/ in the results artifact.

Refs #1024

Hive-Run: #1024
Hive-Plan: issue-1024-selinux-enforcing
Hive-Spec: testsuite-e2e-selinux#1024
Assisted-by: Claude Opus 5.5 via Claude Code
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: codebymarshall <codebymarshall@users.noreply.github.com>
The e2e guest no longer boots with selinux=0; point the skill at the
SELinux enforcing reference instead.

Refs #1024

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: codebymarshall <codebymarshall@users.noreply.github.com>
…cope claim

Add the Verify SELinux enforcing and SELinux denial gate steps to the
SKILL.md step list and link references/selinux-enforcing.md from the
references index. State that only each deployment's etc and var are
relabeled: the fallback boot.N symlinks under /ostree/boot.* stay
unlabeled and are read only by unconfined ostree/bootc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: codebymarshall <codebymarshall@users.noreply.github.com>
e2e.yml no longer passes selinux=0; point authors at the enforcing
reference instead of steering them to re-add the bypass.

Hive-Fix-Attempt: 2/6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Signed-off-by: Danathar <berths-purger-0g@icloud.com>

# Conflicts:
#	docs/skills/ci-ops/e2e-workflow/SKILL.md
The enforcing boot, harness labeling, enforcing check and AVC denial
gate have not run on a hosted VM yet, and e2e.yml is called by every
image repo. Gate them behind a selinux_enforcing input (default false,
also exposed by manual.yml): without it the guest keeps selinux=0 and
the SELinux steps are skipped, so existing runs are unchanged. A
manual dispatch from main with selinux_enforcing=true qualifies the
lane; the rollout plan in #1021 then flips the default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnzFs53Qcer1xDySyxv1Vj
Signed-off-by: Danathar <berths-purger-0g@icloud.com>
@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off merge-method/merge Hive merges this PR with a merge commit (mixed authorship, each commit self-signed); never squash role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 5, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

1 of 5 commits on 7d9d3b0a2fd7 are the hive's, signed off as the hive App, and the rest are @Danathar's with their own sign-off. A squash would land the hive's commits under @Danathar's name with the App's sign-off, so this PR merges with a merge commit instead (merge-method/merge): every commit lands as it is, each with its own author's sign-off. Nothing is rewritten and nobody needs to re-sign anything. Maintainers merging by hand: use gh pr merge --merge, not squash.

@Danathar
Danathar merged commit 39e1c2b into main Nov 5, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off merge-method/merge Hive merges this PR with a merge commit (mixed authorship, each commit self-signed); never squash role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants