Create rule S7161: Tableau secrets should not be disclosed (#4497)

* Create rule S7161

* Add text

* Apply suggestions from code review

Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>

---------

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>
Co-authored-by: Jamie Anderson <127742609+jamie-anderson-sonarsource@users.noreply.github.com>
This commit is contained in:
github-actions[bot] 2024-11-15 16:56:28 +01:00 committed by GitHub
parent 21cc3400bd
commit 8d1152d450
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 119 additions and 5 deletions

View File

@ -10,13 +10,11 @@ If an attacker gains access to a Grafana personal access token or Granafa Cloud
Depending on the permissions given to the secret, the impact might range from the compromise of the data of some dashboards to a full takeover of the Grafana environment.
:service_name: Grafana
include::../../../shared_content/secrets/impact/data_compromise.adoc[]
==== Application takeover
With control over the Grafana application, the attacker can modify dashboards, alter data sources, or inject malicious code. This can result in the manipulation of displayed data, misleading visualizations, or even the introduction of backdoors for further exploitation.
The attacker may even attempt to escalate their privileges within the Grafana environment. By gaining administrative access or higher-level permissions, they can perform more significant actions, such as modifying access controls, adding or deleting users, or changing system configurations.
include::../../../shared_content/secrets/impact/dataviz_takeover.adoc[]
== How to fix it

View File

@ -0,0 +1,2 @@
{
}

View File

@ -0,0 +1,56 @@
{
"title": "Tableau secrets should not be disclosed",
"type": "VULNERABILITY",
"code": {
"impacts": {
"SECURITY": "HIGH"
},
"attribute": "TRUSTWORTHY"
},
"status": "ready",
"remediation": {
"func": "Constant\/Issue",
"constantCost": "30min"
},
"tags": [
"cwe",
"cert"
],
"defaultSeverity": "Blocker",
"ruleSpecification": "RSPEC-7161",
"sqKey": "S7161",
"scope": "All",
"securityStandards": {
"CWE": [
798,
259
],
"OWASP": [
"A3"
],
"CERT": [
"MSC03-J."
],
"OWASP Top 10 2021": [
"A7"
],
"PCI DSS 3.2": [
"6.5.10"
],
"PCI DSS 4.0": [
"6.2.4"
],
"ASVS 4.0": [
"2.10.4",
"3.5.2",
"6.4.1"
],
"STIG ASD_V5R3": [
"V-222642"
]
},
"defaultQualityProfiles": [
"Sonar way"
],
"quickfix": "unknown"
}

View File

@ -0,0 +1,46 @@
include::../../../shared_content/secrets/description.adoc[]
== Why is this an issue?
include::../../../shared_content/secrets/rationale.adoc[]
=== What is the potential impact?
Tableau secrets scopes depend on the type of secret. From the most impactful to
the least:
1. Account passwords
2. Personal access tokens (PAT)
3. "Credentials token", received after a SignIn request
Their scopes vary in terms of lifetime, access, and privileges.
Below are some real-world scenarios that illustrate some impacts of an attacker
exploiting the secret.
:secret_type: secret
:service_name: Tableau
include::../../../shared_content/secrets/impact/data_compromise.adoc[]
include::../../../shared_content/secrets/impact/dataviz_takeover.adoc[]
== How to fix it
include::../../../shared_content/secrets/fix/revoke.adoc[]
include::../../../shared_content/secrets/fix/vault.adoc[]
=== Code examples
:example_secret: FMWBZfscS96flnAPXVY06w|QQsOzThG6hqNvZcd6OPIpZs88lgcYTcb|77bfee95-c689-4fd1-a7e0-2cf050adbbb2
:example_name: tableau-auth
:example_env: TABLEAU_AUTH
include::../../../shared_content/secrets/examples.adoc[]
== Resources
include::../../../shared_content/secrets/resources/standards.adoc[]

View File

@ -0,0 +1,12 @@
==== Data visualization corruption and takeover
With control over the {service_name} application, the attacker can modify
dashboards, alter data sources, or inject malicious code. This can result in the
manipulation of displayed data, misleading visualizations, or even the
introduction of backdoors for further exploitation.
The attacker may even attempt to escalate their privileges within the
{service_name} environment. By gaining administrative access or higher-level
permissions, they can perform more significant actions, such as modifying access
controls, adding or deleting users, or changing system configurations.