unstale

pypi / safety

safety

What changed in safety 2 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-13.

15 breaking1 security14 new APIs and options7 behavior and defaults2 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.0 on npm

safety 316 changes

Breaking changes 7

  • The old policy file's alert section is no longer supported and must be removed.

    3.0.0upgrade guide

  • Combines the previous severity-ignore settings into a YAML list with critical, high, medium, low, and unknown options.

    3.0.0upgrade guide

  • Use this property to carry over the vulnerability ignores previously configured with security:ignore-vulnerabilities.

    3.0.0upgrade guide

  • For upgrades from safety<=2.3.5 to safety>=3.x, the JSON output structure differs; Safety 3.0 matches Safety CLI 2.4.0b.

    3.0.0upgrade guide

  • Safety scan and system-scan use a new policy format that is incompatible with the format used by safety check.

    3.0.0upgrade guide

  • Removes this property; use fail-scan-with-exit-code:dependency-vulnerabilities:enabled to suppress exit codes instead.

    3.0.0upgrade guide

  • Validates a 3.0 policy file by default.

    3.0.0upgrade guide

New APIs and options 6

  • Set this property to False to suppress exit codes in the new policy file.

    3.0.0upgrade guide

  • Generates a policy file in the updated format for Safety CLI 3.

    3.0.0upgrade guide

  • Introduces the main security scanning command, replacing safety check as the recommended command.

    3.0.0upgrade guide

  • Recursively searches the target directory and automatically finds Python dependency manifest files and virtual environments.

    3.0.0upgrade guide

  • Natively supports requirements.txt, poetry.lock, Pipfile.lock, and Python virtual environment directories.

    3.0.0upgrade guide

  • Excludes specific files, file types, or folders from a scan.

    3.0.0upgrade guide

Behavior and default changes 1

  • Finds requirements files automatically, so the -r flag used with safety check is no longer needed.

    3.0.0upgrade guide

Fixes and other changes 2

  • Policy files now support SFTY-format vulnerability IDs.

    3.8.1release notes

  • Fixed rendering package details for npm ecosystem checks.

    3.7.0release notes

safety 223 changes

Breaking changes 8

  • This output-selection flag is replaced by --output.

    2.0.0release notes

  • Safety now validates options to avoid using mutually exclusive options together.

    2.0.0release notes

  • This output-selection flag is replaced by --output.

    2.0.0release notes

  • The JSON report structure has changed and now includes all possible information, which may require updates to consumers of the output.

    2.0.0release notes

  • Select output format with values such as json or bare; this flag replaces --bare, --text, --screen, and --json.

    2.0.0release notes

  • Python versions below 3.6 are no longer supported.

    2.0.0release notes

  • This output-selection flag is replaced by --output.

    2.0.0release notes

  • This output-selection flag is replaced by --output.

    2.0.0release notes

Security 1

  • Safety is available as a GitHub Action for configuring dependency security and compliance scans on commits, branches, pull requests, and more.

    2.0.0release notes

New APIs and options 8

  • Safety can receive informative or critical messages from the PyUp Safety team.

    2.0.0release notes

  • Suppress non-zero exit codes to force CI/CD checks to pass when required.

    2.0.0release notes

  • Enable more detailed output.

    2.0.0release notes

  • Disable telemetry data sent with Safety calls.

    2.0.0release notes

  • Specify a local security policy file for ignoring vulnerabilities or filtering them by CVSS severity.

    2.0.0release notes

  • Safety can now be used as a dependency in your code.

    2.0.0release notes

  • A YAML 1.2 local security policy file can ignore individual vulnerabilities with an optional note and expiry date, and filter vulnerabilities by CVSS severity.

    2.0.0release notes

  • A new CLI flag is available to save JSON output.

    2.0.0release notes

Behavior and default changes 6

  • Exit codes now provide detailed result information, including codes such as VULNERABILITIES_FOUND and INVALID_API_KEY.

    2.0.0release notes

  • The free database is now downloaded from a public S3 bucket via PyUp.io rather than GitHub; it is updated monthly and is not licensed for commercial use.

    2.0.0release notes

  • Outputs now include fix recommendations for detected vulnerabilities when an API key is used.

    2.0.0release notes

  • Text, screen, and JSON reports now include audit metadata such as the Safety version, dependencies found, timestamp, and target scanned.

    2.0.0release notes

  • Safety sends anonymous, non-sensitive telemetry with each call, including the Python version, command used, and options used without their values.

    2.0.0release notes

  • Vulnerability output includes additional information, including URLs about vulnerabilities and packages.

    2.0.0release notes