From: jwcart2@tycho.nsa.gov (jwcart2)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] ANN: SELinux Policy Tools - selpoltools
Date: Tue, 3 Apr 2018 12:14:35 -0400 [thread overview]
Message-ID: <5e068d90-6ee8-b4f7-9052-18f80357d7b5@tycho.nsa.gov> (raw)
The selpoltools are a collection of policy tools for SELinux. It works on
Refpolicy-based policies or a collection of policy files. Right now the only
useful tool is spt_lint.lua.
You can find selpoltools at:
https://github.com/jwcart2/selpoltools
See README.md for the very simple build instructions and examples of usage.
spt_lint.lua can detect problems such as:
- Unused macro (interface and template) parameters
- Calls that have more or less arguments then needed
- Identifiers used in macros but not declared anywhere in policy
- Identifiers used in macros but not required by the macro
- Identifiers required in macros but not declared anywhere in policy
- Identifiers required in macros but not used in the macro
- Macros that will appear in policy even though their module is marked "off" in
modules.conf.
See docs/spt_lint--warnings.txt for more details on the warnings that are reported.
I had previously created a tool to convert Refpolicy to CIL, but it required
multiple patches to Refpolicy to work. selpoltools uses a different approach and
only requires that "make conf" has been run (if running on a Refpolicy policy
tree). I created this tool primarily to help me identify patterns in Refpolicy
that have caused me problems in the past when converting to CIL. The main
culprits being identifiers that are required but not used (for CIL everything
used is required, but only what is used is required) and macros that appear in
policy even though their module is turned off (so far only a problem with
Fedora's policy).
I hope to eventually build upon this work to create a tool that can generate CIL
from Refpolicy.
--
James Carter <jwcart2@tycho.nsa.gov>
National Security Agency
reply other threads:[~2018-04-03 16:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5e068d90-6ee8-b4f7-9052-18f80357d7b5@tycho.nsa.gov \
--to=jwcart2@tycho.nsa.gov \
--cc=refpolicy@oss.tresys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).