snyk fix
command is a new CLI command to apply the recommended updates for supported ecosystems automatically.snyk test
command, actionable fixes for supported ecosystems appear in the scan results as shown in the example that follows.snyk fix
.snyk fix
. In addition, all unsupported ecosystem test results are skipped.snyk fix
command supports all the snyk test
command options and has the following additional options:--quiet
- Suppress all output to the command line.--dry-run
- Run almost all the logic and display output, but do not make the final changes to the relevant files. Show a preview of the changes.--sequential
- Install each dependency update separately one at a time (the default is to install all at once). The default is much slower, but helps increase the number of successful updates by allowing some updates to fail and the process to continue.requirements.txt
files (or custom named files, for example prod.txt
)Pipfile
and Pipfile.lock
filespyproject.toml
and Poetry.lock
filessnyk fix --file=requirements.txt
snyk fix --file=base.txt --package-manager=pip
snyk fix --all-projects
-r
directivesrequirements.txt
looks like this, both base.txt
and requirements.txt
are updated if needed:constraints.txt
constraints.txt
file if referenced with the -c
directive in the requirements manifest file.pipenv
)pipenv
directly to update dependencies to the specified recommended versions. All pipenv
environment variables and behaviors are preserved as much as possible.poetry
)poetry
directly to update dependencies to the specified recommended versions. All poetry
environment variables and behaviors are preserved as much as possible.