Skip to main content

Override Poetry's update command to audit packages before they are updated

Project description

Customs Inspector

Customs Inspector is a Python tool that hooks into Poetry's package management system to allow for manual auditing of package changes during updates. When you run poetry update, Customs Inspector will open a browser with a GitHub diff like view, requesting you to confirm or reject the update before proceeding.

Demo

YouTube

Note:

TESTED ONLY ON Poetry v1.4.x
This is a proof of concept. Poetry explicitly says to not use the plugin system to modify existing commands. If this is something that is considered valuable, I would love to discuss this with Poetry's authors to potentially integrate it.

Why?

Developers are lazy, we'd rather not audit source code...
Well, we cannot afford that anymore. I am also not interested in the snake oil automated analysis companies are selling (for now).

What if auditing was really easy to do so?
What if, we could harness the community's collective effort to find malicious packages?

Usage

# install the plugin
poetry self add customs-inspector
# run update like you normally would
poetry update

See: how to install plugins

Upcoming:

  • Increase speed
  • Add language server support to make auditing even easier
  • Add file filtering, to hide test folders, for example
  • Add rules for quick auditing, for example when new sensitive APIs are used (socket, os, sys)

Contributions

Feedback, contributions and suggestions welcome.

License

GPL-3.0

Project details


Download files

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

Source Distribution

customs_inspector-0.2.2.tar.gz (3.4 MB view hashes)

Uploaded Source

Built Distribution

customs_inspector-0.2.2-py3-none-any.whl (3.4 MB view hashes)

Uploaded Python 3

Supported by

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