Skip to content

Commit a9efdf2

Browse files
authored
System.CommandLine: add notes based on Threat Model review (#48184)
1 parent 16fb24d commit a9efdf2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/standard/commandline/how-to-configure-the-parser.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ They are exposed by the <xref:System.CommandLine.ParseResult.Configuration?displ
3131

3232
[Response files](syntax.md#response-files) are enabled by default, but you can disable them by setting the <xref:System.CommandLine.ParserConfiguration.ResponseFileTokenReplacer> property to `null`. You can also provide a custom implementation to customize how response files are processed.
3333

34+
Response file can contain other response file names, hence parsing might include opening other files. The library expects that all response files were generated and stored by trustworthy agents.
35+
3436
## InvocationConfiguration
3537

3638
### Standard output and error

docs/standard/commandline/syntax.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ A token can contain spaces if it's enclosed in quotation marks (`"`). Here's an
4343
dotnet tool search "ef migrations add"
4444
```
4545

46+
The symbol hierarchy (commands, options, arguments) is considered to be trusted input; the token values are not.
47+
4648
## Commands
4749

4850
A *command* in command-line input is a token that specifies an action or defines a group of related actions. For example:

0 commit comments

Comments
 (0)