Skip to content

ShellExecutor lacks proper command sanitization #2

@RebecaoDomingos

Description

@RebecaoDomingos

content: ShellExecutor directly executes user-provided commands without sanitization
file: skill/executor/ShellExecutor.kt
code:

val fullCmd = if (args.isEmpty()) command else "$command ${args.joinToString(" ")}"
val process = ProcessBuilder("sh", "-c", fullCmd)

description: This could lead to command injection vulnerabilities. Add input validation and sanitization before executing commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions