Replies: 1 comment
|
Hi @chiemenz, thanks for flagging this. Apologies for the slow response; the backlog got away from us. The flagged file isn't Strands code: More importantly, the finding is a false positive. That code implements PKCE verification per RFC 7636, and the spec's S256 method mandates exactly a plain SHA-256 of the code verifier. A code verifier is a one-time, high-entropy random value exchanged within a single OAuth flow, not a stored password, so the "weak algorithm for password hashing" rule (CWE-327/328) doesn't apply to it. Salting or a slow KDF here would actually break the protocol. Also worth knowing for your risk assessment: that module is the server-side OAuth handler of the MCP SDK. A Strands agent acts as an MCP client, so this code path never executes in a typical agent Lambda unless you're also hosting an MCP server with auth enabled in the same deployment. The practical route is to suppress this specific finding in Inspector with the RFC 7636 justification above, which is usually enough for an enterprise security review. If you'd like it resolved at the source (for example via a detector suppression annotation in the code), the right place to raise it is the upstream repo, modelcontextprotocol/python-sdk. Hope this unblocks your deployment! |
Uh oh!
There was an error while loading. Please reload this page.
I would like to deploy a AWS Lambda using the strands agent library into production in enterprise settings. However, this is currently blocked by the requirement that there are no AWS Inspector Findings with severity high. Is it planned to fix this finding?
python/mcp/server/auth/handlers/token.py
vulnerability location
error_description=("redirect_uri did not match the one " "used when creating auth code"),
)
)
Severity:
High
Type:
Code Vulnerability
Detector name:
Weak algorithm used for Password Hashing
Relevant CWE:
CWE-327 , CWE-328
Rule ID:
python-hashlib-naive-hashing-not-suitable-for-secrets
Detector tags
#cryptography, #security, #owasp-top10, #cwe-327, #cwe-328, #Python
Fix available
Yes
Created at
June 5, 2025 12:07 PM (UTC+02:00)
All reactions