github-advanced-security[bot] commented on code in PR #3412:
URL:
https://github.com/apache/incubator-kie-tools/pull/3412#discussion_r2733629030
##########
packages/maven-base/index.js:
##########
@@ -142,10 +142,15 @@
console.info(`[maven-base] Setting property '${key}' with value
'${value}'...`);
console.time(`[maven-base] Setting property '${key}' with value
'${value}'...`);
- const cmd = `mvn versions:set-property -Dproperty=${key}
-DnewVersion=${value} -DgenerateBackupPoms=false ${BOOTSTRAP_CLI_ARGS}`;
+ // Using "sed" instead of "mvn versions:set-property" because Maven fails
if the pom.xml is invalid before setting the property.
+ // This may happen if you're bootstraping the repo with a new
"KOGITO_RUNTIME_version" value before building "packages/drools-and-kogito"
with the previous one, for example.
+ const cmd = `sed -i 's|<${key}>.*</${key}>|<${key}>${value}</${key}>|g'
pom.xml`;
Review Comment:
## Unsafe shell command constructed from library input
This string concatenation which depends on [library input](1) is later used
in a [shell command](2).
This string concatenation which depends on [library input](1) is later used
in a [shell command](2).
This string concatenation which depends on [library input](1) is later used
in a [shell command](2).
This string concatenation which depends on [library input](1) is later used
in a [shell command](2).
This string concatenation which depends on [library input](1) is later used
in a [shell command](2).
[Show more
details](https://github.com/apache/incubator-kie-tools/security/code-scanning/1045)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]