---
title: "invalid-exec-command"
description: "Detect shell commands used as exec.Command program names."
image: "https://strider.gempir.com/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://strider.gempir.com/llms.txt
> Use this file to discover all available pages before exploring further.

# invalid-exec-command

**Default severity:** `warning`

`exec.Command` expects one executable name or path, not a shell command that
needs argument splitting.

## Bad

```go
exec.Command("ls / /tmp")
```

## Good

```go
exec.Command("ls", "/", "/tmp")
```

Source: https://strider.gempir.com/analyzers/invalid-exec-command/index.mdx
