Skip to main content

Scan dependencies for known vulnerabilities and licenses.

Project description

safety

Downloads Build Status License PyPI Version Python Versions Coverage

[!NOTE] Come and join us at SafetyCLI. We are hiring for various roles.

Table of Contents

Introduction

Safety CLI is a Python dependency vulnerability scanner designed to enhance software supply chain security by detecting packages with known vulnerabilities and malicious packages in local development environments, CI/CD, and production systems. Safety CLI can be deployed in minutes and provides clear, actionable recommendations for remediation of detected vulnerabilities.

Leveraging the industry's most comprehensive database of vulnerabilities and malicious packages, Safety CLI Scanner allows teams to detect vulnerabilities at every stage of the software development lifecycle.

Key Features

  • Versatile, comprehensive dependency security scanning for Python packages.
  • Leverages Safety DB, the most comprehensive vulnerability data available for Python.
  • Clear output with detailed recommendations for vulnerability remediation.
  • Automatically updates requirements files to secure versions of dependencies where available, guided by your project's policy settings.
  • Scanning of individual requirements files and project directories or system-wide scans on developer machines, CI/CD pipelines, and Production systems to detect vulnerable or malicious dependencies.
  • JSON, SBOM, HTML and text output.
  • Easy integration with CI/CD pipelines, including GitHub Actions.
  • Enterprise Ready: Safety CLI can be deployed to large teams with complex project setups with ease, on-premise or as a SaaS product.

Getting Started

GitHub Action

Command Line Interface

1. Installation

  • Install Safety on your development machine.
  • Run pip install safety.

2. Log In or Register

  • Run your first scan using safety scan.
  • If not authenticated, Safety will prompt for account creation or login.
  • Use safety auth to check authentication status.

3. Running Your First Scan

  • Navigate to a project directory and run safety scan.
  • Safety will perform a scan and present results in the Terminal.

Basic Commands

  • safety --help: Access help and display all available commands.
  • safety auth: Start authentication flow or display status.
  • safety scan: Perform a vulnerability scan in the current directory.
  • safety system-scan: Perform a scan across the entire development machine.
  • safety scan --apply-fixes: Update vulnerable dependencies.

Service-Level Agreement (SLA)

We are committed to maintaining a high level of responsiveness and transparency in managing issues reported in our codebases. This SLA outlines our policies and procedures for handling issues to ensure timely resolutions and effective communication with our community.

Detailed Documentation

Full documentation is available at https://docs.safetycli.com.

Included in the documentation are the following key topics:

Safety CLI 3

Vulnerability Remediation

Integration

Administration

Output

Miscellaneous

System status is available at https://status.safetycli.com

Further support is available by emailing support@safetycli.com.

License

Safety is released under the MIT License.

Upon creating an account, a 7-day free trial of our Team plan is offered to new users, after which they will be downgraded to our Free plan. This plan is limited to a single user and is not recommended for commercial purposes.

Our paid plans for commercial use begin at just $25 per seat per month and allow scans to be performed using our full vulnerability database, complete with 3x more tracked vulnerabilities and malicious packages than our free plan and other providers. To learn more about our Team and Enterprise plans, please visit https://safetycli.com/resources/plans or email sales@safetycli.com.

Supported Python Versions

Safety CLI 3 supports Python versions >=3.7. Further details on supported versions, as well as options to run Safety CLI on versions <3.7 using a Docker image are available in our Documentation Hub.

We maintain a policy of supporting all maintained and secure versions of Python, plus one minor version below the oldest maintained and secure version. Details on Python versions that meet these criteria can be found here: https://endoflife.date/python.

Resources

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safety-3.3.0.tar.gz (221.8 kB view details)

Uploaded Source

Built Distribution

safety-3.3.0-py3-none-any.whl (206.7 kB view details)

Uploaded Python 3

File details

Details for the file safety-3.3.0.tar.gz.

File metadata

  • Download URL: safety-3.3.0.tar.gz
  • Upload date:
  • Size: 221.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for safety-3.3.0.tar.gz
Algorithm Hash digest
SHA256 67f9f823120e42ff3f0f5fdba00d0547fb9c655bc77c179084b75bf961abcfae
MD5 0adfb312616bb97f275208584077e1a5
BLAKE2b-256 53d9b4f443bce33e451e3fbb3ca14de11d4c87d5675a56bbcac9934fac75f4f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for safety-3.3.0.tar.gz:

Publisher: cd.yml on pyupio/safety

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file safety-3.3.0-py3-none-any.whl.

File metadata

  • Download URL: safety-3.3.0-py3-none-any.whl
  • Upload date:
  • Size: 206.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for safety-3.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e025b08a6d556029e0a90df47b74bfef0089bac5f02d9d30f0f8c25227c21ee
MD5 e12da6730ac1deec2639115f6e3ae4c8
BLAKE2b-256 9131e3c43b33ddcc37ff1803f87d421e5831061b4f0381754c4e87b82cac6bac

See more details on using hashes here.

Provenance

The following attestation bundles were made for safety-3.3.0-py3-none-any.whl:

Publisher: cd.yml on pyupio/safety

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page