Safety 2 (formerly PyUp)
  • Welcome to Safety 2
  • 2023 Rebrand from PyUp to Safety Cybersecurity
  • Safety 2.x Basics
    • Getting started with Safety 2.x
    • Running a Safety Scan
    • License Scanning
  • Safety CLI 2 Scanner
    • Installation & Quick Start - Safety 2
    • Docker Containers
    • Inputs
    • Output Formats
    • Policy File
    • Applying Security Updates to Requirements Files
    • Exit Codes
    • Help and Support
    • Safety v1 to v2 Breaking Changes
  • Securing Git SCM Pipelines
    • Securing Git Repositories
    • GitHub Actions
      • Advanced Options: GitHub Actions
    • BitBucket Pipelines
    • Gitlab Pipelines
    • GitHub Integration
    • Scanning Development Environments with Git Post-Commit Hook
  • Troubleshooting
    • Invalid API Key Error
Powered by GitBook
On this page
  • New screen/text output
  • New and improved JSON structure
  • Improved exit codes
  • Safety policy file
  1. Safety CLI 2 Scanner

Safety v1 to v2 Breaking Changes

PreviousHelp and SupportNextSecuring Git Repositories

Last updated 1 year ago

Safety v2 is a major improvement in features and we recommend you upgrade as soon as possible.

Below is a list of the difference between Safety 1.x and Safety v2 including breaking changes you want to be aware of.

New screen/text output

Safety v2's new screen and text output is much more comprehensive than Safety 1.x. It removes the old table format and makes room for more information including report meta-information, packages found, vulnerabilities found as well as remediation (fix) recommendations for each package found with vulnerabilities.

New and improved JSON structure

Safety 2's JSON output is new and different from Safety 1.x. We overhauled the structure for improved clarity and to allow for the inclusion of a lot more data. Please refer to to read more about this new JSON structure.

Improved exit codes

Safety 2 now natively supports exit codes. It will return a zero (success) exit code for scans that find no vulnerabilities, and non-zero exit codes for scans that find vulnerabilities or have other issues.

Safety policy file

Safety 2 introduces local security policy files so that your team can configure and share a security policy for each Python project you are scanning using Safety. Please refer to for detailed documentation and usage examples.

Safety 2.0: Outputs
Safety 2.0: Policy file