Skip to content

Reject shell operators in read-only exec commands#367

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-read-only-shell-operators
Open

Reject shell operators in read-only exec commands#367
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:codex/fix-read-only-shell-operators

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Summary

  • reject read-only exec commands that contain shell control operators such as redirects, pipes, command chaining, background execution, command substitution, or newlines
  • keep simple read-only commands and quoted literal operator text working
  • add regression coverage for the redirection/chaining bypass cases
  • fix the stale agent command test import needed for current main test builds

Fixes PlatformNetwork/bounty-challenge#53178.

Validation

  • cargo fmt --package cortex-cli --check
  • cargo test --package cortex-cli exec_cmd::autonomy::tests -- --nocapture
  • cargo check --package cortex-cli --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