What the agent does
The agent clones the repository into its own cloud sandbox and reads how SSH is reached. In a single-file CLI like AthenaNetworks/ssh_commander, requirements.txt pins paramiko==3.3.1 beside PyYAML==6.0.1, colorama==0.4.6, pyinstaller==6.4.0, boto3==1.34.0, gitpython==3.1.40 and requests==2.31.0; ssh_commander.py imports paramiko lazily through get_paramiko() and uses paramiko.SSHClient() with AutoAddPolicy or RejectPolicy in _build_client, and paramiko.Transport plus SFTPClient.from_transport to fetch a config over SFTP. build.sh packs it with pyinstaller --onefile, debian/control and rpm/ssh-commander.spec depend on the distribution's python3-paramiko, and the README installs with python3 -m venv venv and pip install -r requirements.txt.
Then it reproduces the warning. pip install -r requirements.txt resolves paramiko 3.3.1 with the current cryptography, and python -c "import paramiko" prints two lines before anything else: paramiko/pkey.py:100: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0. and the same from paramiko/transport.py:258. The CLI itself prints nothing, and the agent finds why at lines 31 to 36: warnings.filterwarnings('ignore', category=CryptographyDeprecationWarning, message='.*TripleDES.*'), with CryptographyDeprecationWarning imported from cryptography.utils. With that filter removed, ssh-commander test against an unreachable host prints the two warnings and then its connection failure.
It then finds the version that fixes the cause rather than the symptom: paramiko 3.5.0 imports clean under -W error, and so does the current release; 3.3.1 is also clean with a cryptography below 43, which is the pairing the pin was written against. So the change is to move paramiko==3.3.1 to a release at or past 3.5, delete the filter and the cryptography.utils import, and run ssh-commander test and exec -c uptime under python -W error to show nothing is raised before the SSH attempt. The agent keeps the lazy import, since it is what makes --help and list fast.
Two things it reports without changing: debian/control and the RPM spec take whatever python3-paramiko the distribution ships, so the packaged builds depend on that version being 3.5 or later, and build.sh bundles the virtualenv's paramiko into the PyInstaller binary, so the pin is what ships there. The pull request says which paths are covered by the new pin and which by the distribution.
Start it with one API call
POST https://api.phoenix.so/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "This Python tool prints \"CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES\" when it imports paramiko. Read requirements.txt, setup files, packaging files and every module that imports paramiko or cryptography first. Install the pinned versions and reproduce the warning with python -c \"import paramiko\", quoting each line. Search the code for any warnings.filterwarnings or similar that hides this warning and quote it. Find the lowest paramiko release at which the import is clean under python -W error with the current cryptography, move the pin to that release or later, remove the filter and any import that existed only for it, and run the tool's own commands under -W error to show it starts and reaches the SSH step. Do not change other pins. Note any packaging path that takes paramiko from somewhere other than the pin. Open a pull request that quotes the warning before and the clean runs after.",
"resources": [
{
"url": "https://github.com/your-org/your-app"
}
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
What comes back is a pull request touching requirements.txt and ssh_commander.py: the paramiko pin moved past 3.5, the six-line filter and its cryptography.utils import gone, nothing else in the tool changed. The description quotes the two CryptographyDeprecationWarning lines with their paramiko file and line, the filter it removed with its line, the paramiko and cryptography versions at which the import is clean, and the test and exec runs under -W error that reach the connection step without a warning.
A reviewer checks that the pin is a release the tool's own pyinstaller build and its Python floor accept, that no other warnings.filterwarnings remains in the file, and reads the note on the Debian and RPM dependencies that take paramiko from the distribution instead of the pin. The run's record holds every import and command with its full output.
Run it on every deprecation warning in a CI log
Add an automation to the Project with this prompt and a webhook trigger. In the CI job that installs the tool, run its smoke test with PYTHONWARNINGS=default and add a step that greps the log for CryptographyDeprecationWarning; on a match it sends the lines to the trigger's URL with Authorization: Bearer and the secret Rush showed when the trigger was made. One run starts per such job and opens one pull request on its own branch; a run that cannot find a clean release ends needs_review with its findings attached.
From your own code, send this body to POST /o/{org}/sessions with an API key and a request_id that is a UUID v5 of the CI run id, so a retried delivery returns the run already started rather than opening a second pull request.
The use case this job follows, with its automation and trigger: Fix a bug from an alert.
Why run it on Rush?
A warning filter is the fix people reach for at a laptop, and in this repository it is already there: the tool runs quietly while the pinned paramiko keeps asking cryptography for an algorithm it has scheduled for removal. The agent takes the filter out, reproduces what it was hiding, and tests releases of paramiko against today's cryptography in its own sandbox until one imports clean, with every attempt kept in the run's record, so the pull request moves the pin on evidence rather than on a changelog.
It also traces where the dependency actually comes from. A pin, a PyInstaller bundle and two distribution packages can each ship a different paramiko, and the pull request says which the change covers. That is the kind of note a human forgets to write on a two-line fix, and on Rush it comes back with the proof attached, started by the CI log that first showed the warning.
Frequently asked questions
Why not keep the filter and move on?
Because the filter hides the message, not the cause. Paramiko 3.3.1 still imports TripleDES from the location cryptography is retiring, and the day cryptography removes it the tool fails at import with no warning to point at. Moving the pin to a paramiko release that imports it from the new location is the fix; the filter then has nothing to silence.
Which paramiko release is clean?
3.5.0 imports with no warning against the current cryptography, and so does the current paramiko release. 3.3.1 is clean only with cryptography below 43. The agent picks the lowest clean release at or above the pin unless you ask for the latest, and quotes the import check for whichever it chose.
Does this change how the tool connects?
No. The SSH client, host-key policies and the SFTP transport are untouched, and the lazy import stays. The agent runs test and exec under -W error so that a warning anywhere before the connection attempt would fail the run, and the pull request quotes the connection error the unreachable host produced as proof it got that far.
What about the Debian and RPM packages?
They declare python3-paramiko from the distribution, so the version they use is whatever the target system ships. The pull request notes that the pin fixes the pip and PyInstaller paths and that the packaged builds need a distribution release carrying paramiko 3.5 or later, which you can check in the package's changelog.
More jobs like this: Fix a bug from an alert
- Fix "AttributeError: module 'tweepy' has no attribute 'StreamListener'" (Tweepy)
- Fix "AttributeError: type object 'Qt' has no attribute 'AlignCenter'" When Moving to PyQt6 (PyQt6)
- Fix "uninitialized constant Fixnum (NameError)" on Ruby 3.2 and later (Ruby)
- Fix "AttributeError: 'TestCase' object has no attribute 'assertEquals'" on Python 3.12 (unittest)
- Fix "AttributeError: module 'unittest' has no attribute 'makeSuite'" on Python 3.13 (unittest)
- Fix "TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"" in ts-node (ts-node)