-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(terraform): PC-Policy-Team: Ensure GCP compute firewall ingress does not allow unrestricted access to all ports #3786
Merged
gruebel
merged 6 commits into
bridgecrewio:master
from
NandhiniC-PAN:GCPComputeFirewallOverlyPermissiveToAllTraffic
Nov 8, 2022
Merged
Conversation
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
gruebel
reviewed
Nov 4, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good job, added a few comments
checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml
Outdated
Show resolved
Hide resolved
checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml
Outdated
Show resolved
Hide resolved
checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml
Outdated
Show resolved
Hide resolved
checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml
Outdated
Show resolved
Hide resolved
checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml
Outdated
Show resolved
Hide resolved
tests/terraform/graph/checks/resources/GCPComputeFirewallOverlyPermissiveToAllTraffic/main.tf
Show resolved
Hide resolved
gruebel
changed the title
PC-Policy-Team: Ensure GCP compute firewall ingress does not allow unrestricted access to all ports
feat(terraform): PC-Policy-Team: Ensure GCP compute firewall ingress does not allow unrestricted access to all ports
Nov 4, 2022
…erlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]>
…erlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]>
…erlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]>
gruebel
approved these changes
Nov 8, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, great work. the failing test is the result of the other PR not merged yet 😄
ayajbara
approved these changes
Nov 8, 2022
…verlyPermissiveToAllTraffic
Thanks for the assistance @gruebel :) |
Floodnut
pushed a commit
to init-cloud/checkov
that referenced
this pull request
Nov 9, 2022
…does not allow unrestricted access to all ports (bridgecrewio#3786) * test_GCPComputeFirewallOverlyPermissiveToAllTraffic Policies * Update checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]> * Update checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]> * Update checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]> * Update GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]>
Floodnut
pushed a commit
to init-cloud/checkov
that referenced
this pull request
Nov 9, 2022
…does not allow unrestricted access to all ports (bridgecrewio#3786) * test_GCPComputeFirewallOverlyPermissiveToAllTraffic Policies * Update checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]> * Update checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]> * Update checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]> * Update GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]>
Floodnut
pushed a commit
to init-cloud/checkov
that referenced
this pull request
Nov 9, 2022
…does not allow unrestricted access to all ports (bridgecrewio#3786) * test_GCPComputeFirewallOverlyPermissiveToAllTraffic Policies * Update checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]> * Update checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]> * Update checkov/terraform/checks/graph_checks/gcp/GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]> * Update GCPComputeFirewallOverlyPermissiveToAllTraffic.yaml Co-authored-by: Anton Grübel <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Checkov Title: Ensure GCP compute firewall ingress does not allow unrestricted access to all ports
PC Title - GCP Firewall with Inbound rule overly permissive to All Traffic
PC Policy ID - ff6a9cca-8bc5-4a72-9235-ec7b65c547d5
Compliance Standard - PIPEDA, CCPA 2018, MITRE ATT&CK v6.3, NIST 800-53 Rev 5, Copy of CCPA 2018-0417, NIST 800-53 Rev4, ISO 27001:2013, APRA (CPS 234) Information Security, Cybersecurity Maturity Model Certification (CMMC) v.1.02, Brazilian Data Protection Law (LGPD), MITRE ATT&CK v8.2, NIST SP 800-171 Revision 2, PCI DSS v3.2.1, NIST SP 800-172, HITRUST v.9.4.2, NIST CSF, Fedramp (Moderate), CSA CCM v.4.0.1, NIST CSF (中文), ISO/IEC 27002:2013, ISO/IEC 27017:2015, New Zealand Information Security Manual (NZISM v3.4), ISO/IEC 27018:2019, MITRE ATT&CK v10.0, Copy of (AESCSF)-IR, CIS Controls v7.1, CIS Controls v8, FFIEC, PCI DSS v4.0, ACSC Information Security Manual (ISM)
Remediation Steps:
GCP Console
If the Firewall rule reported indeed need to restrict all traffic, follow the instructions below:
CLI Command
gcloud compute --project=${account} firewall-rules update ${resourceName} --disabled
This CLI command requires 'compute.firewalls.update' and 'compute.networks.updatePolicy' permission. Successful execution will disable this firewall rule blocking overly permissive internet traffic.