From bcf67f226518478dad6ae71c606ea63b0df68bb2 Mon Sep 17 00:00:00 2001 From: Nick <49166439+nhakmiller@users.noreply.github.com> Date: Thu, 13 Aug 2020 09:18:42 -0700 Subject: [PATCH] add threshold (#39) * add threshold * bump version for 0.3.4 release * switch to int --- panther_analysis_tool/main.py | 2 +- panther_analysis_tool/schemas.py | 2 ++ setup.py | 4 ++-- tests/fixtures/valid_analysis/rules/example_rule.yml | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/panther_analysis_tool/main.py b/panther_analysis_tool/main.py index e6aea23a..c691e6a4 100644 --- a/panther_analysis_tool/main.py +++ b/panther_analysis_tool/main.py @@ -440,7 +440,7 @@ def setup_parser() -> argparse.ArgumentParser: prog='panther_analysis_tool') parser.add_argument('--version', action='version', - version='panther_analysis_tool 0.3.3') + version='panther_analysis_tool 0.3.4') subparsers = parser.add_subparsers() test_parser = subparsers.add_parser( diff --git a/panther_analysis_tool/schemas.py b/panther_analysis_tool/schemas.py index baccab4e..607a0341 100644 --- a/panther_analysis_tool/schemas.py +++ b/panther_analysis_tool/schemas.py @@ -98,6 +98,8 @@ str, Optional('Runbook'): str, + Optional('Threshold'): + int, Optional('Suppressions'): [str], Optional('Tags'): [str], Optional('Reports'): { diff --git a/setup.py b/setup.py index 5ef4689c..54bb9899 100644 --- a/setup.py +++ b/setup.py @@ -2,14 +2,14 @@ setup( name='panther_analysis_tool', packages=['panther_analysis_tool'], - version='0.3.3', + version='0.3.4', license='apache-2.0', description= 'Panther command line interface for writing, testing, and packaging policies/rules.', author='Panther Labs Inc', author_email='pypi@runpanther.io', url='https://github.com/panther-labs/panther_analysis_tool', - download_url = 'https://github.com/panther-labs/panther_analysis_tool/archive/v0.3.2.tar.gz', + download_url = 'https://github.com/panther-labs/panther_analysis_tool/archive/v0.3.4.tar.gz', keywords=['Security', 'CLI'], scripts=['bin/panther_analysis_tool'], install_requires=[ diff --git a/tests/fixtures/valid_analysis/rules/example_rule.yml b/tests/fixtures/valid_analysis/rules/example_rule.yml index fc9eaed5..6f55eff6 100644 --- a/tests/fixtures/valid_analysis/rules/example_rule.yml +++ b/tests/fixtures/valid_analysis/rules/example_rule.yml @@ -3,6 +3,7 @@ Filename: example_rule.py DisplayName: MFA Rule Description: MFA is a security best practice that adds an extra layer of protection for your AWS account logins. Severity: High +Threshold: 5 RuleID: AWS.CloudTrail.MFAEnabled Enabled: true LogTypes: