A Python dependency governance tool
Project description
OceanCrow_PDG - Python Dependency Governance Tool
Overview
OceanCrow_PDG is a Python package designed to revolutionize dependency management for developers. It combines dependency installation, security vulnerability scanning, license compliance checking, and a unique dependency governance system with digital signing. Inspired by the secure collaboration features of OceanCrow-RedPill, this tool ensures that only approved and secure dependencies are integrated into your Python projects.
Key Features
- Dependency Management: Install and resolve dependencies with ease.
- Security Scanning: Detect vulnerabilities using the
safetytool. - License Compliance: Verify licenses against a configurable allowlist.
- Dependency Governance: Require dependencies to be reviewed, approved, and digitally signed using RSA key pairs, preventing unvetted packages from being used.
- Strict Mode: Enforce approval checks before installation.
Installation
- Ensure you have Python 3.7+ installed.
- Install OceanCrow_PDG via PyPI:
pip install OceanCrow_PDG
Alternatively, clone the repository and install locally:
git clone https://github.com/OceanCrow-TT/OceanCrow_PDG.git
cd OceanCrow_PDG
pip install .
Usage
Initialize the Project
Set up the project with a key pair and configuration:
pdg init
Enter a passphrase when prompted to generate RSA keys and initialize the approval list.
Review a Package
Check a package and its dependencies for security and license issues:
pdg review requests==2.25.1
Outputs a report on vulnerabilities and license compliance.
Approve a Package
Sign and approve a package and its dependencies:
pdg approve requests==2.25.1
Enter the passphrase to sign the dependencies.
Install a Package
Install a package only if all dependencies are approved:
pdg install requests==2.25.1
In strict mode, unapproved dependencies block installation unless reviewed and approved.
Configuration
The tool uses a .pdg/pdg_config.json file to store settings:
allowed_licenses: List of acceptable licenses (e.g.,["MIT", "Apache-2.0"]).strict_mode: Boolean to enforce approval checks (default:True).
Edit this file to customize your project's policies.
Dependencies
click: For the command-line interface.cryptography: For digital signing.requests: To fetch PyPI metadata.pip-tools: For dependency resolution.safety: For security scanning.
Install them via requirements.txt:
pip install -r requirements.txt
Development
- Clone the repo:
git clone https://github.com/OceanCrow-TT/OceanCrow_PDG.git - Install development dependencies:
pip install -r requirements.txt - Run tests:
python -m unittest discover tests
Contributing
See CONTRIBUTING.md for guidelines on how to contribute.
License
This project is licensed under the MIT License. See LICENSE.txt for details.
Author
Sheldon K Salmon (OceanCrowtt@gmail.com)
Acknowledgments
- Built with assistance from Grok 3 by xAI.
- Inspired by the success of OceanCrow-RedPill.
Version
Current: 0.1.1
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
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 oceancrow_pdg-0.1.1.tar.gz.
File metadata
- Download URL: oceancrow_pdg-0.1.1.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa61520e0ef62e5253ed0aa8ff5aa558174c6ef71652d0a8ba4a0cdae774601b
|
|
| MD5 |
4a25f1baead43dcd5e9589764aab1ea3
|
|
| BLAKE2b-256 |
410d5656066aa7ec6c4fc594084e989fe22462ed555aa51b4bd503ac4bd6a14c
|
File details
Details for the file oceancrow_pdg-0.1.1-py3-none-any.whl.
File metadata
- Download URL: oceancrow_pdg-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c3e2c116485f069620e1e1fe5d0eb8e58db84f7caff7f1c5c9c195627305917
|
|
| MD5 |
6962db030e1ebfe51a18fa8a00f520bd
|
|
| BLAKE2b-256 |
e2eb33d60c583b855a2991863f424cad161deba603dea15facd580440f7b3f33
|