Skip to content

Validate app-server read file paths#366

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-read-file-path-validation
Open

Validate app-server read file paths#366
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-read-file-path-validation

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Summary

  • validate app-server /files/read paths with the existing path safety helper before checking or reading files
  • read from the validated canonical path so disallowed absolute/system paths are rejected instead of exposed
  • add regression coverage for allowed temp reads and rejected Unix system paths

Fixes PlatformNetwork/bounty-challenge#53217.

Validation

  • cargo fmt --package cortex-app-server --check
  • cargo test --package cortex-app-server api::files -- --nocapture
  • cargo test --package cortex-app-server -- --nocapture
  • cargo check --package cortex-app-server --lib
  • git diff --check

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant