Skip to content

(via norrietaylor): Require manifest.json to be a regular file in nested bundle verification - #889

Merged
macroscopeapp[bot] merged 1 commit into
feat/diag-unit7-guest-fetchfrom
macroscope/feat/diag-unit7-guest-fetch
Jul 22, 2026
Merged

(via norrietaylor): Require manifest.json to be a regular file in nested bundle verification#889
macroscopeapp[bot] merged 1 commit into
feat/diag-unit7-guest-fetchfrom
macroscope/feat/diag-unit7-guest-fetch

Conversation

@macroscopeapp

@macroscopeapp macroscopeapp Bot commented Jul 22, 2026

Copy link
Copy Markdown

Summary

This PR adds a file type check to the nested bundle verification logic, ensuring that manifest.json must be a regular file to be considered valid.

Changes

Added an entry.header().entry_type().is_file() check to the manifest detection in verify_nested_bundle. Previously, the code only checked for an entry named manifest.json, but this could incorrectly match directories or symlinks with that name.

Why

Without this check, a malformed or malicious bundle containing a directory or symlink named manifest.json could be incorrectly treated as having a valid manifest file. This fix ensures only actual regular files are recognized as valid manifests during nested bundle verification.

Note

Macroscope: Fix It For Me

Activity

Currently: Auto-merged f8fadfa

Previously

Note

Require manifest.json to be a regular file in verify_nested_bundle

In guest.rs, the verify_nested_bundle function now checks that a tar entry named manifest.json is a regular file before counting it as a valid manifest. Previously, symlinks, directories, or other non-file entry types with that name would satisfy the manifest presence check.

Macroscope summarized afd34ef.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: f7c2816c-d1eb-4d19-b7e9-0722f18e22e4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@macroscopeapp
macroscopeapp Bot merged commit f8fadfa into feat/diag-unit7-guest-fetch Jul 22, 2026
2 checks passed
@macroscopeapp
macroscopeapp Bot deleted the macroscope/feat/diag-unit7-guest-fetch branch July 22, 2026 03:29
norrietaylor added a commit that referenced this pull request Jul 22, 2026
…880)

* feat(minimal): guest fetch and degraded-mode fallback for `min bug`

Per provider, `min bug` now performs the staged socket probe and — when
the probe handshakes — downloads the daemon's own bundle over the
DiagBundleTarZst subsystem, nesting it under providers/<name>/guest/.
--no-guest skips daemon contact entirely; --guest-timeout-secs bounds
each provider's download. Host-side log-prefix skips are deferred until
the provider loop settles whether the daemon's logs reached the bundle
another way, so the manifest never claims an absence the archive does
not back.

Squashed rebuild of the original branch onto main after #878 landed
there, replacing the merge-heavy history whose #889 squash title also
failed commitlint.

Refs: #802

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(minimald): return the served contract from the diag bundle handler

PR #895 changed the serve! dispatch so every handler returns
Result<(), ConnectionError> for outcome logging; PR #878 merged
alongside it with serve_stream_diag_bundle still returning (). The two
were each green against a main that lacked the other, and the type
mismatch only surfaced on branches built after both landed.

Failure still relays the message over the channel's extended-data
stream before surfacing as ConnectionError::Internal, mirroring
serve_stream_workspace_files.

Refs: #878, #895

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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