-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Florian Sandel
authored and
Florian Sandel
committed
Aug 29, 2024
1 parent
6979100
commit 759f645
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -363,7 +363,7 @@ def _generate_jwt(self, credentials: ServiceFileCredentials) -> str: | |
} | ||
headers = {"kid": credentials["kid"]} | ||
return jwt.encode( | ||
payload, credentials["privateKey"], algorithm="RS512", headers=headers | ||
payload, credentials["privateKey"], algorithm="RS512", headers=headers # nosemgrep "privateKey" is just the key for the dictionary | ||
Check failure Code scanning / Semgrep Semgrep Finding: python.jwt.security.jwt-hardcode.jwt-python-hardcoded-secret Error
Hardcoded JWT secret or private key is used. This is a Insufficiently Protected Credentials weakness: https://cwe.mitre.org/data/definitions/522.html Consider using an appropriate security mechanism to protect the credentials (e.g. keeping secrets in environment variables)
|
||
) | ||
|
||
def _request_access_token(self, jwt_token: str) -> str: | ||
|