Skip to content

SetupUtils: pass chmod arguments to Runtime.exec as an array - #1126

Open
vharseko wants to merge 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:fix/setuputils-chmod-exec-args
Open

SetupUtils: pass chmod arguments to Runtime.exec as an array#1126
vharseko wants to merge 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:fix/setuputils-chmod-exec-args

Conversation

@vharseko

Copy link
Copy Markdown
Member

Runtime.exec(String) splits the concatenated command on whitespace, so a deployment URI containing spaces would be handed to /bin/chmod as several operands. Build the command as a String[] instead.

Closes CodeQL alert java/concatenated-command-line: https://github.com/OpenIdentityPlatform/OpenAM/security/code-scanning/394

Only affects the local ssoadm tools installer (com.sun.identity.tools.bundles.Main); no shell is involved either way, so this is hygiene rather than a security fix.

Runtime.exec(String) splits the concatenated command on whitespace, so a
deployment URI containing spaces would be handed to /bin/chmod as several
operands. Build the command as a String[] instead.

Closes CodeQL alert java/concatenated-command-line
https://github.com/OpenIdentityPlatform/OpenAM/security/code-scanning/394
@vharseko vharseko added java Pull requests that update java code security Security fix or hardening (CVE, GHSA, XSS/CSRF/SSRF) labels Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update java code security Security fix or hardening (CVE, GHSA, XSS/CSRF/SSRF)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant