Discord Oauth2 Keys
ID |
discord_oauth2 |
Severity |
low |
Vendor |
Discord |
Family |
API Token |
Description
Discord is a free voice, video, and text chat app that’s used by tens of millions of people to talk and hang out with their communities and friends.
People use Discord daily to talk about many things, ranging from art projects and family trips to homework and mental health support. It’s a home for communities of any size, but it’s most widely used by small and active groups of people who talk regularly.
OAuth2 enables application developers to build applications that utilize authentication and data from the Discord API.
Security
Any hardcoded Discord Oauth2 Key is a potential secret reported by this detector.
Accidentally checking-in the key to source control repositories could compromise your Discord account.
Examples
DISCORD_CLIENT_ID = "404373699287056385" DISCORD_CLIENT_SECRET = "xT2WdrtCyLPkbEI8FZuSNNf5sPxdJ-25"
Mitigation / Fix
-
Remove the
Keys
from the source code or committed configuration file. -
Follow your policy for handling leaked secrets, which typically require revoking the secret in the target system(s). API Key revocation can be handled from your Application Dashboard.
-
If under a git repository, you may remove unwanted files from the repository history using tools like
git filter-repo
orBFG Repo-Cleaner
. You may follow the procedure listed here for GitHub.
You should consider any sensitive data in commits with secrets as compromised. Remember that secrets may be removed from history in your projects, but not in other users' cloned or forked repositories. |