Repository navigation
Closed
Description
When encrypt-snapshots is false, a normal review run shows two identical check-run warnings:
Snapshots are not encrypted; anyone who can read this repository can download them.
This is not GitHub duplicating one annotation. The action calls snapshot.sh save twice:
- Archive codex session saves
CODEX_HOME. - Archive Codex events saves
codex.jsonl.
scripts/snapshot.ts emits the same ::warning:: for every unencrypted save, so the run produces two annotations at different log locations. It reads like a duplicate error and adds avoidable noise to the check run.
Proposal
- Warn at most once per job when snapshots are unencrypted.
- Keep the warning whenever any artifact is written in plaintext; do not silently weaken the security signal.
- For example, set a per-run marker in
$GITHUB_ENVafter the first warning, or pass a quiet flag to the debug-events save.
Acceptance
- With
encrypt-snapshots: false, a run that saves both the session and debug artifacts shows one warning. - The warning still appears when only one archive is written.
- With encryption enabled, the unencrypted-snapshot warning never appears.
Source:
code-review/scripts/snapshot.ts
Lines 51 to 63 in b5b38f2
| if (!key) { | |
| console.log("::warning::Snapshots are not encrypted; anyone who can read this repository can download them."); | |
| await Bun.write(archive, Buffer.concat([plainMark, plain])); | |
| } else { | |
| const iv = crypto.getRandomValues(new Uint8Array(12)); | |
| const sealed = await crypto.subtle.encrypt({ name: "AES-GCM", iv }, key, plain); | |
| await Bun.write(archive, Buffer.concat([encryptedMark, iv, new Uint8Array(sealed)])); | |
| } | |
| console.log(`Saved ${present.join(", ")} into ${archive}`); | |
| } else if (command === "load") { | |
| // An artifact saved before snapshots became one archive already unpacked its files. | |
| if (!(await Bun.file(archive).exists())) { | |
| // Restoring nothing would silently start a fresh session that looks like a continuation. |
Reacted by coderabbitai
Metadata
Metadata
Assignees
Labels
No labels
Activity
coderabbitai commentedon Nov 22, 2026
🔗 Related PRs
#129 - Encrypt session snapshots with repository-scoped keys [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!