This MR contains the following updates:
- Pinned packaging dependency to a compatible range.
- Pinned the CI actions to the runner image with Python 3.6 support.
- Removed LegacyVersion use; this fixes the issue with packaging 22.0.
- Fixed typos in the README.
- Added Python 3.11 to the classifiers in the setup.cfg.
- Fixed recursive requirements issue when an unpinned package is found.
- Fixed #423: Bare output includes extra line in non-screen output with no vulnerabilities.
- Fixed #422: ResourceWarning (unclosed socket) in safety v.2.3.1.
- Fixed telemetry data missing when the CLI mode is used.
- Fixed wrong database fetching when the KEY and the database arguments are used at the same time.
SAFETY_PURE_YAMLenv var, used for cases that require pure Python in the YAML parser.
safety.alertsmodule to setup.cfg
- Safety can now create GitHub MRs and Issues for vulnerabilities directly, with the new
- Support for GitHub MR and Issue alerting has been added to the GitHub Action.
- Fixed the use of the SAFETY_COLOR environment variable
- Fixed bug in the case of vulnerabilities without a CVE linked
- Fixed GitHub version in the README
- Safety starts to use dparse to parse files, now Safety supports mainly Poetry and Pipenv lock files plus other files supported by dparse.
- Added logic for custom integrations like pipenv check.
- The --db flag is compatible remote sources too.
- Added more logging
- Upgrade dparse dependency to avoid a possible ReDos security issue
- Removed Travis and Appveyor, the CI/CD was migrated to GitHub Actions
- Fix crash when running on systems without git present (Thanks @andyjones)
- Improved error messages & fixed issues with proxies
- Fixed license command
- Added the ability for scan outputs to be sent to pyup.io. This will only take effect if using an API key, the feature is enabled on your profile, and the
--disable-audit-and-monitoris not set
- Added the ability to have a Safety policy file set centrally on your pyup.io profile. This remote policy file will be used if there's no local policy file present, otherwise a warning will be issued.
- Text & screen output: If a scan has been logged, this is now mentioned in the output.
- JSON output: The JSON output now includes git metadata about the folder Safety was run in. It also includes a version field, and telemetry information that would be sent separately. There are no breaking changes in the output.
- New command line flags
--disable-audit-and-monitorflag can be set to disable sending a scan's result to pyup.io
--projectflag can be set to manually specify a project to associate these scans with. By default, it'll autodetect based on the current folder and git.
- 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.
- 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
--jsonflags. In this new release, examples would be:
--continue-on-errorflag suppresses non-zero exit codes to force pass CI/CD checks, if required.
--debugflag allows for a more detailed output.
--disable-telemetryflag has been added to disable telemetry data
--policy-fileflag 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.)
- 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 (
review), and the Safety options used (without their values). Users can disable this functionality by adding the
- 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
- Avoid 1.10.2post1 bug with pyup updates
- Provide CVSS values on full report for CVEs (requires a premium PyUp subscription)
- Fixed used DB wrong info
- Support line breaks on advisories
- Reduced Docker image and Binary size
- Added bare and json outputs to license command
If you want to rebase/retry this MR, click this checkbox.
This MR has been generated by Renovate Bot.