fix: hashlib FIPS crash in skills_sync, weixin, web_server (usedforsecurity=False) - #65434
fix: hashlib FIPS crash in skills_sync, weixin, web_server (usedforsecurity=False)#65434AlexFucuson9 wants to merge 1 commit into
Conversation
…IPS compat) 3 files still had hashlib.md5/sha1 calls without usedforsecurity=False, which raises ValueError on FIPS-enabled systems (RHEL 9, Ubuntu FIPS, etc.). - tools/skills_sync.py: _dir_hash() content fingerprinting - gateway/platforms/weixin.py: content dedup + file upload checksums - hermes_cli/web_server.py: action name disambiguation (2 sites) All are non-security use cases (caching, dedup, naming). The sms/adapter.py HMAC-SHA1 call is intentionally NOT changed - it is used for Twilio webhook signature verification (cryptographic security use).
|
Thanks for the focused FIPS compatibility fix. Current main still has every target expression from this PR: Problems
Suggested changes
This is an automated hermes-sweeper review. |
|
suggesting changes The patch correctly annotates the five changed MD5/SHA-1 constructors as non-security uses, preserving digest values while avoiding the reported FIPS-mode constructor failure in Weixin deduplication/upload checksums, skill synchronization, and dashboard action identifiers. Focused tests, a FIPS-style constructor probe, Ruff, and compilation checks passed. A repository-wide residual search still finds analogous non-security weak-hash constructors in skills-hub cache keys, QQ/WeCom/Yuanbao upload identifiers, context compression, webhook receipt IDs, response IDs, and the TUI revision key, so the claimed remaining-call cleanup is incomplete.
Security evidence:
Not checked:
Signed: GPT-5.6-luna-max in Codex |
PR #65434: fix: hashlib FIPS crash in skills_sync, weixin, web_server (usedforsecurity=False)
|
Problem
3 files still call
hashlib.md5()/hashlib.sha1()withoutusedforsecurity=False. On FIPS-enabled systems (RHEL 9, Ubuntu 22.04 FIPS, AWS AL2023 FIPS), these raiseValueError: [digital envelope routines] unsupported, crashing the affected code paths.Files Fixed
tools/skills_sync.py_dir_hash()content fingerprintinggateway/platforms/weixin.pygateway/platforms/weixin.pyhermes_cli/web_server.pyhermes_cli/web_server.pyAll are non-security use cases (content hashing, dedup, naming).
Not Changed (intentionally)
plugins/platforms/sms/adapter.py:257— HMAC-SHA1 for Twilio webhook signature verification. This is a cryptographic security use case and must NOT useusedforsecurity=False.Related
Follows pattern from PRs #56715, #64062, #64808 which fixed the same issue in other files.