Skip to content

Commit

Permalink
ignore semgrep finding
Browse files Browse the repository at this point in the history
  • 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.
2 changes: 1 addition & 1 deletion certbot_dns_stackit/stackit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 759f645

Please sign in to comment.