Skip to content

Conversation

@shravankshenoy
Copy link
Contributor

Description

Issue #247 . Added support for Compute/securitypolicies resource

Changes Made

  • Created a new crawler factory in the crawler package : cloud_security_policies_crawler.py
  • In the scanner.py file, included the crawler in the crawl loop and updated the crawl_client_map.
  • Modified example.config
  • Added unit tests in test_unit.py
  • Left blank compute_security_policies file for test output check

Testing

App ran successfully during local testing

…trap script. Add compute securit config in example config
Copy link
Contributor

@mshudrak mshudrak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with two minor nits. Once you fix it, we can push the commit. Thanks again for implementing it.

except Exception:
logging.info("Failed to enumerate compute security policies in the %s", project_name)
logging.info(sys.exc_info())
return security_policies_list No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls add new line at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this with new commit

# update default rule to deny all traffic (default rule has priority 2147483647)
gcloud compute security-policies rules update 2147483647 \
--security-policy test-security-policy \
--action "deny-404" No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New line pls

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this with new commit

@mshudrak mshudrak merged commit e79b3f8 into google:main Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants