spiritxishi opened a new issue, #12148:
URL: https://github.com/apache/inlong/issues/12148

   ### Description
   
   
   ### Background
   `ExcuteLinux.exeCmd()` currently executes commands via `/bin/sh -c` with no 
input filtering, allowing arbitrary shell injection when command strings 
originate from untrusted sources (e.g., ModuleConfig distributed by Manager).
   
   **Affected Code:**
   `inlong-agent/agent-common/.../utils/ExcuteLinux.java:34`
   
   ### Proposed Fix
   Replace `/bin/sh -c` with `ProcessBuilder` + explicit argument arrays to 
eliminate shell injection vectors.
   
   ### Acceptance Criteria
   - [ ] `exeCmd()` uses `ProcessBuilder` with argument arrays instead of shell 
string concatenation
   - [ ] Existing callers work without functional regression
   - [ ] Unit tests cover edge cases (special characters, spaces, pipes, etc.)
   
   ### InLong Component
   
   InLong Agent
   
   ### Are you willing to submit PR?
   
   - [x] Yes, I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to