Open source starter kit for adopting OSS security baselines via policy packs, templates, evidence, and remediation.
Project description
OSS Security Policy as Code Starter Kit
Pass/fail security policy gates for OSS repositories, with explicit assurance grading and framework mappings.
At a Glance
oss-policy-kit evaluates a local repository clone plus optional evidence files, then emits Markdown, JSON, and optional SARIF reports for humans and CI gates.
| Current release | Bundled profiles | Controls | CLI commands | Python |
|---|---|---|---|---|
| v6.0.0 | 52 | 212 | 17 | 3.12+ |
Use it when you need a local-first gate that combines repository governance, CI/CD hardening, release posture, scanner evidence, waivers, and framework-oriented reporting. It is not a vulnerability scanner, certification engine, or legal compliance guarantee.
Quickstart
python -m pip install oss-policy-kit
python -m oss_policy_kit init --target . --with-evidence --with-workflow
python -m oss_policy_kit evaluate --target . --profile github-level-1 --fail-on fail
The evaluation writes:
evaluation-report.mdfor review.evaluation-report.jsonfor automation.evaluation-report.sarifwhen--sarif-outputis set.
First-time tutorial: docs/tutorial-first-pr-gate.md. Compact CLI reference: docs/quickstart-15-min.md.
What It Does
- Evaluates bundled policy profiles against a repository clone.
- Uses optional evidence under
.oss-policy-kit/evidence/for platform-only facts. - Composes signals from local files, workflows, SARIF/JSON scanner outputs, waivers, and release evidence.
- Labels controls by assurance type: deterministic, signal, or evidence-backed.
- Supports Markdown, JSON report contracts, and optional SARIF for code-scanning workflows.
- Keeps waivers visible with owner, reason, and expiry metadata.
What It Does Not Do
- It does not certify CRA, SLSA, OSPS, SSDF, or AI Act compliance.
- It does not replace SAST, SCA, secrets scanning, threat modeling, secure code review, pentesting, or live platform review.
- It does not prove branch protection, rulesets, MFA, cloud posture, or registry settings unless you provide API-backed evidence.
- It does not claim SLSA Build L3. The current trust model is documented in docs/supply-chain-verification.md.
Core Capabilities
| Area | Included |
|---|---|
| Repository governance | LICENSE, SECURITY, CONTRIBUTING, CODEOWNERS, branch protection evidence, release hygiene |
| CI/CD posture | GitHub Actions, Azure Pipelines, AWS CodeBuild/CodePipeline, GitLab CI signals |
| Release hardening | OIDC publishing, provenance evidence, artifact verification, source-built container flow |
| Scanner composition | SARIF/JSON ingestion for tools such as zizmor, OSV-Scanner, Gitleaks, Scorecard, and Semgrep |
| Framework mapping | OSPS, NIST SSDF, SLSA, S2C2F, OWASP CI/CD, EU CRA, EU AI Act readiness signals |
| AI and agent security | AI agent source-side checks, MCP server security, OWASP Agentic ASI mapping |
| Exception handling | Waiver registry with reason, owner, scope, and expiry |
Profiles
List bundled profiles:
python -m oss_policy_kit profiles
Common starting points:
| Profile | Use when |
|---|---|
github-level-1 |
First GitHub repository gate |
github-level-2 |
Stricter GitHub governance and CI/CD posture |
oss-publish-readiness-1 |
Release/publish readiness for OSS packages |
appsec-sast-sca-1 |
Compose SAST/SCA/secrets scanner evidence |
osps-baseline-2026-1 |
OpenSSF OSPS Baseline 2026-oriented review |
cra-eu-ready-2-1 |
EU CRA Article 13/14 readiness signals |
ai-agent-baseline-1 |
Source-side checks for AI agent repositories |
appsec-mcp-server-1 |
MCP server security readiness |
Full profile guide: docs/profiles/overview.md.
GitHub Action
- uses: lucashgrifoni/OSS-Security-Policy-as-Code-Starter-Kit@v6.0.0
with:
profile: github-level-1
fail-on: fail
Action reference: docs/github-action.md. Starter workflows live under templates/workflows/.
Reports and Contracts
By default, evaluate writes reports/1.0 JSON. Older compatibility contracts and opt-in reports/2.0 are documented here:
Exit codes:
| Code | Meaning |
|---|---|
| 0 | Success; configured fail threshold was not violated |
| 1 | Evaluation completed and the fail threshold was violated |
| 2 | Usage, validation, or load error |
| 3 | Unexpected internal error |
Supply Chain Verification
PyPI publication uses Trusted Publishing and registry attestations. Release artifacts also use GitHub Artifact Attestations. Container images are built from the checked-out release source tree, signed with cosign keyless, and attested.
Verification commands and limits are in docs/supply-chain-verification.md.
Documentation Map
| Topic | Link |
|---|---|
| Documentation index | docs/README.md |
| Architecture | docs/architecture.md |
| CLI reference | docs/cli-reference.md |
| Results guide | docs/results-guide.md |
| Framework alignment | docs/framework-alignment.md |
| Positioning and limits | docs/positioning.md |
| EU CRA readiness | docs/cra-readiness.md |
| EU AI Act readiness | docs/eu-ai-act-readiness.md |
| MCP server security | docs/mcp-server-security.md |
| Release readiness | docs/release-readiness.md |
| Changelog | CHANGELOG.md |
Repository Layout
| Path | Purpose |
|---|---|
src/oss_policy_kit/ |
Python package, CLI, evaluators, parsers, reporting |
src/oss_policy_kit/data/ |
Bundled controls, profiles, and schemas |
templates/ |
Starter workflows, waivers, docs, and ruleset examples |
examples/ |
Hardened and vulnerable example repositories |
tests/ |
Unit, application, integration, infrastructure, and property tests |
docs/ |
User docs, architecture, mappings, ADRs, and release notes |
Contributing and Security
- Contribution guide: CONTRIBUTING.md
- Governance: GOVERNANCE.md
- Vulnerability reporting: SECURITY.md
- Discussions: https://github.com/lucashgrifoni/OSS-Security-Policy-as-Code-Starter-Kit/discussions
- Issues: https://github.com/lucashgrifoni/OSS-Security-Policy-as-Code-Starter-Kit/issues
License
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 oss_policy_kit-6.1.0.tar.gz.
File metadata
- Download URL: oss_policy_kit-6.1.0.tar.gz
- Upload date:
- Size: 315.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83890f1b6391c5f9683df084adc5ba4ebbb738205b9b709aac8932ec2e76129e
|
|
| MD5 |
952cdc55a3dc68c66874ccd63006fb64
|
|
| BLAKE2b-256 |
533384c0c621cff0705a43c8ba7668bf9ae2347d6c91ab85d183acc4d248f435
|
Provenance
The following attestation bundles were made for oss_policy_kit-6.1.0.tar.gz:
Publisher:
publish-pypi.yml on lucashgrifoni/OSS-Security-Policy-as-Code-Starter-Kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oss_policy_kit-6.1.0.tar.gz -
Subject digest:
83890f1b6391c5f9683df084adc5ba4ebbb738205b9b709aac8932ec2e76129e - Sigstore transparency entry: 1594201665
- Sigstore integration time:
-
Permalink:
lucashgrifoni/OSS-Security-Policy-as-Code-Starter-Kit@7b2a701850b414b8b226959796fdffc455c81d2e -
Branch / Tag:
refs/tags/v6.1.0 - Owner: https://github.com/lucashgrifoni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7b2a701850b414b8b226959796fdffc455c81d2e -
Trigger Event:
push
-
Statement type:
File details
Details for the file oss_policy_kit-6.1.0-py3-none-any.whl.
File metadata
- Download URL: oss_policy_kit-6.1.0-py3-none-any.whl
- Upload date:
- Size: 433.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17cea996f22edb0ba1b24dd9ae730d202614a8fff44b908406cd1ddae690f69b
|
|
| MD5 |
dafb5af6d1afcfc4b7ebf2bac91a1f38
|
|
| BLAKE2b-256 |
c20dffd4137eadf7d8e94389cf295f84c104ff6e70067d3f944c89c8748e1d28
|
Provenance
The following attestation bundles were made for oss_policy_kit-6.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on lucashgrifoni/OSS-Security-Policy-as-Code-Starter-Kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oss_policy_kit-6.1.0-py3-none-any.whl -
Subject digest:
17cea996f22edb0ba1b24dd9ae730d202614a8fff44b908406cd1ddae690f69b - Sigstore transparency entry: 1594201757
- Sigstore integration time:
-
Permalink:
lucashgrifoni/OSS-Security-Policy-as-Code-Starter-Kit@7b2a701850b414b8b226959796fdffc455c81d2e -
Branch / Tag:
refs/tags/v6.1.0 - Owner: https://github.com/lucashgrifoni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@7b2a701850b414b8b226959796fdffc455c81d2e -
Trigger Event:
push
-
Statement type: