feat: redact personal data with an organization PII redaction setting

MI
2d ago
+1724-83

Adds a PII redaction organization setting, and the spec and plan that describe it.

Summary

The env var redaction setting of #3841 hides the runner environment variables that identify a person. Attestations also store the name and email of the head commit author, and the logins of the PR/MR author and reviewers. This PR replaces the known identity mode of env var redaction with one on/off PII redaction setting that covers all of them.

  • chainloop org update --pii-redaction=true turns it on, and org describe shows it.
  • With the setting on, the CLI stores [REDACTED] for the known identity env vars, the commit author (after the platform verifies the commit), and the PR/MR author and reviewer logins. The PR info material keeps its other fields and the form of its schema, and gets a redaction marker annotation.
  • The custom env var list now adds to PII redaction instead of replacing the known identity list.
  • Migration: organizations with the known identity mode get PII redaction on and no custom list. An update with the known identity mode, from an older CLI, turns PII redaction on.
  • At push, the control plane rejects a clear commit author and a PR info material without the marker, next to the existing env var check.

Spec: docs/specs/issue-3842-pii-redaction.md (R-001 to R-006). It supersedes R-001 and R-005 of docs/specs/issue-3841-runner-env-var-redaction.md.
Plan: docs/plans/issue-3842-pii-redaction.md.

Decisions to challenge

D-001 (one PII setting replaces the known identity mode), D-002 (a marker annotation, not a CAS read at push), D-003 ([REDACTED], not a pseudonym), and D-004 (known identity organizations move to PII redaction on, so pipelines with an older CLI in those organizations fail at push after the upgrade).

We would like two reviewers to approve the spec.

Closes #3842

This contribution was written with AI assistance (Claude Code).