Repository navigation
fix(docker): replace passlib with libpass in the server image - #4322
muhammadyusuf-kurbonov wants to merge 1 commit into
Conversation
passlib 1.7.4 is unmaintained and fails to load its bcrypt backend with
bcrypt 5, which paramiko pulls in. This broke password_hash('bcrypt') and
community.general.htpasswd. libpass is the maintained drop-in fork that
provides the same passlib package and supports bcrypt 5.
Fixes semaphoreui#4180
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe server Dockerfile now installs libpass instead of passlib in the Ansible virtual environment. ChangesAnsible password hashing
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The server image’s current package resolution supports bcrypt hashing for ordinary passwords. The acknowledged 72-byte bcrypt limit and possible future dependency drift do not establish a current merge blocker. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change is confined to the server’s password-hashing dependency. No expansion of runtime privileges or credential access was found. Remaining uncertainty concerns compatibility across published image variants and dependency versions selected by future builds. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
Fixes #4180.
passlib1.7.4 (last release 2020) cannot load its bcrypt backend withbcrypt5, whichparamikopulls into the server image.libpassis the maintained fork: it installs the samepasslibpackage, so Ansible needs no other change.bcryptis deliberately not added as a dependency; it stays an optional backend that arrives only viaparamiko. The runner and job images are unchanged.Evidence
Before (
passlib 1.7.4+bcrypt 5.0.0, ansible-core 2.20.8, venv):After (server image built from this branch: Python 3.14.8, ansible 13.5.0, ansible-core 2.20.10,
libpass 1.9.3,bcrypt 5.0.0,paramiko 5.0.0):Also checked in venvs with
libpass 1.9.3:password_hash('bcrypt')works on ansible-core 2.16.5 / Python 3.12 (the Ansible 9.x line used by release builds).passlibimport used by ansible 13.5.0 core and collections loads (passlib.hash,passlib.context,passlib.apache,passlib.utils.handlers,passlib.utils.binary).bcrypt.checkpw; an existing$2a$hash still verifies.ansible.netcommon.type5_pwworks.Merge Danger
Door: two-way. One word in one Dockerfile; reverting restores
passlib.Blast Radius: the server image's Ansible venv only.
bcrypt5 instead of being silently truncated. This comes frombcrypt5 itself, not fromlibpass.libpassdropped some legacy passlib internals; playbooks or custom plugins that import private passlib APIs could be affected. None of the imports in ansible 13.5.0 are.ansible==9.4.0build on the Alpine image, and the runner/job images (unchanged here).🤖 Generated with Claude Code
Summary by CodeRabbit