Hmm, the user wants a draft for an internal package registry covering four specific areas: provenance, license compliance, cache policy, and docs. This seems like a structured request for a technical policy document, likely for an engineering or DevOps team.
I should approach this systematically. The user mentioned "draft," so they probably want a template or framework rather than a fully detailed implementation. I'll break it down into the four requested sections, but since it's an internal registry, I should also include foundational aspects like scope, roles, and enforcement.
Provenance needs a clear chain of custody for artifacts, so I'll define stages and signing requirements. License compliance requires automated scanning and approval workflows. Cache policy should balance performance with freshness, and docs must be discoverable and maintained.
I'll structure it as a formal policy document with sections, responsibilities, and actionable procedures. The tone should be authoritative but practical, with placeholders for org-specific details. Since it's internal, I can assume some technical familiarity but avoid over-explaining basics.
Let me start with core principles to set the tone, then dive into each section with subsections for policies, enforcement, and exceptions. I'll conclude with appendices for tools and examples to make it actionable.
Internal Package Registry Policy & Specification
Document ID:REG-POL-001 Version:1.0 Effective Date:[DATE] Owner:Engineering Platform Team Scope: All internal software packages (libraries, tools, containers) published to, or consumed from, the corporate registry (registry.corp.example.com).
1. Core Principles
Trust & Integrity: All artifacts must be verifiable from source to deployment.
Risk Mitigation: Proactive management of license, security, and operational risks.
Developer Experience: Frictionless discovery, consumption, and publication with clear guardrails.
Auditability: Complete, immutable logs for compliance and forensics.
2. Provenance & Integrity
2.1 Policy
Every artifact in the registry MUST have an unbroken, verifiable chain of custody from source code commit to registry publication.
Verification: CI/CD pipelines and deployment systems MUST verify signatures before promotion to production stages.
Build Attestations: For critical services, generate full SBOMs (Software Bill of Materials) and attestation statements (e.g., using slsa-provenance or in-toto) at build time and store alongside the artifact.
2.3 Enforcement
Registry ingress API rejects unsigned artifacts.
Consumption tools (npm, pip, apt, etc.) are configured with policy engines (e.g., sigstore-policy, Open Policy Agent) to reject unsigned or unverifiable artifacts by default.
Exception process: Time-bound, risk-assessed bypass via security team approval (logged).
3. License Compliance
3.1 Policy
Only packages with Approved Licenses may be consumed in production services. All dependencies are automatically scanned.
3.2 Approved Licenses
Category A (Permissive): MIT, Apache-2.0, BSD-3-Clause, etc. ✅ Allowed.
Category B (Copyleft Weak): LGPL-3.0, MPL-2.0. ⚠️ Allowed with Legal Review for dynamic linking only.
Category C (Copyleft Strong): GPL-2.0, GPL-3.0. ❌ Prohibited.
Category D (Custom/Proprietary): Evaluated case-by-case by Legal.
Category E (No License/All Rights Reserved): ❌ Prohibited.
3.3 Process
Automated Scanning: All ingested packages are scanned by FOSSA, Black Duck, or ORT against the internal license allowlist.
Bill of Materials (BOM): A full license-declared BOM is generated for every built artifact and stored in the registry metadata.
Compliance Report: A human-readable LICENSES file is generated for every published package, listing all transitive dependencies and their licenses.
Blocking: Packages with Category C or E dependencies are BLOCKED from registry publication. Category B triggers a legal-review-required flag.
3.4 Developer Experience
CLI command to check a package's license status: regy licenses check <package>
Appendix A: Registry API Specification (Swagger/OpenAPI link) Appendix B: Certificate Management for Signing (Internal PKI doc) Appendix C: License Allowlist Full Table (link to Legal spreadsheet) Appendix D: CI/CD Pipeline Examples (GitLab CI, GitHub Actions)
This document defines the minimum standards. Individual teams may add stricter requirements (e.g., mandatory SBOMs), but may not relax these baseline controls.