From: Dominick Grift <dac.override@gmail.com>
To: selinux@tycho.nsa.gov
Subject: Re: Announcing SPAN: SELinux Policy Analysis Notebook
Date: Sun, 7 May 2017 11:39:21 +0200 [thread overview]
Message-ID: <20170507093921.GA22381@julius> (raw)
In-Reply-To: <20170506171920.GB20145@julius>
[-- Attachment #1: Type: text/plain, Size: 4818 bytes --]
On Sat, May 06, 2017 at 07:19:20PM +0200, Dominick Grift wrote:
> On Sat, May 06, 2017 at 06:19:56PM +0200, Dominick Grift wrote:
> > On Sat, May 06, 2017 at 04:03:58PM +0200, Dominick Grift wrote:
> > > On Fri, May 05, 2017 at 02:27:05PM -0400, Karl MacMillan wrote:
> > > > I’d like to announce SPAN - SELinux Policy Analysis Notebook (https://github.com/QuarkSecurity/SPAN/ <https://github.com/QuarkSecurity/SPAN/>). This is a Jupyter notebook based environment for SELinux policy analysis that let’s you mix queries, Python code, and Markdown formatted notes into an executable document. It’s an extension of SETools 4.
> > > >
> > > > Using SPAN within Jupyter notebook is an amazingly productive way to do policy analysis. I really think that this is the most productive environment that I’ve seen for real policy analysis (and I’ve been working on SELinux policy analysis and tools for almost 15 years). The ability to quickly create custom tools to answer hard questions combined inline with well-formatted documentation makes a huge difference.
> > > >
> > > > SPAN has been used so far to analyze 3 large, complex, custom systems with very large policies (hundreds of custom domains). The analysis was of much better quality and it took much less time because of SPAN.
> > > >
> > > > If you just want to see what this looks like, you can see an example online (though the code is not executable):
> > > >
> > > > https://nbviewer.jupyter.org/github/QuarkSecurity/SPAN/blob/master/examples/Span%20Example.ipynb# <https://nbviewer.jupyter.org/github/QuarkSecurity/SPAN/blob/master/examples/Span%20Example.ipynb#>
> > > >
> > > > If you’ve not seen Jupyter notebooks, they are a very popular tool for data science. Jupyter notebooks are an interactive environment that let you write text (in Markdown) and code together. You can get a feel for what's possible in this awesome notebook on Regex Golf from XKCD: http://nbviewer.jupyter.org/url/norvig.com/ipython/xkcd1313.ipynb <http://nbviewer.jupyter.org/url/norvig.com/ipython/xkcd1313.ipynb>. There is also the more official (and boring) introduction: https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/ <https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/>.
> > > >
> > > > SPAN was written by me (Karl MacMillan) along with Spencer Shimko and Brandon Whalen from Quark Security. And, of course, this is built on SETools 4 which is maintained by Chris PeBinito.
> > > >
> > > > Thanks - Karl
> > >
> > > Nice! Unfornately i could not, which my limited capacity, get it to work. Here is what i tried:
> > >
> > > Fedora 26 (alpha):
> > > sudo dnf install setools setools-console libselinux-python3 pandoc which
> > > git clone https://github.com/quarcksecurity/span && cd span && pip3 install . --user
> > > cd examples && jupyter-notebook
> > >
> > > As soon as i try to run any "cell" or do "restart kernel and run all cells" it throws stack traces about "ModuleNotFoundError" (import span as se" and "from sh import pandoc"
> > >
> > > All the stuff seems to be installed properly in ~/.local/lib/python3.6/site-packages, and the stack traces do refer to the proper paths suchs as for example: "/home/joe/.local/lib/python3.6/site-packages/span/domain_summary_to_word.py in <module> ()"
> >
> > I dont know exactly what the issue is but after installing the following from the fedora repository i seem to have it working:
> >
> > python3-pypandoc
> > python3-pandocfilters
> > python3-sh
> >
> > So i suspect the "from sh import pandoc" was the issue because sh was not in the python_requirements.txt, but even after adding it there it still did not work
>
> The idea is nice, unfortunately its inflexible and it has hard-references to reference policy all-over. It has potential but it is still rough.
Turns out that Fedora provides all the dependencies (some just have different names)
I have created a Fedora SPAN.spec:
https://github.com/DefenSec/selinux-rpm-spec/blob/master/SPAN.spec
>
> >
> > >
> > > --
> > > Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
> > > https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
> > > Dominick Grift
> >
> >
> >
> > --
> > Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
> > https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
> > Dominick Grift
>
>
>
> --
> Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
> https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
> Dominick Grift
--
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2017-05-07 9:39 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-05 18:27 Announcing SPAN: SELinux Policy Analysis Notebook Karl MacMillan
2017-05-06 14:03 ` Dominick Grift
2017-05-06 16:19 ` Dominick Grift
2017-05-06 17:19 ` Dominick Grift
2017-05-07 9:39 ` Dominick Grift [this message]
2017-05-08 19:23 ` Karl MacMillan
2017-05-08 19:32 ` Dominick Grift
2017-05-08 19:40 ` Karl MacMillan
2017-05-07 15:22 ` Joshua Brindle
2017-05-07 15:47 ` Dominick Grift
2017-05-07 19:42 ` Joshua Brindle
2017-05-07 19:53 ` Dominick Grift
2017-05-08 19:41 ` Karl MacMillan
2017-05-08 8:55 ` Dominick Grift
2017-05-08 9:32 ` Dominick Grift
2017-05-08 19:36 ` Karl MacMillan
2017-05-08 19:49 ` Dominick Grift
2017-05-08 20:09 ` Karl MacMillan
2017-05-08 20:40 ` Dominick Grift
2017-05-08 21:47 ` Dominick Grift
2017-05-08 22:01 ` Dominick Grift
2017-05-09 15:25 ` Karl MacMillan
2017-05-09 16:12 ` Joshua Brindle
2017-05-09 15:21 ` Karl MacMillan
2017-05-09 16:15 ` Dominick Grift
2017-05-09 16:47 ` Dominick Grift
2017-05-09 17:45 ` Dominick Grift
2017-05-07 16:24 ` Dominick Grift
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=20170507093921.GA22381@julius \
--to=dac.override@gmail.com \
--cc=selinux@tycho.nsa.gov \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.