Skip to content

Add parameter array to prevent command injection#21920

Open
sanjuyadav24 wants to merge 3 commits intomasterfrom
users/sanjuyadav/task_cmd_injection
Open

Add parameter array to prevent command injection#21920
sanjuyadav24 wants to merge 3 commits intomasterfrom
users/sanjuyadav/task_cmd_injection

Conversation

@sanjuyadav24
Copy link
Contributor

@sanjuyadav24 sanjuyadav24 commented Mar 11, 2026

Context

This PR addresses CWE-78 (OS Command Injection) vulnerabilities in three Azure Pipelines tasks where user-controlled inputs were being passed to shell execution via string interpolation (child_process.execSync with template literals or tl.execSync with string arguments).


Task Name

JavaToolInstallerV0
AzureResourceManagerTemplateDeploymentV3
AzureContainerAppsV1


Description

Converts shell-based command execution to array-based argument passing to eliminate OS command injection vectors:


Risk Assessment (Low / Medium / High)

Low


Change Behind Feature Flag (Yes / No)

No


Tech Design / Approach

NA


Documentation Changes Required (Yes/No)

NA


Unit Tests Added or Updated (Yes / No)

NA


Additional Testing Performed

Tested via canarytest pipeline


Logging Added/Updated (Yes/No)

No


Telemetry Added/Updated (Yes/No)

No


Rollback Scenario and Process (Yes/No)

NA


Dependency Impact Assessed and Regression Tested (Yes/No)

Yes


Checklist

  • Related issue linked (if applicable)
  • Task version was bumped — see versioning guide
  • Verified the task behaves as expected

@sanjuyadav24
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s), but failed to run 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant