Links

Installation and Authentication

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

Login Methods

When 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 create your account.
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
1. "safety auth" launches the default browser.
2. Browser-based Authentication
"safety auth" triggering browser authentication and successful login

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 [email protected].