Repository navigation
Conversation
Add the design spec and the implementation plan for redacting the head commit author and the PR/MR author and reviewer logins in new attestations, behind an organization setting enforced at push. Refs chainloop-dev#3842 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: aea68fca-750b-4640-b6a9-3a04fb5c8585
PR validation —
|
| Status | Policy | Material | Messages |
|---|---|---|---|
pr-min-approvals |
pr-info |
PR/MR #3884 has 0 approving reviews, 1 required. | |
| ✅ Passed | pr-description-required |
pr-info |
- |
| ✅ Passed | pr-user-story-linked |
pr-info |
- |
AI Session Checks — 🟡 60% · ✅ 0 failing
| Avg score | Sessions | Failing policies | Attribution | Files | Lines | Total Duration |
|---|---|---|---|---|---|---|
| 🟡 60% | 1 | ✅ 0 | 99% AI / 1% Human | 37 | +1009 / -53 | 38h12m58s |
🟡 60% — 99% AI — ✅ All policies passing
-
Dec 3, 2026 11:01 UTC · 38h12m58s · $54.70 · 1.3k in / 558.6k out · claude-code 2.1.335 (claude-opus-5-5)
Change Summary
-
Adds an organization PII redaction toggle for known identity variables, commit authors, and PR/MR identities, alongside additive custom environment redaction. Adds legacy-setting migration and push enforcement, and updates the spec, implementation plan, generated interfaces, and tests.
AI Session Overall Score
-
🟡 60% — Implementation expanded beyond the design revision request; live acceptance checks remain unverified.
AI Session Analysis Breakdown
-
🟢 90% · context-and-planning
-
🟢 Before drafting, the AI researched commit and PR data paths and proposed a milestone with named surfaces. · High Impact
🟢 90% · user-trust-signal
-
No notes.
🟢 88% · solution-quality
-
🟢 Raw-field rewriting preserves unrelated PR data, while parsing errors propagate instead of being swallowed. · High Impact
🟡 72% · alignment
-
🟠 The report claimed validation after every edit round while admitting the last plan fix was not reviewed. · Medium Severity
💡 Distinguish completed validation from edits made after the final review.
🟡 70% · verification
-
🟢 Organization and push integration tests passed after correcting a test-name filter that previously selected no tests. · High Impact
🟠 Fixture-based PR tests passed; real pull-request acceptance and existing-organization upgrade exercises were not demonstrated. · Medium Severity
💡 Exercise a real pull request and an existing known-identity organization before release.
🟡 The engaged user never explicitly confirmed runtime behavior; the final test command has no captured result. · Low Severity
🔴 35% · scope-discipline
-
🔴 AI originated full implementation after the user requested updating the spec and plan, materially expanding the PR. · High Severity
💡 Keep design revisions separate from implementation until the user authorizes building the feature.
-
File Attribution
███████████████████░99% AI / 1% Human…and 12 more file(s).
Policies (4)
Status Policy Material Messages ✅ Passed ai-config-ai-agents-allowedai-coding-session-aea68f- ✅ Passed ai-config-no-dangerous-commandsai-coding-session-aea68f- ✅ Passed ai-config-no-secretsai-coding-session-aea68f- ✅ Passed ai-config-mcp-servers-allowedai-coding-session-aea68f- -
Security Checks — ⚠️ 1 failing
⚠️ AI Security Analysis
The per-PR audit did not finish: 58 concerns went unreviewed (spend ceiling or time). No introduced risk was found in what it reviewed, but treat this as incomplete, not clean.
View in Chainloop ↗ · How this works ↗
✅ Secret Scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | secrets-detection |
- |
✅ SAST Scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | owasp-top10-2025 |
- |
| ✅ Passed | sast |
- |
| ✅ Passed | cwe-top25 |
- |
| ✅ Passed | cwe-top26-40-cusp |
- |
✅ IaC Scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | iac-misconfiguration |
- |
Scans not applied (2)
| Scan | Reason |
|---|---|
| Vulnerability Scan | no manifest/lockfile changed |
| GitHub Actions Scan | no workflow files changed |
Powered by Chainloop and Chainloop Trace
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/specs/issue-3842-scm-identity-redaction.md">
<violation number="1" location="docs/specs/issue-3842-scm-identity-redaction.md:120">
P1: The marker is client-controlled, so the control plane accepts unredacted PR logins when a client adds it; the plan explicitly documents this bypass. Validate the material at push, or narrow this guarantee to detecting older clients rather than enforcing redaction.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| - Source: drafting | ||
|
|
||
| ### D-002: The control plane checks a redaction marker on the PR info material | ||
| The CLI adds a marker to each PR info material that it redacted. At push, the control plane rejects a PR info material without the marker. It does not read the content of the material. |
There was a problem hiding this comment.
P1: The marker is client-controlled, so the control plane accepts unredacted PR logins when a client adds it; the plan explicitly documents this bypass. Validate the material at push, or narrow this guarantee to detecting older clients rather than enforcing redaction.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/specs/issue-3842-scm-identity-redaction.md, line 120:
<comment>The marker is client-controlled, so the control plane accepts unredacted PR logins when a client adds it; the plan explicitly documents this bypass. Validate the material at push, or narrow this guarantee to detecting older clients rather than enforcing redaction.</comment>
<file context>
@@ -0,0 +1,144 @@
+- Source: drafting
+
+### D-002: The control plane checks a redaction marker on the PR info material
+The CLI adds a marker to each PR info material that it redacted. At push, the control plane rejects a PR info material without the marker. It does not read the content of the material.
+- Why: with a CAS backend that is not inline, the control plane sees only the digest of the material. The marker catches an older CLI, which is the threat of #3841, with no CAS read at push. A modified client can add a false marker, but such a client can also forge other data that the control plane does not check.
+- Alternatives considered:
</file context>
Add a PII redaction organization setting. When it is on, new attestations store [REDACTED] for the known identity env vars, the head commit author, and the PR/MR author and reviewer logins. The control plane rejects a push that does not obey it. The known identity mode of env var redaction is replaced by this setting: the custom env var list now adds to PII redaction, an update with the known identity mode turns PII redaction on, and a migration moves the organizations that use it. Implements R-001 to R-006 of docs/specs/issue-3842-pii-redaction.md, which supersedes R-001 and R-005 of the issue-3841 spec. Refs chainloop-dev#3842 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: aea68fca-750b-4640-b6a9-3a04fb5c8585
There was a problem hiding this comment.
1 issue found across 60 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/specs/issue-3842-pii-redaction.md">
<violation number="1" location="docs/specs/issue-3842-pii-redaction.md:149">
P2: D-004 assumes the known identity admins wanted commit-author and PR/MR redaction. The migration turns that on automatically and makes older-CLI pipelines fail at push on upgrade. The spec should justify this for those admins, or offer an opt-out or a staged rollout before the migration goes ahead.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| - A stable hash for each identity: policies can still compare people, for example "the approver is not the author". But a reader can reverse the hash from the list of public logins. | ||
| - Source: drafting | ||
|
|
||
| ### D-004: Organizations with the known identity mode move to PII redaction on |
There was a problem hiding this comment.
P2: D-004 assumes the known identity admins wanted commit-author and PR/MR redaction. The migration turns that on automatically and makes older-CLI pipelines fail at push on upgrade. The spec should justify this for those admins, or offer an opt-out or a staged rollout before the migration goes ahead.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/specs/issue-3842-pii-redaction.md, line 149:
<comment>D-004 assumes the known identity admins wanted commit-author and PR/MR redaction. The migration turns that on automatically and makes older-CLI pipelines fail at push on upgrade. The spec should justify this for those admins, or offer an opt-out or a staged rollout before the migration goes ahead.</comment>
<file context>
@@ -126,11 +141,18 @@ The CLI adds a marker to each PR info material that it redacted. At push, the co
- A stable hash for each identity: policies can still compare people, for example "the approver is not the author". But a reader can reverse the hash from the list of public logins.
- Source: drafting
+### D-004: Organizations with the known identity mode move to PII redaction on
+The migration turns on PII redaction for each organization with the known identity mode. Thus these organizations also get commit and PR/MR redaction, and its push check.
+- Why: the admin of such an organization turned on redaction to hide personal data. The known identity mode no longer exists, and PII redaction is its replacement.
</file context>
- The push check reads the author of every git.head subject, and treats an author value that is not a string as data. - The PR info redaction matches keys in any letter case, as the validation before it does. - RedactedEnvVars no longer sorts the stored custom list in place. Refs chainloop-dev#3842 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: aea68fca-750b-4640-b6a9-3a04fb5c8585
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
The schema requires the login field, so the redacted PR info stays valid. Refs chainloop-dev#3842 Assisted-by: Claude Code Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev> Chainloop-Trace-Sessions: aea68fca-750b-4640-b6a9-3a04fb5c8585
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=trueturns it on, andorg describeshows it.[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.Spec:
docs/specs/issue-3842-pii-redaction.md(R-001 to R-006). It supersedes R-001 and R-005 ofdocs/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).