Skip to content

feat(files): unnamed temporary files for file and stream targets on Linux - #361

Merged
SpecterAoD merged 1 commit into
mainfrom
feat/338-unnamed-temp
Nov 28, 2026
Merged

SpecterAoD merged 1 commit into
mainfrom
feat/338-unnamed-temp

Conversation

@SpecterAoD

Copy link
Copy Markdown
Owner

DE: #338 PR 2 (Rest) – kein benannter Klartextrest nach Kill.

  • Linux: Datei- und Stromziele (decrypt, encrypt als .pqkf) entstehen per openat(O_TMPFILE) als namenlose Datei im Zielordner und werden nach voller Prüfung per linkat auf den Deskriptor (/proc/self/fd/N) veröffentlicht. Nur wenn das sicher möglich ist (Handle-Pfad geprüft); sonst Rückfall auf die benannte Temporärdatei (z. B. FAT).
  • Unter der CLI-Sandbox per strace geprüft: openat(…O_TMPFILE…) = 3, linkat(…AT_SYMLINK_FOLLOW) = 0, kein Temporärname.
  • Tests: neuer Test unnamed_temp_leaves_no_name_after_failure; Test-Schalter fsutil::named_temps_only() (nur cfg(test)) für die FAT-/Aufräumfälle (REC-007/008/009, Rückfall-Race), damit sie ihren Fall weiter erzwingen; Kill-Test (tests/integrity_kill.rs) verlangt jetzt keinen Rest und erkennt das Schreiben über den belegten Platz (PQKeep ist nicht „dumpable“, /proc/<pid>/fd daher nicht lesbar).
  • Doku: Audit (L1), FILE_IO_RACES, FILE_FORMAT (DE/EN), CHANGELOG; Angriffsmatrix 1.10.0 (QA1-REC-003).
  • Offen in File I/O: race-resistant source opening and no-replace publication #338: Ordnerziele (Reste mit Rückfrage), Windows, Quellen (PR 4).
  • Lokal: volle Suite grün (117 Gruppen), Clippy (beide Feature-Sätze), Limits, Matrix.

EN: #338 PR 2 (rest) – no named plaintext leftover after a kill. On Linux file and stream targets are created as an unnamed O_TMPFILE file and published via linkat on the descriptor after full verification, falling back to a named temporary file where impossible. Checked under the CLI sandbox. New test, cfg(test)-only switch for FAT/cleanup cases, the kill test now requires no leftover. Docs, matrix 1.10.0. Full suite green locally.

Refs #338

🤖 Generated with Claude Code

…inux

DE: #338 PR 2: Datei- und Stromziele (decrypt, encrypt als .pqkf) entstehen unter Linux als namenlose Datei (O_TMPFILE) und werden nach voller Prüfung per linkat auf den Deskriptor veröffentlicht – nach Kill oder Absturz bleibt kein benannter Rest. Rückfall auf benannte Temporärdatei, wo das Dateisystem es nicht kann. Test-Schalter named_temps_only (nur cfg(test)) für FAT-/Aufräumfälle, neuer Test unnamed_temp_leaves_no_name_after_failure, Kill-Test verlangt jetzt keinen Rest. Doku, QA1-REC-003, Matrix 1.10.0.
EN: #338 PR 2: on Linux file and stream targets (decrypt, encrypt to .pqkf) are created as an unnamed file (O_TMPFILE) and published via linkat on the descriptor after full verification – no named leftover after a kill or crash. Falls back to a named temporary file where the file system cannot. Test switch named_temps_only (cfg(test) only) for FAT/cleanup cases, new test unnamed_temp_leaves_no_name_after_failure, the kill test now requires no leftover. Docs, QA1-REC-003, matrix 1.10.0.

Refs #338

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-28T18:56:49.544352Z
We couldn’t complete this review. Comment @codex review to try again.
e7462f1 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@SpecterAoD

Copy link
Copy Markdown
Owner Author

DE: Codex-Review fiel wegen Nutzungslimit aus. Eigene Durchsicht ohne Befund (Rückfall bei fehlendem O_TMPFILE/Handle-Pfad, Rechte 0600, Test-Schalter nur cfg(test)); volle Suite lokal grün, CI 23/23, unter der CLI-Sandbox per strace geprüft. Merge mit Freigabe des Maintainers.
EN: Codex review did not run (usage limit). Own review without finding (fallback without O_TMPFILE/handle path, mode 0600, test switch cfg(test) only); full suite green locally, CI 23/23, checked under the CLI sandbox with strace. Merged with the maintainer's approval.

@SpecterAoD
SpecterAoD merged commit dba9c56 into main Nov 28, 2026
23 checks passed
@SpecterAoD
SpecterAoD deleted the feat/338-unnamed-temp branch November 28, 2026 19:52
@github-project-automation github-project-automation Bot moved this from Backlog to Done in PQKeep Roadmap Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant