selinux-rules

Analyze SELinux policies and security contexts for UMRS deployments.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/jamieadams-nerd/umrs-project --skill selinux-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: selinux-rules
Source: https://github.com/jamieadams-nerd/umrs-project/tree/main/.claude/skills/selinux-rules
Command: npx skills add https://github.com/jamieadams-nerd/umrs-project --skill selinux-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SELinux architectural axioms, constraints, and patterns for UMRS: security context format, targeted vs MLS policy, trust gates, naming conventions, and anti-patterns. Use this skill when working with umrs-selinux, security contexts, SELinux policy, MLS/MCS levels, selinux.te, fcontext rules, or MAC enforcement. Trigger when the user or agent mentions SELinux, security context, MLS, MCS, targeted policy, enforcing mode, semanage, restorecon, chcon, xattr, security.selinux, umrs.te, umrs.fc, or any SELinux policy work. Also trigger when writing deployment docs that reference SELinux types, users, roles, or categories.

Core Features & Use Cases

  • Provides a structured framework of SELinux axioms, constraints, rules, and patterns that guide UMRS security-context decisions.
  • Helps design and audit SELinux policy artifacts (te files, fcontext, MLS vs targeted deployments), and provide consistent naming conventions and anti-pattern awareness.
  • Use Case: When deploying UMRS, reference SELinux policy decisions, verify contexts, and ensure alignment with MLS or targeted policy constraints.

Quick Start

Provide an initial, high-level SELinux policy outline for a UMRS deployment and validation pass.

Frequently Asked Questions about selinux-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write SELinux policy rules for targeted vs MLS deployments?

Writing SELinux policy rules involves defining security contexts, trust gates, and type enforcement statements. This skill codifies axioms, constraints, and patterns to guide UMRS policy decisions across targeted and MLS deployments using kernel-state reads.

What is the difference between SELinux MLS and MCS security contexts?

MLS and MCS differ in how they enforce multi-level and multi-category security constraints. This skill outlines axioms and patterns for selecting targeted versus MLS policy considerations and applying correct security.context formatting in UMRS environments.

How do I use semanage and restorecon to manage SELinux fcontext rules?

Use semanage to define fcontext rules and restorecon to apply them to files. This skill codifies constraints and anti-patterns for managing SELinux policy artifacts like umrs.te and umrs.fc files during UMRS deployments.

When do I need SELinux trust gates for MAC enforcement?

SELinux trust gates are needed when deploying UMRS in enforcing mode to validate security contexts and MAC constraints. This skill provides structured rules and patterns to verify contexts and ensure alignment with targeted or MLS policy requirements.

Why does my SELinux security context not persist after running restorecon?

SELinux security contexts may not persist if fcontext rules are not defined before running restorecon. This skill codifies anti-patterns and constraints for UMRS deployments, relying on kernel-state reads rather than admin config to validate context assignments.