github-actions[bot] e7aa3e8c2e
Create rule S6414[terraform]: Excluding users or groups activities from audit logs is security-sensitive (#805)
* Create rule S6414

* init s6414

* fixes after review

* fix noncompliant sample

* Fix typo in the rule title

* 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: Pierre-Loup Tristant <pierre-loup.tristant@sonarsource.com>
Co-authored-by: Nils Werner <nils.werner@sonarsource.com>
2022-03-04 12:52:46 +00:00

47 lines
871 B
Plaintext

include::../description.adoc[]
include::../ask-yourself.adoc[]
include::../recommended.adoc[]
== Sensitive Code Example
[source,terraform]
----
resource "google_project_iam_audit_config" "example" {
project = data.google_project.project.id
service = "allServices"
audit_log_config {
log_type = "ADMIN_READ"
exempted_members = [ # Sensitive
"user:rogue.administrator@gmail.com",
]
}
}
----
== Compliant Solution
[source,terraform]
----
resource "google_project_iam_audit_config" "example" {
project = data.google_project.project.id
service = "allServices"
audit_log_config {
log_type = "ADMIN_READ"
}
}
----
include::../see.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
include::../highlighting.adoc[]
endif::env-github,rspecator-view[]