dotnet / dotnet/msbuild

Provide a method to execute an external command without using a shell

Open
#399 6 comments 3 reactions 0 assignees View on GitHub
help wanted needs-design triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 6h
Merged PRs (30d)
139

Description

The `Exec` task always spawns a shell to invoke the external command. This is convenient, but non-portable, insecure (though not exploitable here), and requires non-portable escaping.

A better solution is to provide a way to execute an external command without using a shell. It should have the following properties:
- Lists are respected.
- Any character can be passed to an external command. No manual escaping required.
- Special characters in property values do not cause problems.
- No shell is invoked, unless the external command _is_ the shell.
- It should be possible to pass multiple arguments to the shell
- The syntax should be something other than requiring a seperate XML element per argument.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.