Safety v3.5.1 is now available. Upgrade using "pip install -U safety"
Safety Firewall
LogoLogo
Safety PlatformResearchSign Up
  • Introduction to Safety
  • Safety Firewall
    • Introduction to Safety Firewall
    • Installation and Configuration
      • Uninstalling Firewall
    • Using Firewall
      • Working with Codebases
      • Firewall Monitoring and Management
      • Firewall Policy Management
      • Troubleshooting
  • SAFETY CLI
    • Introduction to Safety CLI Vulnerability Scanning
      • Quick Start Guide
      • Migrating from Safety CLI 2.x to Safety CLI 3.x
    • Installation and Authentication
    • Scanning for Vulnerable and Malicious Packages
      • Viewing Scan Results
      • Available Commands and Inputs
      • Scanning in CI/CD
      • Securing Development Environments
      • License Scanning
      • Exit Codes
      • Scanning in Production
    • Safety Telemetry
  • Vulnerability Remediation
    • Applying Fixes
  • Integration
    • Securing Git Repositories
      • GitHub
        • GitHub Actions
      • GitLab
      • BitBucket
      • Azure DevOps
      • Git Post-Commit Hooks
    • Pipenv
    • Docker Containers
  • Administration
    • Safety Policy Files
    • Project Policies
  • Output
    • Output Options and Recommendations
    • JSON Output
    • SBOM Output
    • HTML Output
    • Detecting Vulnerabilities and Sharing Results via Email
  • Support
    • Support
    • Invalid API Key Error
    • Headless Authentication
    • Implementation Support
    • Global proxy and identity configuration
    • Using Safety in Conda Environments
  • Miscellaneous
    • Understanding Vulnerability Scoring Systems: CVSS and EPSS
    • Release Notes
      • Breaking Changes in Safety 3
    • Research and Blog
    • Changelogs
    • Trust Center
    • Terms of Service
    • Safety 2.x Documentation
Powered by GitBook
LogoLogo

Safety Platform

  • Sign Up
  • Login

Research

  • Security Research & Blog

Resources

  • GitHub Action
  • GitHub

© Safety CLI Cybersecurity Inc.

On this page
  • Installation
  • Login Methods
  • Free & Team Customers
  • Enterprise Customers

Was this helpful?

  1. SAFETY CLI

Installation and Authentication

PreviousMigrating from Safety CLI 2.x to Safety CLI 3.xNextScanning for Vulnerable and Malicious Packages

Last updated 21 days ago

Was this helpful?

Installation

To scan and secure Python projects, you first need Safety CLI version 3 to be installed on your machine.

To check whether Safety CLI 3.x is already installed, open your terminal and type:

safety --version

If the safety command is not found, or your safety version is less than 3.0, you need to install Safety version 3 using the following command before continuing:

pip install safety

If you already have Safety installed, please use pip install -U safety

Login Methods

When the installation of Safety version 3 has been confirmed, launch your terminal and authenticate using one of the methods outlined below.

Free & Team Customers

Customers on our Free and Team plans will log in using an email and password defined when you .

In your terminal, type:

safety auth login

Your default browser will open and you will be asked to authenticate using your Safety username and password. Login via Google is currently supported, and support for additional SSO providers will be added soon.

Once logged in, return to your terminal to verify Safety is authenticated with your account details by typing:

safety auth

Enterprise Customers

Enterprise customers can leverage the method described above or SAML-based authentication, allowing users to be authenticated using organization-specific identities. The latter preserves approved authentication flows and prevents access to anyone not registered in your internal identity platform.

As above, when installation has been confirmed, in your terminal, type:

safety auth login

This will open your browser to authenticate the Safety CLI tool using your work email address and password. If your organization uses SAML authentication, you will be redirected to your corporate login page.

Once logged in, return to your terminal to verify Safety is authenticated with your account details by typing:

safety auth

If you are unclear as to which method your organization uses, please contact your administrator or email us at .

create your account
support@safetycli.com
1. "safety auth" launches the default browser.
2. Browser-based Authentication
"safety auth" triggering browser authentication and successful login