Skip to content

fix(chat-export): redact PEM private keys and trigger lab CI (#20 follow-up) - #21

Merged
runesleo merged 1 commit into
mainfrom
fix/chat-export-pem-redaction-ci-20261018
Oct 18, 2026
Merged

runesleo merged 1 commit into
mainfrom
fix/chat-export-pem-redaction-ci-20261018

Conversation

@runesleo

@runesleo runesleo commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Why

Follow up on the two P2 findings raised after #20 was merged:

  • Complete multi-line PEM private keys were not recognized by Chat Export's best-effort redaction.
  • Chat Export-only PRs did not match the existing opc-lab.yml path filter, so fixture tests could be skipped.

Changes

  • Redact complete, matching BEGIN ... PRIVATE KEY / END ... PRIVATE KEY blocks before export, including PKCS#8, RSA, EC, OpenSSH and encrypted PEM labels. A second BEGIN marker stops a preceding unmatched block from swallowing unrelated text.
  • Add synthetic tests for PEM variants, CRLF, separate blocks, unmatched example, public keys, normal multi-line chat, existing API keys, and the Markdown export path. Fixtures contain no real cryptographic key material.
  • Add labs/chat-export/** to the existing pull_request.paths filter.
  • Clarify best-effort redaction limits in the Chat Export README.

Verification

  • Isolated synthetic PEM matcher checks passed in a Linux test sandbox.
  • Verified: GitHub Actions OPC Lab run #39081604783 completed successfully on commit 142b44c (check verify: success). All steps succeeded, including ./scripts/verify.sh (VERIFY_OK template_bytes=2318), OPC fixtures (OPC_TEST_OK), Chat Export fixtures (CHAT_EXPORT_TEST_OK), and the private-pattern scan (OPC_PRIVATE_SCAN_OK).
  • No real user chat data were accessed or exported. No new sync systems or schedulers were added.

Residual risk

Complete, conventionally delimited PEM blocks are covered; partial/malformed blocks, nonstandard formats, arbitrary secrets, and export metadata are not guaranteed to be redacted. Exported Markdown is private data and must not be uploaded or published.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T00:09:24.846321Z 142b44c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@runesleo
runesleo merged commit eeaa726 into main Oct 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant