github-actions[bot] 00cae9e326
Create rule S6412[terraform]: Unversioned Google Cloud Storage buckets are security-sensitive (#749)
* Create rule S6412

* init s6412

* fixes after review

* remove one ask yourself question

* Add code highlighted tag to code example

Co-authored-by: eric-therond-sonarsource <eric-therond-sonarsource@users.noreply.github.com>
Co-authored-by: eric-therond-sonarsource <eric.therond@sonarsource.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-04 13:27:35 +00:00

43 lines
701 B
Plaintext

include::../description.adoc[]
include::../ask-yourself.adoc[]
include::../recommended.adoc[]
== Sensitive Code Example
Versioning is disabled by default:
[source,terraform]
----
resource "google_storage_bucket" "example" { # Sensitive
name = "example"
location = "US"
}
----
== Compliant Solution
Versioning is enabled:
[source,terraform]
----
resource "google_storage_bucket" "example" {
name = "example"
location = "US"
versioning {
enabled = "true"
}
}
----
include::../see.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
endif::env-github,rspecator-view[]