Repository navigation
fix(web-security): install pacu in its own tool environment (ENG-8936) - #194
Merged
Merged
Conversation
pacu pins urllib3<2 and botocore<1.32. Installing it into the shared Python environment downgraded urllib3, boto3 and botocore. Install it with uv tool install instead, in install_tools.sh and Dockerfile.runtime. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The focused dependency-isolation changes preserve CLI availability and failure handling, with no blocking issues identified.
No open issues 🎉
What changed in this PR
Isolates Pacu from web-security’s shared Python environment to prevent dependency downgrades.
Changes:
- Installs pinned Pacu 1.7.0 through
uv toolin the installer and runtime image. - Adds regression checks for isolated installation.
- Bumps the capability version to 2.0.4.
| File | Description |
|---|---|
| capabilities/web-security/tests/test_install_tools_offline.py | Adds isolated-installation regression checks. |
| capabilities/web-security/scripts/install_tools.sh | Uses uv tool install, preserving existing guards and failure handling. |
| capabilities/web-security/docker/Dockerfile.runtime | Isolates Pacu while keeping its launcher accessible to runner. |
| capabilities/web-security/capability.yaml | Bumps version to 2.0.4. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
web-security installed pacu into the shared Python environment. pacu 1.7.0 pins
urllib3>=1.26.4,<2.0.0andbotocore>=1.16,<1.32, and its dependency dsnap 1.0.1 also pins urllib3 below 2. Installing pacu downgraded urllib3 to 1.26.20, boto3 to 1.28.85 and botocore to 1.31.85 for every other package in that environment.Change
scripts/install_tools.sh:install_pacurunsuv tool install pacu==1.7.0instead ofpy_install pacu. It is still guarded byhave pacuand still printsWARN: pacu install failed, skippingon failure.docker/Dockerfile.runtime: removespacufrompip install. A new layer runsuv tool install --python /usr/bin/python3 pacu==1.7.0withUV_TOOL_DIR=/opt/uv-toolsandUV_TOOL_BIN_DIR=/usr/local/bin, so therunneruser can run it.tests/test_install_tools_offline.py: addsTestPacuOwnToolEnvironment.capability.yaml: 2.0.3 → 2.0.4.pacu's own tool environment still has urllib3 1.26.20, because no pacu release supports urllib3 2.
Testing
Dockerfile.runtimebuilt on linux/amd64. Asrunner:command -v pacu→/usr/local/bin/pacu,pacu --helpexits 0, sharedurllib3is 2.8.0.install_dependencies(runsinstall_tools.sh):pacuresolves to~/.local/bin/pacu,pacu --helpexits 0,uv tool listshowspacu v1.7.0,uv pip checkis clean, and the shared venv keepsurllib3==2.8.0,boto3==1.43.75andbotocore==1.43.75with nopacu.pytest capabilities/web-security/tests/test_install_tools_offline.py: 66 passed.pytest capabilities/web-security/tests: 742 passed, 2 failed. Both failures aretest_wrangler.py::TestStatus, which needswrangleron PATH. They also fail onmain.just validate strict=true: 20 ok, 6 warn, 0 failed. The warnings are missing local binaries.Base
30680eca1143cf5d018657e71fb85def85368095, head9f6218f761dd30b60a03f405c18b12b425d90a41.🤖 Generated with Claude Code