⚠️ You might be exposing a secret token, is this intended?
#1
by
token-scanner
- opened
Please check Space app file as you might be exposing a secret token.
We recommend you to use Repository secrets
(env variables) in your Space settings. Afterwards, you can use it like:
import os
SECRET_TOKEN = os.getenv("SECRET_TOKEN")
Read more here. Once this is fixed, we strongly advise you to invalidate or delete your secret so that no one else can use it. In case of a Hugging Face token, you can do this in your settings.
Yes I have checked and corrected the code. There is no hardcoded token in my application. The application includes only a form to temporarily enter a token, which is used to generate images using the user's own token. The application does not save these tokens anywhere; it only uses the entered token to send the API request.
Prav51
changed discussion status to
closed