Skip to content

fix(apps): confine app file operations - #10481

Merged
jbg merged 2 commits into
mainfrom
jbg/security-app-path-containment
Jul 21, 2026
Merged

fix(apps): confine app file operations#10481
jbg merged 2 commits into
mainfrom
jbg/security-app-path-containment

Conversation

@jbg

@jbg jbg commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Confine app resource loading, provider-generated app saves, and app deletion to a single validated file name under the apps data directory.

The shared path builder rejects traversal, absolute paths, multi-component names, cross-platform separators, and Windows drive prefixes before any filesystem operation. Legitimate lowercase/hyphenated app names continue to support the full save, load, resource-read, and delete lifecycle.

Regression coverage exercises all three affected operations with traversal, absolute, slash/backslash, and drive-prefix inputs, plus valid lifecycle behavior.

Tests:

  • cargo test -p goose --lib agents::platform_extensions::apps::tests:: -- --nocapture
  • cargo build -p goose
  • cargo clippy -p goose --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check origin/main...HEAD

This finding was discovered by Project Loupe.

@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: e13c6c3ae0

ℹ️ 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 crates/goose/src/agents/platform_extensions/apps.rs
@jbg
jbg requested a review from DOsinga July 15, 2026 09:40
@DOsinga

DOsinga commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

this seems fine, but it feels like we might need a more general approach here for validating paths rather than sprinkle them on one by one for every API call where we think need protection, apart from the fact that if an attacker can create apps we're of course already hosed

@jbg
jbg merged commit 65e1e3d into main Jul 21, 2026
26 checks passed
@jbg
jbg deleted the jbg/security-app-path-containment branch July 21, 2026 11:35
michaelneale added a commit that referenced this pull request Jul 22, 2026
* origin/main:
  fix(ui): clear stale pending ACP connection after terminal recovery failure (#10552)
  Make provider smoke tests faster and more reliable (#10605)
  fix(acp): confirm pending steer message on queuedSteer notification (#10532)
  chore(deps): bump body-parser from 1.20.5 to 1.20.6 in /documentation (#10601)
  chore(deps): bump webpack-dev-server from 5.2.5 to 5.2.6 in /documentation (#10593)
  feat(compaction): structured summary output with template rendering (#10471)
  feat(skills): allow disabling built-in skills (#10600)
  fix: apply hermit env directly in node shims so a fish login shell doesn't break MCP startup (#10028)
  chore(release): bump version to 1.44.0 (minor) (#10597)
  fix(extensions): preserve command arguments through forms (#10527)
  fix(permissions): enforce manual approval for code mode (#10528)
  fix(apps): confine app file operations (#10481)
  fix(local-inference): preserve featured model size on delete and backfill missing sizes (#10422)
  refactor(acp): extract tool call handling from server (#10574)
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.

2 participants