Skip to content

fix: hashlib.sha1 FIPS crash in tui_gateway/server.py and optional-skills/dossier.py - #77745

Open
JonthanaHanh wants to merge 1 commit into
NousResearch:mainfrom
JonthanaHanh:fix/hashlib-fips-tui-gateway-and-dossier
Open

fix: hashlib.sha1 FIPS crash in tui_gateway/server.py and optional-skills/dossier.py#77745
JonthanaHanh wants to merge 1 commit into
NousResearch:mainfrom
JonthanaHanh:fix/hashlib-fips-tui-gateway-and-dossier

Conversation

@JonthanaHanh

Copy link
Copy Markdown
Contributor

Summary

Add usedforsecurity=False to two remaining hashlib.sha1() calls that crash on FIPS-enabled systems (RHEL 8/9).

Changes

  • tui_gateway/server.py:11677 — revision hash for MCP config change detection
  • optional-skills/security/unbroker/scripts/dossier.py:25 — opaque subject ID generation

Both calls use SHA-1 for non-security purposes (content hashing, unique ID generation). On FIPS-enabled systems, hashlib.sha1() without usedforsecurity=False raises ValueError: EVP_DigestInit_ex disabled for FIPS.

Background

This is the same pattern fixed in prior PRs for other files:

These two call sites were missed in those earlier batches. SHA-256 is FIPS-approved and does not need this parameter.

Add usedforsecurity=False to hashlib.sha1 calls in:
- tui_gateway/server.py:11677 — revision hash for MCP config change detection
- optional-skills/security/unbroker/scripts/dossier.py:25 — opaque subject ID generation

Both calls use SHA-1 for non-security purposes (content hashing, ID generation).
On FIPS-enabled systems (RHEL 8/9), hashlib.sha1() without usedforsecurity=False
raises ValueError: EVP_DigestInit_ex disabled for FIPS.

This is the same pattern fixed in prior PRs for other files (NousResearch#56715, NousResearch#56716,
NousResearch#56719, NousResearch#62654, NousResearch#64062, NousResearch#66857). These two call sites were missed in those batches.
@alt-glitch alt-glitch added type/security Security vulnerability or hardening comp/tui Terminal UI (ui-tui/ + tui_gateway/) tool/skills Skills system (list, view, manage) P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Aug 3, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #77391: the current patch changes the same two FIPS SHA-1 call sites with the same usedforsecurity=False mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have tool/skills Skills system (list, view, manage) type/security Security vulnerability or hardening

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants