Claude/fix argument parsing 01 dw1t4 n33m s5g13c sr8u y bw#10
Conversation
Implements command-specific parsing to correctly distinguish file paths from other arguments (e.g., grep patterns, echo text). - Added extractFilePaths() method with per-command parsing logic - Handles grep (pattern vs files), find (directory vs predicates), dd (if=/of= syntax), test commands (operators), etc. - Fixes issue where any non-flag arg was incorrectly treated as file path This is work in progress - discussing with user whether command-based filtering should be removed entirely vs improved.
The previous approach of parsing command arguments to validate file access was fundamentally flawed and caused bugs like incorrectly treating grep patterns as file paths (e.g., grep "pattern" file.txt). Changes: - Removed extractFilePaths() method with command-specific parsing logic - Removed validateCommand() method that attempted to validate file access - Updated CI mode to clearly warn that sandboxing is disabled - Updated security tests to skip when running in CI mode - Added documentation that CI environments run without sandboxing The command-based validation was security theater that: 1. Could be bypassed with shell redirections, symlinks, etc. 2. Broke legitimate use cases (grep, echo, find, etc.) 3. Was impossible to maintain for all command syntaxes Real security comes from bubblewrap isolation. In CI environments without bubblewrap support, users should use Docker containers.
60be10b
into
claude/add-code-sandboxing-018YT8W7GWG2yyi4JKSvpQAS
Summary of ChangesHello @soodoku, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refines the application's behavior in Continuous Integration (CI) environments by adapting its sandboxing and security validation mechanisms. Recognizing that robust sandboxing tools like Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request makes a significant change to the sandboxing behavior in CI environments. It removes a brittle, blacklist-based command validation in favor of disabling sandboxing entirely in CI and adding prominent warnings. This is a good change that improves clarity and avoids a false sense of security. My review includes one high-severity comment pointing out that while the intent is to skip security tests in CI, only one test was updated, which will lead to CI failures. The other security tests need to be updated as well.
No description provided.