Checks installed dependencies for known vulnerabilities and licenses.
Project description
Safety checks Python dependencies for known security vulnerabilities and suggests the proper remediations for vulnerabilities detected. Safety can be run on developer machines, in CI/CD pipelines and on production systems.
By default it uses the open Python vulnerability database Safety DB, which is licensed for non-commercial use only.
For all commercial projects, Safely must be upgraded to use a PyUp API using the --key
option.
Supported and Tested Python Versions
Python: 3.6
, 3.7
, 3.8
, 3.9
, 3.10
, 3.11
Safety supports the above versions but only is tested in the latest patch version available at Python for Actions
. For instance, in Python 3.6
we only will test with 3.6.15
, which is the latest Python 3.6 version available on GitHub actions.
Make sure to use the latest patch available for your Python version.
Using Safety as a GitHub Action
Safety can be integrated into your existing GitHub CI pipeline as an action. Just add the following as a step in your workflow YAML file after setting your SAFETY_API_KEY
secret on GitHub under Settings -> Secrets -> Actions:
- uses: pyupio/safety@2.3.5
with:
api-key: ${{ secrets.SAFETY_API_KEY }}
(Don't have an API Key? You can sign up for one with PyUp.)
This will run Safety in auto-detect mode which figures out your project's structure and the best configuration to run in automatically. It'll fail your CI pipeline if any vulnerable packages are found.
If you have something more complicated such as a monorepo; or once you're finished testing, read the Action Documentation for more details on configuring Safety as an action.
Installation
Install safety
with pip. Keep in mind that we support only Python 3.6 and up.
pip install safety
Documentation
For detailed documentation, please see Safety's documentation portal.
Basic Usage
To check your currently selected virtual environment for dependencies with known security vulnerabilities, run:
safety check
You should get a report similar to this:
+=================================================================================+
/$$$$$$ /$$
/$$__ $$ | $$
/$$$$$$$ /$$$$$$ | $$ \__//$$$$$$ /$$$$$$ /$$ /$$
/$$_____/ |____ $$| $$$$ /$$__ $$|_ $$_/ | $$ | $$
| $$$$$$ /$$$$$$$| $$_/ | $$$$$$$$ | $$ | $$ | $$
\____ $$ /$$__ $$| $$ | $$_____/ | $$ /$$| $$ | $$
/$$$$$$$/| $$$$$$$| $$ | $$$$$$$ | $$$$/| $$$$$$$
|_______/ \_______/|__/ \_______/ \___/ \____ $$
/$$ | $$
| $$$$$$/
by pyup.io \______/
+=================================================================================+
REPORT
Safety v2.0.0 is scanning for Vulnerabilities...
Scanning dependencies in your environment:
-> /scanned-path/
Using non-commercial database
Found and scanned 295 packages
Timestamp 2022-06-28 15:42:04
0 vulnerabilities found
0 vulnerabilities ignored
+=================================================================================+
No known security vulnerabilities found.
+=================================================================================+
Now, let's install something insecure:
pip install insecure-package
Yeah, you can really install that.
Run safety check
again:
+=================================================================================+
Safety v2.0.0.dev6 is scanning for Vulnerabilities...
Scanning dependencies in your environment:
-> /scanned-path/
Using non-commercial database
Found and scanned 295 packages
Timestamp 2022-06-28 15:42:04
1 vulnerabilities found
0 vulnerabilities ignored
+=================================================================================+
VULNERABILITIES FOUND
+=================================================================================+
-> Vulnerability found in insecure-package version 0.1.0
Vulnerability ID: 25853
Affected spec: <0.2.0
ADVISORY: This is an insecure package with lots of exploitable
security vulnerabilities.
Fixed versions:
PVE-2021-25853
For more information, please visit
https://pyup.io/vulnerabilities/PVE-2021-25853/25853/
Scan was completed.
+=================================================================================+
Starter documentation
Configuring the target of the scan
Safety can scan requirements.txt files, the local environment as well as direct input piped into Safety.
To scan a requirements file:
safety check -r requirements.txt
To scan the local environment:
safety check
Safety is also able to read from stdin with the --stdin
flag set.
cat requirements.txt | safety check --stdin
or the output of pip freeze
:
pip freeze | safety check --stdin
or to check a single package:
echo "insecure-package==0.1" | safety check --stdin
For more examples, take a look at the options section.
Specifying the output format of the scan
Safety can output the scan results in a variety of formats and outputs. This includes: screen, text, JSON, and bare outputs. Using the --output
flag to configure this output. The default output is to the screen.
--output json
will output JSON for further processing and analysis.
--output text
can be used to save the scan to file to later auditing.
--output bare
simply prints out the packages that have known vulnerabilities
Exit codes
Safety by default emits exit codes based on the result of the code, allowing you to run safety inside of CI/CD processes. If no vulnerabilities were found the exit code will be 0. In cases of a vulnerability being found, non-zero exit codes will be returned.
Scan a Python-based Docker image
To scan a docker image IMAGE_TAG
, you can run
docker run -it --rm ${IMAGE_TAG} /bin/bash -c "pip install safety && safety check"
Using Safety in Docker
Safety can be easily executed as Docker container. It can be used just as described in the examples section.
echo "insecure-package==0.1" | docker run -i --rm pyupio/safety safety check --stdin
cat requirements.txt | docker run -i --rm pyupio/safety safety check --stdin
Using the Safety binaries
The Safety binaries provide some extra security.
After installation, they can be used just like the regular command line version of Safety.
Using Safety with a CI service
Safety works great in your CI pipeline. It returns by default meaningful non-zero exit codes:
CODE NAME | MEANING | VALUE |
---|---|---|
EXIT_CODE_OK | Successful scan | 0 |
EXIT_CODE_FAILURE | An unexpected issue happened, please run the debug mode and write to us | 1 |
EXIT_CODE_VULNERABILITIES_FOUND | Safety found vulnerabilities | 64 |
EXIT_CODE_INVALID_API_KEY | The API KEY used is invalid | 65 |
EXIT_CODE_TOO_MANY_REQUESTS | You are making too many request, please wait around 40 seconds | 66 |
EXIT_CODE_UNABLE_TO_LOAD_LOCAL_VULNERABILITY_DB | The local vulnerability database is malformed | 67 |
EXIT_CODE_UNABLE_TO_FETCH_VULNERABILITY_DB | Client network or server issues trying to fetch the database | 68 |
EXIT_CODE_MALFORMED_DB | The fetched vulnerability database is malformed or in the review command case, the report to review is malformed | 69 |
if you want Safety continues on error (always return zero exit code), you can use --continue-on-error
flag
Run it before or after your tests. If Safety finds something, your tests will fail.
Travis CI
install:
- pip install safety
script:
- safety check
Gitlab CI
safety:
script:
- pip install safety
- safety check
Tox
[tox]
envlist = py37
[testenv]
deps =
safety
pytest
commands =
safety check
pytest
Deep GitHub Integration
If you are looking for a deep integration with your GitHub repositories: Safety is available as a part of pyup.io, called Safety CI. Safety CI checks your commits and pull requests for dependencies with known security vulnerabilities and displays a status on GitHub.
Using Safety in production
Safety is free and open source (MIT Licensed). The data it relies on from the free Safety-db database is license for non-commercial use only, is limited and only updated once per month.
All commercial projects and teams must sign up for a paid plan at PyUp.io
Options
--key
API Key for pyup.io's vulnerability database. This can also be set as SAFETY_API_KEY
environment variable.
Example
safety check --key=12345-ABCDEFGH
--db
Path to a directory with a local vulnerability database including insecure.json
and insecure_full.json
Example
safety check --db=/home/safety-db/data
--proxy-host
Proxy host IP or DNS
--proxy-port
Proxy port number
--proxy-protocol
Proxy protocol (https or http)
--output json
Output a complete report with the vulnerabilities in JSON format. The report may be used too with the review command.
if you are using the PyUp commercial database, Safety will use the same JSON structure but with all the full data for commercial users.
Example
safety check --output json
{
"report_meta": {
"scan_target": "environment",
"scanned": [
"/usr/local/lib/python3.9/site-packages"
],
"api_key": false,
"packages_found": 1,
"timestamp": "2022-03-23 01:41:25",
"safety_version": "2.0.0.dev6"
},
"scanned_packages": {
"insecure-package": {
"name": "insecure-package",
"version": "0.1.0"
}
},
"affected_packages": {
"insecure-package": {
"name": "insecure-package",
"version": "0.1.0",
"found": "/usr/local/lib/python3.9/site-packages",
"insecure_versions": [],
"secure_versions": [],
"latest_version_without_known_vulnerabilities": null,
"latest_version": null,
"more_info_url": "None"
}
},
"announcements": [],
"vulnerabilities": [
{
"name": "insecure-package",
"ignored": false,
"reason": "",
"expires": "",
"vulnerable_spec": "<0.2.0",
"all_vulnerable_specs": [
"<0.2.0"
],
"analyzed_version": "0.1.0",
"advisory": "This is an insecure package with lots of exploitable security vulnerabilities.",
"vulnerability_id": "25853",
"is_transitive": false,
"published_date": null,
"fixed_versions": [],
"closest_versions_without_known_vulnerabilities": [],
"resources": [],
"CVE": {
"name": "PVE-2021-25853",
"cvssv2": null,
"cvssv3": null
},
"affected_versions": [],
"more_info_url": "None"
}
],
"ignored_vulnerabilities": [],
"remediations": {
"insecure-package": {
"vulns_found": 1,
"version": "0.1.0",
"recommended": null,
"other_recommended_versions": [],
"more_info_url": "None"
}
}
}
--full-report
Full reports includes a security advisory. It also shows CVSS values for CVEs (requires a premium PyUp subscription).
Example
safety check --full-report
--output bare
Output vulnerable packages only. Useful in combination with other tools.
Example
safety check --output bare
cryptography django
--stdin
Read input from stdin.
Example
cat requirements.txt | safety check --stdin
pip freeze | safety check --stdin
echo "insecure-package==0.1" | safety check --stdin
--file
, -r
Read input from one (or multiple) requirement files.
Example
safety check -r requirements.txt
safety check --file=requirements.txt
safety check -r req_dev.txt -r req_prod.txt
--ignore
, -i
Ignore one (or multiple) vulnerabilities by ID
Example
safety check -i 1234
safety check --ignore=1234
safety check -i 1234 -i 4567 -i 89101
--output
, -o
Save the report to a file
Example
safety check --output text > insecure_report.txt
safety check --output json > insecure_report.json
Review
If you save the report in JSON format you can review in the report format again.
Options
--file
, -f
(REQUIRED)
Read an insecure report.
Example
safety review -f insecure.json
safety review --file=insecure.json
--full-report
Full reports include a security advisory (if available).
Example
safety review -r insecure.json --full-report
--bare
Output vulnerable packages only.
Example
safety review --file report.json --output bare
django
License
Display packages licenses information (requires a premium PyUp subscription).
Options
--key
(REQUIRED)
API Key for pyup.io's licenses database. Can be set as SAFETY_API_KEY
environment variable.
Example
safety license --key=12345-ABCDEFGH
Shows the license of each package in the current environment
--output json
(Optional)
This license command can also be used in conjunction with optional arguments --output bare
and --output json
for structured, parsable outputs that can be fed into other tools and pipelines.
--db
Path to a directory with a local licenses database licenses.json
Example
safety license --key=12345-ABCDEFGH --db /home/safety-db/data
--file
, -r
Read input from one (or multiple) requirement files.
Example
safety license --key=12345-ABCDEFGH -r requirements.txt
safety license --key=12345-ABCDEFGH --file=requirements.txt
safety license --key=12345-ABCDEFGH -r req_dev.txt -r req_prod.txt
--proxy-host
, -ph
Proxy host IP or DNS
--proxy-port
, -pp
Proxy port number
--proxy-protocol
, -pr
Proxy protocol (https or http)
Example
safety license --key=12345-ABCDEFGH -ph 127.0.0.1 -pp 8080 -pr https
Python 2.7
This tool requires latest Python patch versions starting with version 3.6. We did support Python 2.7 in the past but, as for other Python 3.x minor versions, it reached its End-Of-Life and as such we are not able to support it anymore.
We understand you might still have Python < 3.6 projects running. At the same time, Safety itself has a commitment to encourage developers to keep their software up-to-date, and it would not make sense for us to work with officially unsupported Python versions, or even those that reached their end of life.
If you still need to run Safety from a Python 2.7 environment, please use version 1.8.7 available at PyPi. Alternatively, you can run Safety from a Python 3 environment to check the requirements file for your Python 2.7 project.
Changelog
All notable changes to this project will be documented in this file.
The format is partly based on Keep a Changelog, and this project adheres to Semantic Versioning and PEP 440
[2.3.5] - 2022-12-08
- Pinned packaging dependency to a compatible range.
- Pinned the CI actions to the runner image with Python 3.6 support.
[2.3.4] - 2022-12-07
- Removed LegacyVersion use; this fixes the issue with packaging 22.0.
- Fixed typos in the README.
- Added Python 3.11 to the classifiers in the setup.cfg.
[2.3.3] - 2022-11-27
- Fixed recursive requirements issue when an unpinned package is found.
[2.3.2] - 2022-11-21
- Fixed #423: Bare output includes extra line in non-screen output with no vulnerabilities.
- Fixed #422: ResourceWarning (unclosed socket) in safety v.2.3.1.
- Fixed telemetry data missing when the CLI mode is used.
- Fixed wrong database fetching when the KEY and the database arguments are used at the same time.
- Added
SAFETY_PURE_YAML
env var, used for cases that require pure Python in the YAML parser.
[2.3.1] - 2022-10-05
- Add
safety.alerts
module to setup.cfg
[2.3.0] - 2022-10-05
- Safety can now create GitHub PRs and Issues for vulnerabilities directly, with the new
safety alert
subcommand. - Support for GitHub PR and Issue alerting has been added to the GitHub Action.
[2.2.1] - 2022-10-04
- Fixed the use of the SAFETY_COLOR environment variable
- Fixed bug in the case of vulnerabilities without a CVE linked
- Fixed GitHub version in the README
[2.2.0] - 2022-09-19
- Safety starts to use dparse to parse files, now Safety supports mainly Poetry and Pipenv lock files plus other files supported by dparse.
- Added logic for custom integrations like pipenv check.
- The --db flag is compatible remote sources too.
- Added more logging
- Upgrade dparse dependency to avoid a possible ReDos security issue
- Removed Travis and Appveyor, the CI/CD was migrated to GitHub Actions
[2.1.1] - 2022-07-18
- Fix crash when running on systems without git present (Thanks @andyjones)
[2.1.0] - 2022-07-14
Summary:
- Improved error messages & fixed issues with proxies
- Fixed license command
- Added the ability for scan outputs to be sent to pyup.io. This will only take effect if using an API key, the feature is enabled on your profile, and the
--disable-audit-and-monitor
is not set - Added the ability to have a Safety policy file set centrally on your pyup.io profile. This remote policy file will be used if there's no local policy file present, otherwise a warning will be issued.
Updated outputs:
- Text & screen output: If a scan has been logged, this is now mentioned in the output.
- JSON output: The JSON output now includes git metadata about the folder Safety was run in. It also includes a version field, and telemetry information that would be sent separately. There are no breaking changes in the output.
New inputs:
- New command line flags
- The
--disable-audit-and-monitor
flag can be set to disable sending a scan's result to pyup.io - The
--project
flag can be set to manually specify a project to associate these scans with. By default, it'll autodetect based on the current folder and git.
- The
[2.0.0] - 2022-06-28
Summary:
- Compared to previous versions, Safety 2.0 will be a significant update that includes new features and refactors, resulting in breaking changes to some inputs and outputs.
Updated outputs:
- Text & screen output: Upgraded the text and screen outputs, removing the old table style and adding new data and formats to vulnerabilities.
- JSON output: New and updated JSON output (breaking change). Safety adds all the possible information in the JSON report. The structure of this JSON file has been improved.
- Improved the support for exit codes. There are now custom exit codes with detailed information about the result. Examples include: VULNERABILITIES_FOUND and INVALID_API_KEY.
- Added remediations (fix recommendations) sections to outputs. Now, Safety will suggest the steps to fix a detected vulnerability when an API key is used.
- Added new summary meta-data data to the reports showing the Safety version used, the dependencies found, the timestamp, the target scanned, and more. These data are included in the text, screen, and JSON output for improved audit capabilities.
- Added more info per vulnerability, including URLs to read more about a vulnerability and/or a package.
###New command line flags:
- New command line flags
- The
--output
flag replaces--bare
,--text
,--screen
, and--json
flags. In this new release, examples would be:--output json
or--output bare
. - The
--continue-on-error
flag suppresses non-zero exit codes to force pass CI/CD checks, if required. - The
--debug
flag allows for a more detailed output. - The
--disable-telemetry
flag has been added to disable telemetry data - The
--policy-file
flag to include a local security policy file. This file (called.safety-policy.yml
, found in either the root directory where Safety is being run or in a custom location) is based on YAML 1.2 and allows for:- Ignoring individual vulnerabilities with optionally a note and an expiry date.
- Filtering vulnerabilities by their CVSS severity. (CVSS data is only available for some paid accounts.)
- The
Other
- Dropped support for Python < 3.6
- The free version of the Safety vulnerability database is downloaded from a public S3 bucket (via PyUp.io) and no longer from GitHub. This free database is only updated once a month and is not licensed for commercial use.
- Telemetry data will be sent with every Safety call. These data are anonymous and not sensitive. This includes the Python version, the Safety command used (
check
/license
/review
), and the Safety options used (without their values). Users can disable this functionality by adding the--disable-telemetry
flag. - Added validations to avoid the use of exclusive options.
- Added announcements feature to receive informative or critical messages from the PyUp Safety team.
- Increased test coverage.
- Now Safety can be used as a dependency in your code
- Added Safety as a Github Action
- Improved the help text in the CLI
- Added the --save-json flag
[2.0b5] - 2022-06-24
Summary:
- Removed the click context use, so Safety can be used in non-CLI cases
- Added Safety as a Github Action
- Improved the CLI help copy
- Increased the coverage
[2.0b4] - 2022-06-16
Summary:
- Fixed issue with paddings and margins at specific console outputs like Github actions console
- Added the --save-json flag and other aliases
- Added a fallback size for the terminal size function, related to https://bugs.python.org/issue42174
- Suppressed the announcements sent to stderr when it is running via 'run' environments
[2.0b3] - 2022-05-30
Summary:
- Fixed issue in the Screen and Text report due to the remediations rendering for the users using an API Key
- Improved the handling exception in the generate command
[2.0b2] - 2022-05-27
Summary:
- This version of Safety is not stable; it is only a beta, pre-release version.
- Compared to previous versions, Safety 2.0 will be a significant update that includes new features and refactors, resulting in breaking changes to some inputs and outputs.
- Improved grammar and formatting in the whole code
- Improved the exception handling in the .yml policy file parsing
- Improved the JSON output following the customers/users feedback - (This is a breaking change between beta releases)
- Added the generate command
- Added the validate command
[2.0b1] - 2022-05-08
Summary:
- This version of Safety is not stable; it is only a beta, pre-release version.
- Compared to previous versions, Safety 2.0 will be a significant update that includes new features and refactors, resulting in breaking changes to some inputs and outputs.
Updated outputs:
- Text & screen output: Upgraded the text and screen outputs, removing the old table style and adding new data and formats to vulnerabilities.
- JSON output: New and updated JSON output (breaking change). Safety adds all the possible information in the JSON report. The structure of this JSON file has been improved.
- Improved the support for exit codes. There are now custom exit codes with detailed information about the result. Examples include: VULNERABILITIES_FOUND and INVALID_API_KEY.
- Added remediations (fix recommendations) sections to outputs. Now, Safety will suggest the steps to fix a detected vulnerability when an API key is used.
- Added new summary meta-data data to the reports showing the Safety version used, the dependencies found, the timestamp, the target scanned, and more. These data are included in the text, screen, and JSON output for improved audit capabilities.
- Added more info per vulnerability, including URLs to read more about a vulnerability and/or a package.
New inputs:
- New command line flags
- The
--output
flag replaces--bare
,--text
,--screen
, and--json
flags. In this new release, examples would be:--output json
or--output bare
. - The
--continue-on-error
flag suppresses non-zero exit codes to force pass CI/CD checks, if required. - The
--debug
flag allows for a more detailed output. - The
--disable-telemetry
flag has been added to disable telemetry data - The
--policy-file
flag to include a local security policy file. This file (called.safety-policy.yml
, found in either the root directory where Safety is being run or in a custom location) is based on YAML 1.2 and allows for:- Ignoring individual vulnerabilities with optionally a note and an expiry date.
- Filtering vulnerabilities by their CVSS severity. (CVSS data is only available for some paid accounts.)
- The
Other
- Dropped support for Python < 3.6
- The free version of the Safety vulnerability database is downloaded from a public S3 bucket (via PyUp.io) and no longer from GitHub. This free database is only updated once a month.
- Telemetry data will be sent with every Safety call. These data are anonymous and not sensitive. This includes the Python version, the Safety command used (
check
/license
/review
), and the Safety options used (without their values). Users can disable this functionality by adding the--disable-telemetry
flag. - Added validations to avoid the use of exclusive options.
- Added announcements feature to receive informative or critical messages from the PyUp Safety team.
- Increased test coverage.
[1.10.3] - 2021-01-15
- Avoid 1.10.2post1 bug with pyup updates
[1.10.2] - 2021-01-12
- Provide CVSS values on full report for CVEs (requires a premium PyUp subscription)
- Fixed used DB wrong info
- Support line breaks on advisories
[1.10.1] - 2021-01-03
- Reduced Docker image and Binary size
- Added bare and json outputs to license command
[1.10.0] - 2020-12-20
- Added README information about Python 2.7 workaround
- Adjusted some pricing information
- Fixed MacOS binary build through AppVeyor
- Added the ability to check packages licenses (requires a premium PyUp subscription)
[1.9.0] - 2020-04-27
- Dropped Python 2.7 support, requiring Python 3.5+
- Binary adjustments and enhancements on top of reported vulnerability
- Using tox to help with local tests against different Python versions
[1.8.7] - 2020-03-10
- Fixed a hidden import caused the binary to produce errors on Linux.
[1.8.6] - 2020-03-10
- Safety is now available as a binary release for macOS, Windows and Linux.
[1.8.5] - 2019-02-04
- Wrap words in full report (Thanks @mgedmin)
- Added Dockerfile and readme instructions (Thanks @ayeks)
- Remove API dependency on pip (Thanks @benjaminp)
[1.8.4] - 2018-08-03
- Update cryptography dependency from version 1.9 to version 2.3 due to security vulnerability
[1.8.3b] - 2018-07-24
- Allows both unicode and non-unicode type encoding when parsing requriment files
[1.8.2] - 2018-07-10
- Fixed unicode error
[1.8.1] - 2018-04-06
- Fixed a packaging error with the dparse dependency
[1.8.0] - 2018-04-05
- Safety now support pip 10
[1.7.0] - 2018-02-03
- Safety now shows a filename if it finds an unpinned requirement. Thanks @nnadeau
- Removed official support for Python 2.6 and Python 3.3. Thanks @nnadeau
[1.6.1] - 2017-10-20
- Fixed an error that caused the CLI to fail on requirement files/stdin.
[1.6.0] - 2017-10-20
- Added an indicator which DB is currently used
- Added a package count how many packages have been checked
- Allow multiple version of the same library. Thanks @thatarchguy
[1.5.1] - 2017-07-20
- Fixed an error on unpinned VCS requirements. This is a regression, see https://github.com/pyupio/safety/issues/72
[1.5.0] - 2017-07-19
- Internal refactoring. Removed dependency on setuptools and switched to the new dparse library.
[1.4.1] - 2017-07-04
- Fixed a bug where absence of
stty
was causing a traceback insafety check
on Python 2.7 for Windows.
[1.4.0] - 2017-04-21
- Added the ability to ignore one (or multiple) vulnerabilities by ID via the
--ignore
/-i
flag.
[1.3.0] - 2017-04-21
- Added
--bare
output format. - Added a couple of help text to the command line interface.
- Fixed a bug that caused requirement files with unpinned dependencies to fail when using a recent setuptools release.
[1.2.0] - 2017-04-06
- Added JSON as an output format. Use it with the
--json
flag. Thanks @Stype.
[1.1.1] - 2017-03-27
- Fixed terminal size detection when fed via stdin.
[1.1.0] - 2017-03-23
- Compatibility release. Safety should now run on macOs, Linux and Windows with Python 2.7, 3.3-3.6. Python 2.6 support is available on a best-effort basis on Linux.
[1.0.2] - 2017-03-23
- Fixed another error on Python 2. The fallback function for get_terminal_size wasn't working correctly.
[1.0.1] - 2017-03-23
- Fixed an error on Python 2, FileNotFoundError was introduced in Python 3.
[1.0.0] - 2017-03-22
- Added terminal size detection. Terminals with fewer than 80 columns should now display nicer reports.
- Added an option to load the database from the filesystem or a mirror that's reachable via http(s). This can be done by using the --db flag.
- Added an API Key option that uses pyup.io's vulnerability database.
- Added an option to cache the database locally for 2 hours. The default still is to not use the cache. Use the --cache flag.
[0.6.0] - 2017-03-10
- Made the requirements parser more robust. The parser should no longer fail on editable requirements and requirements that are supplied by package URL.
- Running safety requires setuptools >= 16
[0.5.1] - 2016-11-08
- Fixed a bug where not all requirement files were read correctly.
[0.5.0] - 2016-11-08
- Added option to read requirements from files.
[0.4.0] - 2016-11-07
- Filter out non-requirements when reading from stdin.
[0.3.0] - 2016-10-28
- Added option to read from stdin.
[0.2.2] - 2016-10-21
- Fix import errors on python 2.6 and 2.7.
[0.2.1] - 2016-10-21
- Fix packaging bug.
[0.2.0] - 2016-10-20
- Releasing first prototype.
[0.1.0] - 2016-10-19
- First release on PyPI.
MIT License
Copyright (c) 2016, pyup.io
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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
Built Distribution
File details
Details for the file safety-2.3.5.tar.gz
.
File metadata
- Download URL: safety-2.3.5.tar.gz
- Upload date:
- Size: 93.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a60c11f8952f412cbb165d70cb1f673a3b43a2ba9a93ce11f97e6a4de834aa3a |
|
MD5 | 6c6fb56b2c126810f6afba43bc3411e2 |
|
BLAKE2b-256 | 36c3a1eeffef985f0ae71e133312fd474b616e55acb55acaf597a314c4fcf88e |
File details
Details for the file safety-2.3.5-py3-none-any.whl
.
File metadata
- Download URL: safety-2.3.5-py3-none-any.whl
- Upload date:
- Size: 57.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2227fcac1b22b53c1615af78872b48348661691450aa25d6704a5504dbd1f7e2 |
|
MD5 | d11f7485f4e4855591efff45e4432802 |
|
BLAKE2b-256 | 51e6b11774ee5c3a220960c07d04fc4298987fad1dcdafcfdf3997f5234262a0 |