Go to file
Chris PeBenito 9f8f8f72c1 Change tool exception handlers to re-raise the exception if debugging.
This will allow the debugger to catch the exception for debugging purposes.
2016-07-22 19:14:40 -04:00
data ObjClassQueryTab: Add clear button for common selection. 2016-07-09 18:45:51 -04:00
libqpol libqpol: Remove unused syntactic rule functions. 2016-05-20 10:31:18 -04:00
man Man page revisions. 2016-04-19 09:22:19 -04:00
patches Remove libsepol 2.3 patch as it is no longer useful. 2016-05-04 08:24:12 -04:00
qhc apol: Replace icons with icons from the current theme. 2016-05-05 09:47:51 -04:00
setools PermissionMap: Make permission maps iterable. 2016-06-22 13:38:46 -04:00
setoolsgui SEToolsTableView: Change copy operation to use lists rather than string concatenation. 2016-07-14 21:44:35 -04:00
tests SELinuxPolicyTest: add extended permission rule count tests 2016-03-29 09:55:51 -04:00
.coveragerc No coverage for PolicySymbol.__hash__() error path. 2015-03-17 14:49:57 -04:00
.gitignore apol: Implement help menu 2016-04-19 16:03:15 -04:00
.pylintrc Build C extension for lint tox target. 2015-12-02 12:44:45 -05:00
.travis.yml Update Travis-CI builds to use SWIG 3.0.8 to fix Python 3.5 wrapper issues. 2016-05-06 09:27:56 -04:00
apol Change tool exception handlers to re-raise the exception if debugging. 2016-07-22 19:14:40 -04:00
ChangeLog Add ChangeLog. 2016-05-12 11:13:44 -04:00
COPYING Initial public release. 2014-07-08 14:28:55 -04:00
COPYING.GPL Initial public release. 2014-07-08 14:28:55 -04:00
COPYING.LGPL Initial public release. 2014-07-08 14:28:55 -04:00
KNOWN-BUGS Update support text for Python 3.5 SWIG issues. 2016-05-06 13:36:36 -04:00
MANIFEST.in Add ChangeLog. 2016-05-12 11:13:44 -04:00
README.md Update support text for Python 3.5 SWIG issues. 2016-05-06 13:36:36 -04:00
sediff Change tool exception handlers to re-raise the exception if debugging. 2016-07-22 19:14:40 -04:00
sedta Change tool exception handlers to re-raise the exception if debugging. 2016-07-22 19:14:40 -04:00
seinfo Change tool exception handlers to re-raise the exception if debugging. 2016-07-22 19:14:40 -04:00
seinfoflow Change tool exception handlers to re-raise the exception if debugging. 2016-07-22 19:14:40 -04:00
sesearch Change tool exception handlers to re-raise the exception if debugging. 2016-07-22 19:14:40 -04:00
setup.py libqpol: Remove unused syntactic rule functions. 2016-05-20 10:31:18 -04:00
tox.ini Add Python 3.5 testing. 2016-05-06 08:39:44 -04:00

SETools: Policy analysis tools for SELinux

https://github.com/TresysTechnology/setools/wiki

Overview

This file describes SETools, developed by Tresys Technology. SETools is a collection of graphical tools, command-line tools, and libraries designed to facilitate SELinux policy analysis. Please consult the KNOWN-BUGS file prior to reporting bugs.

Installation

SETools uses the Python setuptools build system to build, and install. As such it contains a setup.py script that will install the tools.

To run SETools command line tools, the following packages are required:

  • Python 2.7 or 3.3+
  • NetworkX 1.8+
  • setuptools
  • libselinux Python bindings (optional but recommended)

To run SETools graphical tools, the following packages are also required:

  • PyQt5
  • qt5-assistant
  • qt-devel (only if rebuilding the help file)

To build SETools, the following development packages are required, in addition to the development packages from the above list:

  • gcc
  • bison
  • flex
  • libsepol 2.5+
  • SWIG 2.0.12+ or 3.0+ (3.0.8+ required for Python 3.5)

To run SETools unit tests, the following packages are required, in addition to the above dependencies:

  • mock (on Python 2.7 only)
  • tox (optional)

Obtaining SETools

SETools is included in most Linux distributions which support SELinux, such as Fedora, Red Hat Enterprise Linux, Gentoo, and Debian.

Official releases of SETools may be freely downloaded from:

https://github.com/TresysTechnology/setools/releases

SETools source code is maintained within a GitHub repository. From the command line do:

  $ git clone https://github.com/TresysTechnology/setools.git

You may also browse the GitHub repository at https://github.com/TresysTechnology/setools. The master branch has development code that may not be stable. Each release series is considered stable, and has its own branch, e.g. "4.0" for all 4.0.* releases. To checkout a stable branch, do:

  $ git checkout 4.0

Where 4.0 is the release series. Each release will have a tag.

Building SETools for Local Use

To use SETools locally, without installing it onto the system, unpack the official distribution or check out the git repository, and perform the following at the root:

  $ python setup.py build_ext -i

This will compile the C portion of SETools locally, and then the tools can be ran from the current directory (e.g. ./seinfo).

Rebuilding the Apol Help File

For convenience, a prebuilt copy of the apol help data file is included. To rebuild this file, the Qt5 development tools are required (particularly, the qcollectiongenerator tool). At the root of the SETools soures, perform the following:

  $ python setup.py build_qhc

Installing SETools

Unpack the official distribution or check out the git repository, and perform the following at the root:

  $ python setup.py install

This will put the applications in /usr/bin, data files in /usr/share/setools, and libraries in /usr/lib/pythonX.Y/site-packages/setools.

Installation Options

Please see python setup.py --help or python setup.py install --help for up-to-date information on build and install options, respectively.

Unit Tests

One goal for SETools is to provide confidence in the validity of the output for the tools. The unit tests for SETools can be run with the following command

  $ python setup.py test

Features

SETools encompasses a number of tools, both graphical and command line, and libraries. Many of the programs have help files accessible during runtime.

Graphical tools

Tool Name Use
apol A Qt graphical analysis tool. Use it to perform various types of analyses.

Command-line tools

Tool Name Use
sediff Compare two policies to find differences.
sedta Perform domain transition analyses.
seinfo List policy components.
seinfoflow Perform information flow analyses.
sesearch Search rules (allow, type_transition, etc.)

Analysis Libraries

The SETools libraries are available for use in third-party applications. Although this is not officially supported, we will do our best to maintain API stability.

Reporting bugs

Bugs can be reported in the SETools GitHub issues tracker:

https://github.com/TresysTechnology/setools/issues

The intent is to allow free use of this source code. All programs' source files are copyright protected and freely distributed under the GNU General Public License (see COPYING.GPL). All library source files are copyright under the GNU Lesser General Public License (see COPYING.LGPL). All files distributed with this package indicate the appropriate license to use. Absolutely no warranty is provided or implied.