gitlab.security_code_scan.SCS0001-1
unknown
Download Count*
License
The highlighted API is used to execute a system command. If unfiltered input is passed to this API, it can lead to arbitrary command execution.
Run Locally
Run in CI
Defintion
rules:
- id: security_code_scan.SCS0001-1
patterns:
- pattern-inside: |
using System.Diagnostics;
...
- pattern-either:
- patterns:
- pattern: Process.Start($ARG)
- pattern-not: Process.Start("...")
- pattern: (Process $PROC).StartInfo.FileName = <...$ARG...>;
- pattern: (Process $PROC).StartInfo.Arguments = <...$ARG...>;
- patterns:
- pattern-inside: |
$PSINFO = new ProcessStartInfo(...)
...
Process.Start($PSINFO)
- pattern-either:
- pattern: $PSINFO.Arguments = <...$ARG...>;
- pattern: $PSINFO.FileName = <...$ARG...>;
message: >
The highlighted API is used to execute a system command. If unfiltered
input is passed to this
API, it can lead to arbitrary command execution.
languages:
- csharp
severity: ERROR
metadata:
category: security
cwe: "CWE-78: Improper Neutralization of Special Elements used in an OS Command
('OS Command Injection')"
license: MIT
Short Link: https://sg.run/WbD2