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

profile photo of semgrepsemgrep
Author
163
Download Count*

SendGrid API Key detected

Run Locally

Run in CI

Defintion

rules:
  - id: detected-sendgrid-api-key
    pattern-regex: SG\.[a-zA-Z0-9]{22}\.[a-zA-Z0-9-]{43}\b
    languages:
      - regex
    message: SendGrid API Key detected
    severity: ERROR
    metadata:
      cwe:
        - "CWE-798: Use of Hard-coded Credentials"
      source-rule-url: https://github.com/narendrakadali/gitrob/blob/master/rules/contentsignatures.json
      category: security
      technology:
        - secrets
        - sendgrid
      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-sendgrid-api-key.txt

# ruleid: detected-sendgrid-api-key
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

# ok: detected-sendgrid-api-key
PE.ngeVfQFYQlKU0ufo8x5d1A.TwL2iGABf9DHoTf-09kqeF8tAmbihYzrnopKc-1s5cr

# ok: detected-sendgrid-api-key
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

# ok: detected-sendgrid-api-key
SG.ngeVfQFYQlKU0ufo8x5d1A.TwL2iGABf9DHoTf-09kqeF8tAmbihYzrnopKc-1s5c

# ok: detected-sendgrid-api-key
SG.ngeVfQFYQlKU0ufo8x5d1A.TwL2iGABf9DHoTf-09kqeF8tAmbihYzrnopKc-1s5crt

# ok: detected-sendgrid-api-key
SG.ngeVfQFYQlKU0ufo8x5d1.TwL2iGABf9DHoTf-09kqeF8tAmbihYzrnopKc-1s5cr

# ok: detected-sendgrid-api-key
SGngeVfQFYQlKU0ufo8x5d1ATwL2iGABf9DHoTf09kqeF8tAmbihYzrnopKc1s5cr