Skip to main content

Poetry plugin for checking security vulnerabilities in dependencies

Project description

Poetry Audit Plugin

Poetry plugin for checking security vulnerabilities in dependencies based on safety.

$ poetry audit
Scanning 19 packages...

  • ansible-runner     installed 1.1.2  affected <1.3.1   CVE PVE-2021-36995
  • ansible-tower-cli  installed 3.1.8  affected <3.2.0   CVE CVE-2020-1733 
  • jinja2             installed 2.0    affected <2.11.3  CVE CVE-2020-28493

3 vulnerabilities found

Installation

The easiest way to install the export plugin is via the plugin add command of Poetry.

poetry plugin add poetry-audit-plugin

If you used pipx to install Poetry you can add the plugin via the pipx inject command.

pipx inject poetry poetry-audit-plugin

Otherwise, if you used pip to install Poetry you can add the plugin packages via the pip install command.

pip install poetry-audit-plugin

Available options

  • --json: Export the result in JSON format.

  • --ignore-code: Ignore some vulnerabilities IDs. Receive a list of IDs. For example:

poetry audit --ignore-code=CVE-2022-42969,CVE-2020-10684
  • --ignore-package: Ignore some packages. Receive a list of packages. For example:
poetry audit --json --ignore-package=py,ansible-tower-cli

Exit codes

poetry audit will exit with a code indicating its status.

  • 0: Vulnerabilities were not found.
  • 1: One or more vulnerabilities were found.

Develop poetry-audit-plugin

You can read this document to setup an environment to develop poetry-audit-plugin.

First step is to install Poetry. Please read official document and install Poetry in your machine.

Then, you can install dependencies of poetry-audit-plugin with the following command.

poetry install

Once you've done it, you can start developing poetry-audit-plugin. You can use test assets for the testing.

cd tests/assets/no_vulnerabilities
poetry audit

Please lint, format, and test your changes before creating pull request to keep the quality.

./scripts/lint.sh
./scripts/format.sh
./scripts/test.sh

Contribution

Help is always appreciated. Please feel free to create issue and pull request!

License

This project is licensed under the terms of the MIT license.

Download files

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

Source Distribution

poetry_audit_plugin-0.3.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poetry_audit_plugin-0.3.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file poetry_audit_plugin-0.3.0.tar.gz.

File metadata

  • Download URL: poetry_audit_plugin-0.3.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.7.15 Linux/5.15.0-1023-azure

File hashes

Hashes for poetry_audit_plugin-0.3.0.tar.gz
Algorithm Hash digest
SHA256 461e7202aea59c45e873eb6b5c91748f97341fab4b26ad17565d7dbe3eff93ca
MD5 9ab00151763f7f6524543a1aeb919e22
BLAKE2b-256 ff2f70854613e9406944a7000b338859e934e2a12eb164c9e73b5cc094daa851

See more details on using hashes here.

File details

Details for the file poetry_audit_plugin-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: poetry_audit_plugin-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.7.15 Linux/5.15.0-1023-azure

File hashes

Hashes for poetry_audit_plugin-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a402292492e5d5ea2bf91390ed482f5d8882021e4a1d31999b0985367af2d15
MD5 a118de302fcadec903a8087b8f01b3c2
BLAKE2b-256 b6b83eb40a4251116918a931fb8c3ffd51c4e500578f93b58bee28af62f064e0

See more details on using hashes here.

Supported by

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