This guide covers integrating PMPL-1.0 (SPDX: PMPL-1.0-or-later) into your development workflow, CI/CD pipelines, and compliance systems.
For most source files:
// SPDX-License-Identifier: PMPL-1.0-or-later
// SPDX-FileCopyrightText: 2025 Your Name <email@example.com>
For files with significant creative content:
// SPDX-License-Identifier: PMPL-1.0-or-later
// SPDX-FileCopyrightText: 2025 Your Name <email@example.com>
//
// Emotional Lineage: [Brief description of cultural/narrative context]
// See LINEAGE.md for full provenance
Rust:
// SPDX-License-Identifier: PMPL-1.0-or-later
// SPDX-FileCopyrightText: 2025 Author NamePython:
# SPDX-License-Identifier: PMPL-1.0-or-later
# SPDX-FileCopyrightText: 2025 Author NameHTML:
<!-- SPDX-FileCopyrightText: 2025 Author Name -->Shell:
#!/usr/bin/env bash
# SPDX-License-Identifier: PMPL-1.0-or-later
# SPDX-FileCopyrightText: 2025 Author Name# .github/workflows/license-check.yml
name: License Compliance
on: [push, pull_request]
jobs:
check-headers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check SPDX headers
run: |
# Find files missing SPDX headers
find src -name "*.rs" -type f | while read file; do
if ! head -5 "$file" | grep -q "SPDX-License-Identifier"; then
echo "Missing SPDX header: $file"
exit 1
fi
done
verify-provenance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pmpl-verify
run: cargo install pmpl-verify
- name: Verify signatures
run: pmpl-verify --recursive src/# .gitlab-ci.yml
license-compliance:
stage: test
image: rust:latest
script:
- cargo install pmpl-audit
- pmpl-audit .
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
provenance-check:
stage: test
image: rust:latest
script:
- cargo install pmpl-verify
- pmpl-verify --recursive src/
allow_failure: true # Signatures are optional# .gitloom/compliance.toml
[license]
type = "Palimpsest-MPL-1.0"
exhibits = ["ethical-use", "quantum-safe"]
[checks]
require_spdx_headers = true
require_signatures = false # Set true for strict mode
verify_on_commit = true
[provenance]
algorithm = "ML-DSA-65"
key_path = "~/.pmpl/signing-key.pem"# Cargo.toml
[package]
name = "your-project"
version = "1.0.0"
license = "PMPL-1.0"
license-file = "LICENSE"
[package.metadata.pmpl]
exhibits = ["ethical-use", "quantum-safe"]
provenance = true{
"name": "@your-scope/your-project",
"version": "1.0.0",
"license": "PMPL-1.0",
"exports": "./mod.ts"
}# mix.exs
defmodule YourProject.MixProject do
use Mix.Project
def project do
[
app: :your_project,
version: "1.0.0",
licenses: ["PMPL-1.0"],
files: ~w(lib priv LICENSE mix.exs README.md)
]
end
end# Generate a quantum-safe key pair
pmpl-keygen --algorithm ML-DSA-65 --output ~/.pmpl/
# Publish your public key
pmpl-publish-key --key ~/.pmpl/public.pem --to keys.pmpl.dev# Sign all modified files in a commit
git diff --name-only HEAD~1 | xargs pmpl-sign --key ~/.pmpl/private.pem
# Or use git hook
cat > .git/hooks/pre-commit << 'EOF'
#!/bin/bash
git diff --cached --name-only | xargs pmpl-sign --key ~/.pmpl/private.pem
git add $(git diff --cached --name-only | sed 's/$/.sig/')
EOF
chmod +x .git/hooks/pre-commit# Verify a single file
pmpl-verify src/main.rs
# Verify entire repository
pmpl-verify --recursive .
# Verify with specific trust anchors
pmpl-verify --trust-anchor keys/trusted-signers.pem --recursive .{
"spdxVersion": "SPDX-2.3",
"dataLicense": "CC0-1.0",
"SPDXID": "SPDXRef-DOCUMENT",
"name": "your-project-sbom",
"packages": [
{
"SPDXID": "SPDXRef-Package",
"name": "your-project",
"versionInfo": "1.0.0",
"licenseConcluded": "PMPL-1.0",
"licenseDeclared": "PMPL-1.0",
"externalRefs": [
{
"referenceCategory": "SECURITY",
"referenceType": "pmpl-provenance",
"referenceLocator": "https://your-project.dev/.well-known/pmpl-provenance.json"
}
]
}
]
}<?xml version="1.0" encoding="UTF-8"?>
<bom xmlns="http://cyclonedx.org/schema/bom/1.5">
<metadata>
<component type="application">
<name>your-project</name>
<version>1.0.0</version>
<licenses>
<license>
<id>PMPL-1.0</id>
<url>https://github.com/hyperpolymath/palimpsest-license/blob/main/legal/PALIMPSEST-MPL-1.0.txt</url>
</license>
</licenses>
</component>
</metadata>
</bom># .well-known/pmpl-license.json
{
"license": "PMPL-1.0",
"version": "1.0.0",
"license_url": "https://github.com/hyperpolymath/palimpsest-license",
"provenance": {
"enabled": true,
"algorithm": "ML-DSA-65",
"public_key": "https://your-project.dev/.well-known/pmpl-public-key.pem"
}
}<head>
<meta name="license" content="PMPL-1.0">
<link rel="license" href="/LICENSE">
<meta name="pmpl:provenance" content="https://your-project.dev/.well-known/pmpl-provenance.json">
</head>FROM rust:1.75-slim
LABEL org.opencontainers.image.licenses="PMPL-1.0"
LABEL org.opencontainers.image.source="https://github.com/your-org/your-project"
LABEL dev.pmpl.provenance="enabled"
LABEL dev.pmpl.algorithm="ML-DSA-65"
COPY LICENSE /licenses/PALIMPSEST-MPL-1.0.txt
COPY legal/exhibits/ /licenses/exhibits/# melange.yaml
package:
name: your-package
version: 1.0.0
copyright:
- license: PMPL-1.0
paths:
- "*"// .vscode/settings.json
{
"files.insertFinalNewline": true,
"editor.formatOnSave": true,
"pmpl.headerTemplate": "// SPDX-License-Identifier: PMPL-1.0\n// SPDX-FileCopyrightText: ${YEAR} ${AUTHOR}",
"pmpl.autoSign": false
}<!-- .idea/copyright/PMPL.xml -->
<component name="CopyrightManager">
<copyright>
<option name="notice" value="SPDX-License-Identifier: PMPL-1.0 SPDX-FileCopyrightText: $today.year $username"/>
</copyright>
</component># .pre-commit-config.yaml
repos:
- repo: local
hooks:
- id: spdx-headers
name: Check SPDX headers
entry: scripts/check-spdx-headers.sh
language: script
types: [file]
- id: pmpl-sign
name: Sign modified files
entry: pmpl-sign --key ~/.pmpl/private.pem
language: system
types: [file]
stages: [commit]# Justfile
# Check all files have proper SPDX headers
check-headers:
@find src -name "*.rs" -exec grep -L "SPDX-License-Identifier" {} \; | \
xargs -I {} echo "Missing header: {}"
# Sign all source files
sign-all:
find src -name "*.rs" -exec pmpl-sign --key ~/.pmpl/private.pem {} \;
# Verify all signatures
verify:
pmpl-verify --recursive src/
# Full compliance check
compliance: check-headers verify
@echo "Compliance check passed"
# Generate SBOM
sbom:
pmpl-sbom --format spdx --output sbom.jsonMissing SPDX headers:
# Find files without headers
find . -name "*.rs" -type f ! -path "./target/*" | \
xargs grep -L "SPDX-License-Identifier"Invalid signatures:
# Check signature validity
pmpl-verify --verbose file.rs
# Resign with updated key
pmpl-sign --force --key ~/.pmpl/private.pem file.rsKey not found:
# Check key publication
curl -s https://keys.pmpl.dev/lookup?fingerprint=YOUR_KEY_FP