generic.secrets.security.detected-softlayer-api-key.detected-softlayer-api-key

profile photo of semgrepsemgrep
Author
163
Download Count*

SoftLayer API Key detected

Run Locally

Run in CI

Defintion

rules:
  - id: detected-softlayer-api-key
    pattern-regex: (?i)softlayer.{0,50}["|'|`]?[a-z0-9]{64}["|'|`]?
    languages:
      - regex
    message: SoftLayer API Key detected
    severity: ERROR
    metadata:
      cwe:
        - "CWE-798: Use of Hard-coded Credentials"
      source-rule-url: https://github.com/Yelp/detect-secrets/blob/master/detect_secrets/plugins/softlayer.py
      category: security
      technology:
        - secrets
        - softlayer
      confidence: LOW
      owasp:
        - A07:2021 - Identification and Authentication Failures
      references:
        - https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures
      cwe2022-top25: true
      cwe2021-top25: true
      subcategory:
        - audit
      likelihood: LOW
      impact: MEDIUM
      license: Commons Clause License Condition v1.0[LGPL-2.1-only]
      vulnerability_class:
        - Hard-coded Secrets

Examples

detected-softlayer-api-key.txt

# ruleid: detected-softlayer-api-key
SOFTLAYER: abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234

# ruleid: detected-softlayer-api-key
softlayer="abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234"

# ruleid: detected-softlayer-api-key
SoftLayerApiKey = 'abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234'

# ruleid: detected-softlayer-api-key
My-SoftLayer-Api-Key= `abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234`

# ok: detected-softlayer-api-key
SOFTLAYER: abcd_234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234

# ok: detected-softlayer-api-key
SOFTLAYER: abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd123