snyk fixcommand is a new CLI command to apply the recommended updates for supported ecosystems automatically.
snyk testcommand, actionable fixes for supported ecosystems appear in the scan results as shown in the example that follows.
snyk fix. In addition, all unsupported ecosystem test results are skipped.
snyk fixcommand supports all the
snyk testcommand 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.txtfiles (or custom named files, for example
snyk fix --file=requirements.txt
snyk fix --file=base.txt --package-manager=pip
snyk fix --all-projects
requirements.txtlooks like this, both
requirements.txtare updated if needed:
constraints.txtfile if referenced with the
-cdirective in the requirements manifest file.
pipenvdirectly to update dependencies to the specified recommended versions. All
pipenvenvironment variables and behaviors are preserved as much as possible.
poetrydirectly to update dependencies to the specified recommended versions. All
poetryenvironment variables and behaviors are preserved as much as possible.