Create rule S6720(secrets): Zapier keys should not be disclosed (#2945)
You can preview this rule [here](https://sonarsource.github.io/rspec/#/rspec/S6720/secrets) (updated a few minutes after each push). ## Review A dedicated reviewer checked the rule description successfully for: - [ ] logical errors and incorrect information - [ ] information gaps and missing content - [ ] text style and tone - [ ] PR summary and labels follow [the guidelines](https://github.com/SonarSource/rspec/#to-modify-an-existing-rule) --------- Co-authored-by: loris-s-sonarsource <loris-s-sonarsource@users.noreply.github.com> Co-authored-by: Loris Sierra <loris.sierra@sonarsource.com>
This commit is contained in:
parent
e131b6b2db
commit
ec4643680c
2
rules/S6720/metadata.json
Normal file
2
rules/S6720/metadata.json
Normal file
@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
58
rules/S6720/secrets/metadata.json
Normal file
58
rules/S6720/secrets/metadata.json
Normal file
@ -0,0 +1,58 @@
|
||||
{
|
||||
"title": "Zapier webhook URLs should not be disclosed",
|
||||
"type": "VULNERABILITY",
|
||||
"code": {
|
||||
"impacts": {
|
||||
"SECURITY": "HIGH"
|
||||
},
|
||||
"attribute": "TRUSTWORTHY"
|
||||
},
|
||||
"status": "ready",
|
||||
"remediation": {
|
||||
"func": "Constant\/Issue",
|
||||
"constantCost": "30min"
|
||||
},
|
||||
"tags": [
|
||||
"cwe",
|
||||
"cert"
|
||||
],
|
||||
"extra": {
|
||||
"replacementRules": [
|
||||
|
||||
]
|
||||
},
|
||||
"defaultSeverity": "Blocker",
|
||||
"ruleSpecification": "RSPEC-6720",
|
||||
"sqKey": "S6720",
|
||||
"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"
|
||||
]
|
||||
},
|
||||
"defaultQualityProfiles": [
|
||||
"Sonar way"
|
||||
],
|
||||
"quickfix": "unknown"
|
||||
}
|
46
rules/S6720/secrets/rule.adoc
Normal file
46
rules/S6720/secrets/rule.adoc
Normal 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?
|
||||
|
||||
Zapier webhook URLs have different effects depending on their permissions: They
|
||||
can be used only to write simple messages in instant messaging apps or trigger
|
||||
other advanced workflows.
|
||||
|
||||
Below are some real-world scenarios that illustrate some impacts of an attacker
|
||||
exploiting the secret.
|
||||
|
||||
include::../../../shared_content/secrets/impact/phishing.adoc[]
|
||||
|
||||
include::../../../shared_content/secrets/impact/malware_distribution.adoc[]
|
||||
|
||||
include::../../../shared_content/secrets/impact/codeless_vulnerability_chaining.adoc[]
|
||||
|
||||
== How to fix it
|
||||
|
||||
include::../../../shared_content/secrets/fix/revoke.adoc[]
|
||||
|
||||
include::../../../shared_content/secrets/fix/vault.adoc[]
|
||||
|
||||
=== Code examples
|
||||
|
||||
:example_secret: https://hooks.zapier.com/hooks/catch/3017724/t0q8ed/
|
||||
:example_name: zapier_webhook_url
|
||||
:example_env: ZAPIER_WEBHOOK_URL
|
||||
|
||||
include::../../../shared_content/secrets/examples.adoc[]
|
||||
|
||||
//=== How does this work?
|
||||
|
||||
//=== Pitfalls
|
||||
|
||||
//=== Going the extra mile
|
||||
|
||||
== Resources
|
||||
|
||||
include::../../../shared_content/secrets/resources/standards.adoc[]
|
||||
|
||||
//=== Benchmarks
|
@ -0,0 +1,11 @@
|
||||
==== Chaining of vulnerabilities
|
||||
|
||||
Triggering arbitrary workflows can lead to problems ranging from a denial of
|
||||
service to worse, depending on how the webhook's data is handled. If the
|
||||
webhook performs a specific action that is affected by a vulnerability, the
|
||||
webhook acts as a remote attack vector on the enterprise.
|
||||
|
||||
Components affected by this webhook could, for example, experience unexpected
|
||||
failures or excessive resource consumption. If it is a single point of failure
|
||||
(SPOF), this leak is critical.
|
||||
|
Loading…
x
Reference in New Issue
Block a user