fix(apps): confine app file operations - #10481
Merged
Merged
Conversation
There was a problem hiding this comment.
💡 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".
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 |
DOsinga
approved these changes
Jul 21, 2026
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:: -- --nocapturecargo build -p goosecargo clippy -p goose --all-targets -- -D warningscargo fmt --all -- --checkgit diff --check origin/main...HEADThis finding was discovered by Project Loupe.