145 lines
2.8 KiB
Plaintext
Raw Normal View History

include::../description.adoc[]
include::../ask-yourself.adoc[]
include::../recommended.adoc[]
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
== Sensitive Code Example
Modify Rule S6329: Make generic and add GCP (#733) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Make generic * Add GCP code sample * Update rules/S6329/terraform/rule.adoc Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com> * Fix syntax Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com> Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-03 09:41:02 +01:00
For AWS:
[source,terraform]
----
resource "aws_instance" "example" {
associate_public_ip_address = true # Sensitive
}
----
[source,terraform]
----
resource "aws_dms_replication_instance" "example" {
publicly_accessible = true # Sensitive
}
----
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
For Azure:
2022-02-04 17:28:24 +01:00
[source,terraform]
----
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
resource "azurerm_postgresql_server" "example" {
public_network_access_enabled = true # Sensitive
}
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
----
Modify Rule S6329: Make generic and add GCP (#733) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Make generic * Add GCP code sample * Update rules/S6329/terraform/rule.adoc Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com> * Fix syntax Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com> Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-03 09:41:02 +01:00
[source,terraform]
----
resource "azurerm_postgresql_server" "example" {
public_network_access_enabled = true # Sensitive
}
----
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
[source,terraform]
----
resource "azurerm_kubernetes_cluster" "production" {
api_server_authorized_ip_ranges = ["176.0.0.0/4"] # Sensitive
default_node_pool {
enable_node_public_ip = true # Sensitive
}
}
----
Modify Rule S6329: Make generic and add GCP (#733) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Make generic * Add GCP code sample * Update rules/S6329/terraform/rule.adoc Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com> * Fix syntax Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com> Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-03 09:41:02 +01:00
For GCP:
[source,terraform]
----
resource "google_compute_instance" "example" {
network_interface {
network = "default"
access_config { # Sensitive
# Ephemeral public IP
}
}
----
== Compliant Solution
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
For AWS:
Modify Rule S6329: Make generic and add GCP (#733) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Make generic * Add GCP code sample * Update rules/S6329/terraform/rule.adoc Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com> * Fix syntax Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com> Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-03 09:41:02 +01:00
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
[source,terraform]
----
resource "aws_instance" "example" {
Modify Rule S6329: Make generic and add GCP (#733) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Make generic * Add GCP code sample * Update rules/S6329/terraform/rule.adoc Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com> * Fix syntax Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com> Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-03 09:41:02 +01:00
associate_public_ip_address = false
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
}
----
Modify Rule S6329: Make generic and add GCP (#733) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Make generic * Add GCP code sample * Update rules/S6329/terraform/rule.adoc Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com> * Fix syntax Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com> Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-03 09:41:02 +01:00
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
[source,terraform]
----
resource "aws_dms_replication_instance" "example" {
Modify Rule S6329: Make generic and add GCP (#733) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Make generic * Add GCP code sample * Update rules/S6329/terraform/rule.adoc Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com> * Fix syntax Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com> Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-03 09:41:02 +01:00
publicly_accessible = false
}
----
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
For Azure:
2022-02-04 17:28:24 +01:00
[source,terraform]
----
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
resource "azurerm_postgresql_server" "example" {
public_network_access_enabled = false
}
----
Modify Rule S6329: Make generic and add GCP (#733) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Make generic * Add GCP code sample * Update rules/S6329/terraform/rule.adoc Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com> * Fix syntax Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com> Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-03 09:41:02 +01:00
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
[source,terraform]
----
resource "azurerm_kubernetes_cluster" "production" {
api_server_authorized_ip_ranges = ["192.168.0.0/16"]
default_node_pool {
enable_node_public_ip = false
}
}
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
----
Modify Rule S6329: Make generic and add GCP (#733) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Make generic * Add GCP code sample * Update rules/S6329/terraform/rule.adoc Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com> * Fix syntax Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com> Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-03 09:41:02 +01:00
For GCP:
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
[source,terraform]
----
Modify Rule S6329: Make generic and add GCP (#733) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Make generic * Add GCP code sample * Update rules/S6329/terraform/rule.adoc Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com> * Fix syntax Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com> Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-03 09:41:02 +01:00
resource "google_compute_instance" "example" {
network_interface {
network = google_compute_network.vpc_network_example.name
Modify Rule S6329: Make generic and add GCP (#733) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Make generic * Add GCP code sample * Update rules/S6329/terraform/rule.adoc Co-authored-by: Loris S. <91723853+loris-s-sonarsource@users.noreply.github.com> * Fix syntax Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com> Co-authored-by: Loris S <91723853+loris-s-sonarsource@users.noreply.github.com>
2022-03-03 09:41:02 +01:00
}
}
----
Note that setting `network="default"` in the network interface block leads to
other security problems such as removal of logging, Cloud VPN/VPC network
peering, and the addition of insecure firewall rules. +
A safer alternative includes creating a specific VPC or subnetwork and enforce
security measures.
2022-02-04 17:28:24 +01:00
include::../see.adoc[]
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
* Omitting "{parameter}" allows network access from the Internet. Make sure it is safe here.
* Make sure allowing public network access is safe here.
* For the application_gateway and network_interface resources:
** Make sure it is safe to use this public IP address.
* For the kubernetes_cluster {api_server_authorized_ip_ranges} parameter and all firewall_rule resources:
** Make sure that allowing public IP addresses is safe here.
Modify rule S6329: Turn into generic rule (#655) * Create rule S6392 * Add first draft * improve title * add last commit to this PR regarding public network access * add metadata tags * changed title * converted ask yourself into generic cloud * converted description into generic cloud * moved aws links to see * converted recommended to generic cloud * convertion of recommended -- added a special case * add cwe * add note in recommended section, not sure about this one * add another cwe * add first version of rule conversion * final rule version * removed leftover code * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/terraform/rule.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * changed case for bulleted list * improved specs after review * removed potential confusion * changed company<->organization * Update rules/S6329/ask-yourself.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> * Update rules/S6329/description.adoc Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: hendrik-buchwald-sonarsource <64110887+hendrik-buchwald-sonarsource@users.noreply.github.com> Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
2022-02-07 11:00:36 +01:00
=== Highlighting
* If {parameter} is missing, highlight the resource.
* If the assignment is non-compliant, highlight the entire assignment
endif::env-github,rspecator-view[]