sultree

Beta v0.1.0

SELinux-aware tree command for security-focused directory visualization

Display hierarchical directory structures filtered by SELinux security contexts. A wary oak - combining security awareness with the classic tree command.

Quick Start

sultree extends the classic tree command with SELinux context filtering - visualize directory structures filtered by security contexts.

Basic Usage
$sultree /etc
/etc ├── passwd [system_u:object_r:passwd_file_t:s0] ├── shadow [system_u:object_r:shadow_t:s0] ├── group [system_u:object_r:passwd_file_t:s0] └── hosts [system_u:object_r:net_conf_t:s0] 4 files

Installation

From Source (Direct)

No installation required - run the standalone script directly:

Standalone
$git clone https://github.com/tenseleyFlow/sultree.git
$cd sultree && ./sultree /path/to/directory

pip Install

pip
$pip install .
Successfully installed sultree-0.1.0
$sultree --version
sultree 0.1.0

RPM Build

RPM
$make rpm
Building RPM package... Wrote: ~/rpmbuild/RPMS/noarch/sultree-0.1.0-1.noarch.rpm
$sudo dnf install ~/rpmbuild/RPMS/noarch/sultree-*.rpm

Dependencies

Runtime Requirements

  • Python 3.8+ - Core runtime
  • attr package - Provides getfattr for SELinux queries

Installing attr

Fedora/RHEL
$sudo dnf install attr

First Run

Verify SELinux is available and test basic functionality:

Verification
$getenforce
Enforcing
$sultree -L 1 /etc
/etc ├── passwd ├── shadow ├── group ├── hosts ├── hostname └── fstab 6 files
$sultree -S '*_t' -L 1 /etc
[SELinux contexts displayed for matching types]