Skip to content

Commit 2b29829

Browse files
CopilotT-Gro
andcommitted
Add security clarification comments for buildScript usage
Added comments to clarify that buildScript comes from pipeline YAML configuration, not external user input, making Invoke-Expression safe in this context. Co-authored-by: T-Gro <[email protected]>
1 parent afb28cf commit 2b29829

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

eng/templates/regression-test-jobs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ jobs:
6161
Get-ChildItem -Name
6262
6363
# Check if buildScript is a built-in dotnet command or a file-based script
64+
# Note: buildScript comes from the pipeline YAML configuration (testMatrix parameter),
65+
# not from external user input, so it's safe to use
6466
$buildScript = "${{ item.buildScript }}"
6567
if ($buildScript -like "dotnet*") {
6668
Write-Host "Build command is a built-in dotnet command: $buildScript"
@@ -154,6 +156,8 @@ jobs:
154156
$buildScript = "${{ item.buildScript }}"
155157
156158
# Check if it's a built-in dotnet command or a file-based script
159+
# Note: buildScript comes from the pipeline YAML configuration (testMatrix parameter),
160+
# not from external user input, so using Invoke-Expression is safe here
157161
if ($buildScript -like "dotnet*") {
158162
Write-Host "Executing built-in command: $buildScript"
159163
Invoke-Expression $buildScript

0 commit comments

Comments
 (0)