Secrets Scanning

It is important to manage your secrets (env variables) properly. The most common way people expose their secrets to the outside world is by hard-coding their secrets in their app.py files directly, which makes it possible for a malicious user to utilize your secrets and services your secrets have access to.

For example, this is what a compromised app.py file might look like:

import numpy as np
import scipy as sp

api_key = "sw-xyz1234567891213"

def call_inference(prompt: str) -> str:
    result = call_api(prompt, api_key)
    return result

To prevent this issue, we run TruffleHog on each push you make. TruffleHog scans for hard-coded secrets and we will send you an email upon detection. You’ll only receive an email for verified secrets. Verified secrets are secrets that have been verified by trufflehog, meaning that they can be used to authenticate to their given provider. Note that unverified secrets are not necessarily invalid, verification can also fail due to technical reasons, e.g. in that case of a network error.

TODO: add a picture of the email?

< > Update on GitHub