CLI tool to check package permissions.
Project description
pytrust
pytrust is a CLI tool to analyze Python packages for their use of file system, environment variables, web requests, and exec calls. It helps you audit dependencies and generate permission reports in YAML format.
Installation
pip install pytrust
Usage
Analyze a single package and print its permissions as YAML
$ pytrust pypdf
pypdf:
file_system: true
env_vars: false
web_requests: false
exec_usage: false
Check a package against a permissions file
$ pytrust pypdf package-permissions.yaml
Permission violations found:
- file_system: REQUIRED but NOT GIVEN
Analyze all installed (non-default) packages and print combined YAML
$ pytrust
pypdf:
file_system: true
env_vars: false
web_requests: false
exec_usage: false
... (the list might be pretty long!)
Permissions YAML Example
In this file you specify which packages are allowed to access certain resources. For example:
pypdf:
file_system: true # needed to read/write PDF files
env_vars: false
web_requests: false
exec_usage: false
Contributing & Help
- Issues and PRs welcome!
Made with ❤️ by Martin Thoma and contributors.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytrust-0.2.0.tar.gz.
File metadata
- Download URL: pytrust-0.2.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1b4b52e2aca12d8838f2ee68c96bd87d68b4907f7fc0df46833e12c95873f5d
|
|
| MD5 |
9f78a00bfd60a911394276084652295d
|
|
| BLAKE2b-256 |
a58c4b30969fe2cf7af46b3276696bd07acb5489388fd4a132aae77dc8dcf878
|
File details
Details for the file pytrust-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pytrust-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13da7297b23847d3a8f0ac688169dd9e4c8941d6fcede574e32f678bb4b3b33c
|
|
| MD5 |
c5b874c1958ea771d8762887dd4c16fe
|
|
| BLAKE2b-256 |
8e3e570f697cc3b0cbb542d29ad05d30951c12271a251ea7516c7af34202b708
|