generic.secrets.gitleaks.new-relic-user-api-key.new-relic-user-api-key
semgrep
Author
unknown
Download Count*
License
A gitleaks new-relic-user-api-key was detected which attempts to identify hard-coded credentials. It is not recommended to store credentials in source-code, as this risks secrets being leaked and used by either an internal or external malicious adversary. It is recommended to use environment variables to securely provide credentials or retrieve credentials from a secure vault or HSM (Hardware Security Module).
Run Locally
Run in CI
Defintion
rules:
- id: new-relic-user-api-key
message: A gitleaks new-relic-user-api-key was detected which attempts to
identify hard-coded credentials. It is not recommended to store
credentials in source-code, as this risks secrets being leaked and used by
either an internal or external malicious adversary. It is recommended to
use environment variables to securely provide credentials or retrieve
credentials from a secure vault or HSM (Hardware Security Module).
languages:
- regex
severity: INFO
metadata:
likelihood: LOW
impact: MEDIUM
confidence: LOW
category: security
cwe:
- "CWE-798: Use of Hard-coded Credentials"
cwe2021-top25: true
cwe2022-top25: true
owasp:
- A07:2021 - Identification and Authentication Failures
references:
- https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html
source-rule-url: https://github.com/zricethezav/gitleaks/tree/master/cmd/generate/config/rules
subcategory:
- vuln
technology:
- gitleaks
license: Commons Clause License Condition v1.0[LGPL-2.1-only]
vulnerability_class:
- Hard-coded Secrets
patterns:
- pattern-regex: (?i)(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t
.]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(NRAK-[a-z0-9]{27})(?:['|\"|\n|\r|\s|\x60|;]|$)
Examples
new-relic-user-api-key.go
// ruleid: new-relic-user-api-key
new-relic_api_token = "NRAK-qsbuwf18kf8x090dc6ujmeqbacy"
new-relic_api_token = "gvyu5ynbdth6sb31k7fw2885zfv223assxf0p5gdiqmlv9ok7oozevb0ipa587k5"
new-relic_api_token = "NRJS-3878472f6a4247b4649"
Short Link: https://sg.run/2qbD