forked from Netflix/security_monkey
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding ResourcePolicyAuditor base class for *much* more intelligent c…
…ross account introspection (Netflix#789) 👀 * Creating a new ResourcePolicyAuditor base class that sqs,sns,kms,elasticsearch,lambda,vpcendpoints,glacier,opsworks,s3 can use. Moving ARN and Policy parsing code into policyuniverse. * Updating SNS. * Naively updating s3,sns,kms,es to use new ResourcePolicyAuditor. * Removing aws:username as a trusted field in condition block and bumping policyuniverse version. * Updating ResourcePolicyAuditor to look for cross account account-wide access and other small fixes to get the ElasticSearch tests to work. * Fixing RPA Tests. * Alerting on ThirdParty and access granted to Root ARNs. * Unitests for ResourcePolicyAuditor and subclasses need to clear the OBJECT_STORE in the pre_test_setup() * Adding tests for the SNS Auditor. * Upping coverage on the S3 Auditor. * Ignoring service principals. Fixing Item.config hybrid name. * Fixing the add method to ignore empty userids. * Going back to using shorter issue text inline with existing issues. * Removing SQS one-off where ResourcePolicyAuditor wouldn't look for a Policy block. * Common Issue Category Text. Moving S3 ACL Issues into new category format. Saving actions with resource policy issues. * Standardizing on Cross Account Root IAM and SNS Subscription wording. * Fixing bug in sns auditor and fixing tests * Fixing bug found running in prod.
- Loading branch information
Patrick Kelley
authored
Sep 6, 2017
1 parent
2c7e78a
commit c83571b
Showing
21 changed files
with
1,655 additions
and
936 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,5 +61,4 @@ secmonkey.env | |
*.crt | ||
*.key | ||
postgres-data/ | ||
|
||
docker-compose.override.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"""Add fields to ItemAudit table to support a future revamp of the issue system. | ||
Mostly not using these new fields yet. | ||
Action Instructions will hold information for how the user can fix the issue. | ||
Background Information will hold information on why something is a problem, likely with links to AWS documentation for the user to read more. | ||
Origin will hold the statement causing the issue. Hopefully the UI can use this to highlight the offending part of an item policy. | ||
Origin Summary will hold a summary of the Origin. A JSON Policy statement may be summarized as something like "S3 READ FROM * TO s3:mybucket". | ||
Class UUID will be used so that the text (itemaudit.issue, itemaudit.notes) can be changed in the future without losing justifications. | ||
Revision ID: c9dd06c919ac | ||
Revises: b8ccf5b8089b | ||
Create Date: 2017-09-05 17:21:08.162000 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'c9dd06c919ac' | ||
down_revision = 'b8ccf5b8089b' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
op.add_column('itemaudit', sa.Column('action_instructions', sa.Text(), nullable=True)) | ||
op.add_column('itemaudit', sa.Column('background_info', sa.Text(), nullable=True)) | ||
op.add_column('itemaudit', sa.Column('origin', sa.Text(), nullable=True)) | ||
op.add_column('itemaudit', sa.Column('origin_summary', sa.Text(), nullable=True)) | ||
op.add_column('itemaudit', sa.Column('class_uuid', sa.VARCHAR(length=32), nullable=True)) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column('itemaudit', 'action_instructions') | ||
op.drop_column('itemaudit', 'background_info') | ||
op.drop_column('itemaudit', 'class_uuid') | ||
op.drop_column('itemaudit', 'origin') | ||
op.drop_column('itemaudit', 'origin_summary') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.