Skip to content

Rust: Add command injection query (CWE-078) - #22323

Open
lcmangalagiri wants to merge 2 commits into
github:mainfrom
lcmangalagiri:rust-cwe-078-command-injection
Open

Rust: Add command injection query (CWE-078)#22323
lcmangalagiri wants to merge 2 commits into
github:mainfrom
lcmangalagiri:rust-cwe-078-command-injection

Conversation

@lcmangalagiri

Copy link
Copy Markdown

Detects user-controlled data flowing into std::process::Command and tokio::process::Command (both command name and arguments).

Query include:

  1. Extension library with sources, sinks, and barriers
  2. Models-as-data sinks for Command::new, .arg(), .args() (std + tokio)
  3. Query help (.qhelp) with examples
  4. Test cases with inline expectations

Query ID: rust/command-line-injection

Detects user-controlled data flowing into std::process::Command and
tokio::process::Command (both command name and arguments).

- Extension library with sources, sinks, and barriers
- Models-as-data sinks for Command::new, .arg(), .args() (std + tokio)
- Query help (.qhelp) with examples
- Test cases with inline expectations

Query ID: rust/command-line-injection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant