Skip to content

Enforce resolved material access boundaries - #291

Merged
nahiyankhan merged 1 commit into
mainfrom
fix/ghost-pass1-hardening
Sep 11, 2026
Merged

nahiyankhan merged 1 commit into
mainfrom
fix/ghost-pass1-hardening

Conversation

@nahiyankhan

@nahiyankhan nahiyankhan commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Category: fix
User Impact: Hosts can enforce material-read permissions even when a bundled path is a symlink.

Problem: A bundled symlink could resolve outside the materials directory while retaining bundled permissions and inline limits.

Solution: Classify local material after resolving its real path. Require referenced-file permission and apply the referenced inline limit when the target leaves the materials directory; keep outside-repository targets unavailable.

Compatibility: Internal symlinks remain supported. Pull still inlines eligible referenced text by default; permission-sensitive hosts should use inlineMaterials: false before inspection.

Scope: Narrowed from the original 32-file PR to the material-access fix. The other four concerns have separate draft PRs; this branch targets main.

Related: Preserve guidance meaning in CLI output, Report incomplete guidance loading, Add read-only installed skill checks, Fix and validate rendered guidance examples.

Validation:

  • pnpm run quality:all: passed on this standalone branch, including build, package/release checks, tests (231 passed), workspace builds, and package validations.
  • Pre-commit checks and git diff origin/main...HEAD --check: passed.
  • Fresh dependency installation hit registry checksum errors. Validation used an isolated copy of the existing checkout's dependencies; the lockfile is unchanged.

Changeset: Existing patch changeset retained.

ghost Review: Review packet assembled against apps/docs/.ghost. This package does not bind the changed CLI/test/docs files, so the packet is coverage context, not a passing brand review. Used the current ghost review --package apps/docs/.ghost --base origin/main --format json and inspected ghost manifest; the older ghost check, --include-memory, and dump:cli-help workflows are unavailable in this checkout.

File changes (6 files)
File Purpose
.changeset/material-realpath-policy.md Record the access-policy fix.
packages/ghost/README.md Explain inspection permissions and pull's default inline behavior.
packages/ghost/src/embed/inspect.ts Enforce inspection policy against the resolved material tier.
packages/ghost/src/ghost-core/material-transport.ts Share realpath tier resolution and apply referenced inline limits.
packages/ghost/src/skill-bundle/references/schema.md Document local material access boundaries.
packages/ghost/test/material-access.test.ts Cover internal, escaping, and outside-repository symlinks, permissions, and limits.

Screenshots/Demos: N/A: no visual surface changes.

@nahiyankhan
nahiyankhan force-pushed the fix/ghost-pass1-hardening branch from 6185b8b to 8ef17ce Compare September 9, 2026 04:34
@nahiyankhan nahiyankhan changed the title Harden guidance delivery and material access Enforce resolved material access boundaries Sep 9, 2026
@nahiyankhan
nahiyankhan marked this pull request as ready for review September 11, 2026 05:06
@nahiyankhan
nahiyankhan merged commit a10c5ae into main Sep 11, 2026
6 checks passed
@nahiyankhan
nahiyankhan deleted the fix/ghost-pass1-hardening branch September 11, 2026 05:07
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