Safety 2.0.0 and Safety GitHub Action - Python Dependency Scanner
PyUp is excited to release Safety 2.0 CLI and Safety as a GitHub Action!
Compared to previous versions, Safety 2.0 will be a significant update that includes new features and refactors, resulting in breaking changes to some inputs and outputs. The new GitHub Action enables you to configure Python dependency security and compliance scans on your repositories on new commits, new branches, pull requests, and more.
Summary:
Safety 2.0 major release (notes below) and GitHub Action release
Updated outputs:
Text & screen output: Upgraded the text and screen outputs, removing the old table style and adding new data and formats to vulnerabilities.
JSON output: New and updated JSON output (breaking change). Safety adds all the possible information in the JSON report. The structure of this JSON file has been improved.
Improved the support for exit codes. There are now custom exit codes with detailed information about the result. Examples include: VULNERABILITIES_FOUND and INVALID_API_KEY.
Added remediations (fix recommendations) sections to outputs. Now, Safety will suggest the steps to fix a detected vulnerability when an API key is used.
Added new summary meta-data data to the reports showing the Safety version used, the dependencies found, the timestamp, the target scanned, and more. These data are included in the text, screen, and JSON output for improved audit capabilities.
Added more info per vulnerability, including URLs to read more about a vulnerability and/or a package.
New command line flags:
New command line flags
The --output flag replaces --bare, --text, --screen, and --json flags. In this new release, examples would be: --output json or --output bare.
The --continue-on-error flag suppresses non-zero exit codes to force pass CI/CD checks, if required.
The --debug flag allows for a more detailed output.
The --disable-telemetry flag has been added to disable telemetry data
The --policy-file flag to include a local security policy file. This file (called .safety-policy.yml, found in either the root directory where Safety is being run or in a custom location) is based on YAML 1.2 and allows for:
Ignoring individual vulnerabilities with optionally a note and an expiry date.
Filtering vulnerabilities by their CVSS severity. (CVSS data is only available for some paid accounts.)
Other
Dropped support for Python < 3.6
The free version of the Safety vulnerability database is downloaded from a public S3 bucket (via PyUp.io) and no longer from GitHub. This free database is only updated once a month and is not licensed for commercial use.
Telemetry data will be sent with every Safety call. These data are anonymous and not sensitive. This includes the Python version, the Safety command used (check/license/review), and the Safety options used (without their values). Users can disable this functionality by adding the --disable-telemetry flag.
Added validations to avoid the use of exclusive options.
Added announcements feature to receive informative or critical messages from the PyUp Safety team.
Increased test coverage.
Now Safety can be used as a dependency in your code
Added Safety as a Github Action
Improved the help text in the CLI
Added the --save-json flag
2.0b2
Safety 2.0b2
Summary:
This version of Safety is not stable; it is only a beta, pre-release version.
Compared to previous versions, Safety 2.0 will be a significant update that includes new features and refactors, resulting in breaking changes to some inputs and outputs.
Improved grammar and formatting in the whole code
Improved the exception handling in the .yml policy file parsing
Improved the JSON output following the customers/users feedback - (This is a breaking change between beta releases)
Suppressed the announcements sent to stderr when it is running via 'run' environments
[2.0b3] - 2022-05-30
Summary:
Fixed issue in the Screen and Text report due to the remediations rendering for the users using an API Key
Improved the handling exception in the generate command
[2.0b2] - 2022-05-27
Summary:
This version of Safety is not stable; it is only a beta, pre-release version.
Compared to previous versions, Safety 2.0 will be a significant update that includes new features and refactors, resulting in breaking changes to some inputs and outputs.
Improved grammar and formatting in the whole code
Improved the exception handling in the .yml policy file parsing
Improved the JSON output following the customers/users feedback - (This is a breaking change between beta releases)
Added the generate command
Added the validate command
[2.0b1] - 2022-05-08
Summary:
This version of Safety is not stable; it is only a beta, pre-release version.
Compared to previous versions, Safety 2.0 will be a significant update that includes new features and refactors, resulting in breaking changes to some inputs and outputs.
Updated outputs:
Text & screen output: Upgraded the text and screen outputs, removing the old table style and adding new data and formats to vulnerabilities.
JSON output: New and updated JSON output (breaking change). Safety adds all the possible information in the JSON report. The structure of this JSON file has been improved.
Improved the support for exit codes. There are now custom exit codes with detailed information about the result. Examples include: VULNERABILITIES_FOUND and INVALID_API_KEY.
Added remediations (fix recommendations) sections to outputs. Now, Safety will suggest the steps to fix a detected vulnerability when an API key is used.
Added new summary meta-data data to the reports showing the Safety version used, the dependencies found, the timestamp, the target scanned, and more. These data are included in the text, screen, and JSON output for improved audit capabilities.
Added more info per vulnerability, including URLs to read more about a vulnerability and/or a package.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps safety from 1.10.3 to 2.0.0.
Release notes
Sourced from safety's releases.
... (truncated)
Changelog
Sourced from safety's changelog.
... (truncated)
Commits
691651e
Version 2.0.038d3586
Update README.mda3decdd
Version 2.0b5ce0a90c
Merge pull request #387 from pyupio/develop7ac6461
Merge pull request #386 from pyupio/fix/safety-non-cli-support3a5d425
Improving the CLI flags5343b4f
Removing the click context use6d78db8
Merge pull request #385 from pyupio/masterfd5e4cb
Starting version 2.0b5.dev9611ce5
Add branding to ActionDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)