Skip to content

Authenticate Exocrate archives before extraction - #3627

Open
joshlf wants to merge 1 commit into
mainfrom
Glahihffrli3s5lgyhtbnivg7cwjftslj
Open

Authenticate Exocrate archives before extraction#3627
joshlf wants to merge 1 commit into
mainfrom
Glahihffrli3s5lgyhtbnivg7cwjftslj

Conversation

@joshlf

@joshlf joshlf commented Sep 4, 2026

Copy link
Copy Markdown
Member

Exocrate previously unpacked a remote archive before checking its pinned SHA-256. If cleanup of a rejected archive failed, a later authentic download could reuse and promote residual attacker-controlled files.

Spool and authenticate the complete compressed stream before parsing it, then extract those exact bytes. Use one versioned, parent-wide staging slot whose claim-bearing lock serializes cooperating installers and bounds process-crash residue without adopting an unclaimed path. Reserve the staging namespace from every absolute installation path and fail closed on unknown protocol state.

Normalize protocol-owned directory permissions before recovery cleanup without following symlinks. Add regressions for authentication order, first-use races, process exit, permission-restricted residue, migration collisions, panic and rename cleanup, and filesystem-name normalization.

Closes #3612

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.


Latest Update: v4 — Compare vs v3

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v3 v2 v1 Base
v4 vs v3 vs v2 vs v1 vs Base
v3 vs v2 vs v1 vs Base
v2 vs v1 vs Base
v1 vs Base
⬇️ Download this PR

Branch

git fetch origin refs/heads/Glahihffrli3s5lgyhtbnivg7cwjftslj && git checkout -b pr-Glahihffrli3s5lgyhtbnivg7cwjftslj FETCH_HEAD

Checkout

git fetch origin refs/heads/Glahihffrli3s5lgyhtbnivg7cwjftslj && git checkout FETCH_HEAD

Cherry Pick

git fetch origin refs/heads/Glahihffrli3s5lgyhtbnivg7cwjftslj && git cherry-pick FETCH_HEAD

Pull

git pull origin refs/heads/Glahihffrli3s5lgyhtbnivg7cwjftslj

Stacked PRs enabled by GHerrit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 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-09-06T01:50:16.273066Z 4d866f8 Manual request
ℹ️ 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.

@codecov-commenter

codecov-commenter commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.85%. Comparing base (2dad389) to head (4d866f8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3627   +/-   ##
=======================================
  Coverage   91.85%   91.85%           
=======================================
  Files          20       20           
  Lines        6093     6093           
=======================================
  Hits         5597     5597           
  Misses        496      496           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: af082de62c

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread exocrate/src/lib.rs Outdated
Comment thread exocrate/src/sync.rs Outdated
@joshlf
joshlf force-pushed the Glahihffrli3s5lgyhtbnivg7cwjftslj branch from af082de to 7c15c79 Compare September 5, 2026 23:50
@joshlf

joshlf commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 7c15c7984a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@joshlf

joshlf commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

@googlebot rescan

@joshlf
joshlf force-pushed the Glahihffrli3s5lgyhtbnivg7cwjftslj branch from 7c15c79 to 1ef6ed4 Compare September 6, 2026 00:52
@joshlf

joshlf commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

Republished the unchanged tree as 1ef6ed4 solely to restart the stalled CLA check. The author and committer remain Josh Liebow-Feeser's Agent <joshlf@google.com>.

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ef6ed4b53

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread exocrate/src/sync.rs Outdated
Exocrate previously unpacked a remote archive before checking its pinned SHA-256. If cleanup of a rejected archive failed, a later authentic download could reuse and promote residual attacker-controlled files.

Spool and authenticate the complete compressed stream before parsing it, then extract those exact bytes. Use one versioned, parent-wide staging slot whose claim-bearing lock serializes cooperating installers and bounds process-crash residue without adopting an unclaimed path. Reserve the staging namespace from every absolute installation path and fail closed on unknown protocol state.

Normalize protocol-owned directory permissions before recovery cleanup without following symlinks. Add regressions for authentication order, first-use races, process exit, permission-restricted residue, migration collisions, panic and rename cleanup, and filesystem-name normalization.

Closes #3612

*Authored by an AI agent acting on Josh Liebow-Feeser's behalf.*

gherrit-pr-id: Glahihffrli3s5lgyhtbnivg7cwjftslj
@joshlf
joshlf force-pushed the Glahihffrli3s5lgyhtbnivg7cwjftslj branch from 1ef6ed4 to 4d866f8 Compare September 6, 2026 01:46
@joshlf

joshlf commented Sep 6, 2026

Copy link
Copy Markdown
Member Author

@codex review

Authored by an AI agent acting on Josh Liebow-Feeser's behalf.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 4d866f8381

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

Security Advisory: Rejected Exocrate archives leave attacker files in later authenticated installations

2 participants