OSS Sustain Guard: A MultiâEcosystem Sustainability Analyzer for Enterprise OpenâSource Dependency Management
OSSâŻSustainâŻGuard is a crossâlanguage tool that surfaces a 24âmetric view of project health, leveraging CHAOSS frameworks and empathetic scoring to help teams make informed decisions. With local caching, CI integrations, and a pluggable architecture, it offers an endâtoâend workflow for tracking maintenance, community, security, and funding across Python, JavaScript, Go, Rust, and more.
## Overview
OSSâŻSustainâŻGuard fills a critical gap for organizations that rely on dozens or hundreds of openâsource components. By aggregating metrics such as maintainer activity, contributor health, security posture, and funding signals, the tool translates raw repository data into an actionable snapshot that guides procurement and stewardship decisions.
The core concept is simple: *awareness first*. When a highâprofile incident surfaces, a team can inspect a single report to understand the risk surface of every transitive dependency instead of hunting through GitHub issue lists. OSSâŻSustainâŻGuard is engineered to give that awareness at scale, across all major ecosystems.
## Philosophy and Approach
### Empathetic, ContextâSensitive Evaluation
The project eschews blameâculture in favor of constructive language. Sustainability is acknowledged as a spectrum that varies between corporateâbacked and communityâdriven projects. Consequently, the scoring system distinguishes between these models, letting users choose a *balanced*, *securityâfirst*, *contributorâexperience*, or *longâtermâstability* profile.
### Metrics as One Lens
Metrics are grounded in the CHAOSS standards, providing a solid research foundation:
- **Contributor Health** â Number and distribution of active contributors.
- **Development Activity** â Commit cadence, issue resolution speed.
- **Community Engagement** â PR reviews, discussion threads.
- **Project Maturity** â Release frequency, version lifeâcycle.
- **Security** â Vulnerability disclosures and patch timelines.
Each core metric is scored on a 0â10 scale, and the tool aggregates these into a composite score that is transparently broken down.
## Core Features
| Feature | Description |
|---------|-------------|
| **24 Sustainability Metrics** | Covers maintainers, contributors, community, maturity, and security, all scored 0â10. |
| **Trend Analysis** | Historical view of scores across multiple windows, enabling proactive risk mitigation. |
| **CHAOSS Alignment** | Five models (Stability, Sustainability, Community Engagement, Project Maturity, Contributor Experience) for flexible evaluation. |
| **MultiâEcosystem Support** | Outâofâtheâbox analysis for Python, JavaScript, Go, Rust, PHP, Java, Kotlin, C#, Ruby, and more. |
| **RepositoryâLevel Scoring** | Provides local caching to reduce API calls, GitHub tokens cover most repos, GitLab tokens required only for gitlab.com. |
| **Extensibility** | Pluggable architecture lets teams add new metrics, resolvers, or VCS providers. |
| **CI/CD Integration** | Native hooks for GitHub Actions, preâcommit, and generic CI pipelines. |
| **Funding Awareness** | Displays funding links for community projects and a *Gratitude Vending Machine* to surface those most in need of support. |
## Developer Workflow
1. **Manifest Detection** â The tool autoâdetects `requirements.txt`, `package.json`, `Cargo.toml`, and more, even within monorepos.
2. **Recursive Scanning** â Traverses directories, respecting an `exclude` configuration for internal or legacy dependencies.
3. **Analysis** â Connects to GitHub/GitLab (via OAuth tokens) or reads locally cached snapshots. Results are cached to speed up subsequent runs.
4. **Output** â Generates a detailed report with metric breakâdowns, trend charts, and actionable suggestions. The report can be consumed in CI or displayed on a dashboard.
5. **Plugging in** â Teams can write custom plugins for new package ecosystems, VCS integrations, or bespoke scoring logic.
## Installation & Quick Start
```bash
pip install oss-sustain-guard
```
A minimal invocation:
```bash
sustain-guard analyze ./my-project
```
For CI integration, add a step in GitHub Actions:
```yaml
- name: Run OSS Sustain Guard
uses: myorg/oss-sustain-guard-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
```
## Extensibility & Customization
- **Custom Resolvers** â Add new package manifests via plugin modules.
- **Custom VCS Providers** â Extend analysis to other versionâcontrol platforms.
- **Custom Scoring Profiles** â Define integer weights per metric and normalize to a 0â100 scale, enabling tailoring to an organizationâs risk appetite.
The toolâs plugin system lives in the `oss_sustain_guard.plugins` package, making it straightforward for experienced developers to contribute new logic.
## Community & Support
OSSâŻSustainâŻGuard is open source under the MIT License. The maintainer community actively welcomes contributions, especially in the form of new metric definitions and ecosystem plugins. Frequently Asked Questions and troubleshooting guides are available in the documentation hub.
## Conclusion
For teams that need to audit their openâsource footprint accurately, OSSâŻSustainâŻGuard delivers a comprehensive, metricsâdriven view while maintaining a respectful, collaborationâoriented user experience. Its crossâlanguage coverage, transparent scoring, and builtâin CI friendliness make it a valuable addition to any DevOps pipeline focused on sustainable software supply chains.