Skip to content

Commit

Permalink
add support for destination overrides (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhakmiller authored Jul 24, 2020
1 parent 8897956 commit 0e84d94
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions panther_analysis_tool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ class TestCase():
def __init__(self, data: Dict[str, Any]) -> None:
"""
Args:
data (Dict[str, Any]): An AWS Resource representation or Log event to test the policy or rule against respectively.
data (Dict[str, Any]): An AWS Resource representation or Log event to test the policy
or rule against respectively.
"""
self._data = data

Expand Down Expand Up @@ -307,7 +308,7 @@ def test_analysis(args: argparse.Namespace) -> Tuple[int, list]:
return int(bool(failed_tests or invalid_specs)), invalid_specs


def print_summary(test_path: str, num_tests: int, failed_tests: List[Any],
def print_summary(test_path: str, num_tests: int, failed_tests: Dict[str, list],
invalid_specs: List[Any]) -> None:
'''Print a summary of passed, failed, and invalid specs'''
print('--------------------------')
Expand Down
2 changes: 2 additions & 0 deletions panther_analysis_tool/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
str,
Optional('DisplayName'):
str,
Optional('OutputIds'): [str],
Optional('Reference'):
str,
Optional('Runbook'):
Expand Down Expand Up @@ -92,6 +93,7 @@
int,
Optional('DisplayName'):
str,
Optional('OutputIds'): [str],
Optional('Reference'):
str,
Optional('Runbook'):
Expand Down
2 changes: 2 additions & 0 deletions tests/fixtures/valid_analysis/policies/example_policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ DisplayName: MFA Is Enabled For User
Description: MFA is a security best practice that adds an extra layer of protection for your AWS account logins.
Severity: Critical
PolicyID: AWS.IAM.MFAEnabled
OutputIds:
- 00000-01-00000
Enabled: true
ResourceTypes:
- AWS.IAM.RootUser.Snapshot
Expand Down

0 comments on commit 0e84d94

Please sign in to comment.