Commit Graph

33 Commits

Author SHA1 Message Date
Chris PeBenito
8e082f70cf Replace license text in sources with SPDX license indentifiers.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2021-11-20 14:12:15 -05:00
Chris PeBenito
857be3c2fa seinfoflow: Make the permission map option (-m) optional.
If not specified, the default permission map will be used.

Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2021-11-18 13:59:29 -05:00
Chris PeBenito
3d8df89b00 sedta, seinfoflow: Make the default output brief.
Change the sedta and seinfoflow so that they output a summary of the transitions
and flows.  Add a --full option to get the full rule outputs.

Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2021-11-18 13:59:25 -05:00
Chris PeBenito
463f6741bb seinfoflow: Add type annotations.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-10-17 16:27:53 -04:00
Chris PeBenito
2593b008e1 seinfoflow: Fix -b help text. 2019-02-23 23:23:00 -08:00
Chris PeBenito
5aa99044d7 seinfoflow: Whitespace fix. 2019-02-23 23:21:30 -08:00
Chris PeBenito
2c133a6831
Merge pull request #15 from driechersRC/tunables
Add feature to select only the default tunable rules
2019-02-16 14:37:49 -05:00
Riechers, Daniel J
b662b07cc0 infoflow: adds boolean selection to seinfoflow
Adds the option to the infoflow analysis to filter conditional policy based on the default or user specified boolean values.

Signed-off-by: Daniel Riechers <daniel.riechers@rockwellcollins.com>
Signed-off-by: David Graziano <david.graziano@rockwellcollins.com>
2019-02-06 21:02:46 +00:00
Chris PeBenito
814c334e83 Set SIGPIPE handler for CLI tools.
SIG_IGN doesn't work.

Closes #18
2019-02-04 16:50:53 -05:00
Chris PeBenito
cc313f9791 __future__ print functions no longer need importing. 2017-09-24 20:40:29 -04:00
Chris PeBenito
e292a77c52 Drop support for Python < 3.4. 2017-09-17 09:43:13 -04:00
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
Chris PeBenito
7d88a1424e cli: switch to logging.exception for debug reporting of unrecoverable exception. 2016-03-04 13:59:21 -05:00
Chris PeBenito
89a96a422a Change #! to use standard Python form 2016-02-26 09:12:34 -05:00
Chris PeBenito
0e22483d82 DomainTransitionAnalysis/InfoFlowAnalysis: use NetworkX's info for stats 2015-07-02 10:23:36 -04:00
Chris PeBenito
e6f59d04e5 Refactor SETools queries/analyses to use descriptors instead of get/setters
This is Pythonic.
2015-05-16 21:59:10 -04:00
Chris PeBenito
20ee139f3b SELinuxPolicy: add support for finding the policy to load.
Restore legacy CLI tool behavior for not having to specify a policy to load
2015-05-08 15:21:00 -04:00
Chris PeBenito
da8b151d5c InfoFlowAnalysis: convert output to namedtuples 2015-04-26 10:41:03 -04:00
Chris PeBenito
43b8fb5214 InfoFlowAnalysis: undo API change. 2015-04-22 08:54:59 -04:00
Chris PeBenito
6904619197 InfoFlowAnalysis: implement Edge class and descriptors for graph access 2015-04-21 09:49:42 -04:00
Chris PeBenito
d82a28262c setools __init__: import query/analysis classes
Makes use simpler. The setools submodules map 1:1 to classes anyway;
the separate modules are simply to ease organization.

Change seinfo to use conditional setter use rather than conditional
instantiation of queries.  Note: pylint disable is added because pylint
gets confused by the reuse of the q variable and thinks that q is always
BoolQuery, so it incorrectly reports missing member functions.
2015-04-15 12:00:59 -04:00
Chris PeBenito
a659c87b50 seinfoflow: remove redundant try block 2015-03-31 15:49:08 -04:00
Chris PeBenito
cb18f4c21f InfoFlowAnalysis: change set_perm_map() to only take map objects.
Remove this handling from the analysis code.  It now expects a permission
map to be passed in, and won't handle a string.
2015-03-26 11:05:19 -04:00
Chris PeBenito
c224995eeb Fully configure logging in CLI tools. 2015-03-25 13:40:03 -04:00
Chris PeBenito
1dd17a0718 Remove unnecessary option defaults in CLI tools. 2015-03-19 15:20:37 -04:00
Chris PeBenito
de716ba6a5 Add logging.
Not comprehensive yet. Only planning to do setools pkg (not policyrep),
with the exception being the SELinuxPolicy class in policyrep.

Avoids performance-critical paths.  Use only info and debug so in normal
cases the user only sees messages if they ask for it (e.g. -v).
2015-03-19 08:07:23 -04:00
Chris PeBenito
edb19126c9 Add --debug options to CLI tools.
Catch all exceptions in the main bulk of the CLI code. We can't do anything
if there is an exception, so either print the error message from the
exception, or print the traceback if debug is enabled.
2015-03-07 11:41:04 -05:00
Chris PeBenito
15a8b2de2c String changes to meet PEP8 standards.
Except max line length of 100.

Also use escaping to fix long lines.
2015-02-12 14:01:44 -05:00
Chris PeBenito
2d1c9184ed Reorder parameters to meet PEP8 standards.
Except max line length of 100.
2015-02-12 13:59:54 -05:00
Chris PeBenito
02c5e72f0a Whitespace changes to meet PEP8 standards.
Except max line length of 100.
2015-02-12 13:52:46 -05:00
Chris PeBenito
eec812b997 Throw error in seinfoflow when target is specified but not used. 2014-11-09 11:27:38 -05:00
Chris PeBenito
109ba68a92 Rename libapol package to setools. 2014-10-24 21:23:13 -04:00
Chris PeBenito
39505d0295 Initial public release. 2014-07-08 14:28:55 -04:00