github-advanced-security[bot] commented on code in PR #2342:
URL:
https://github.com/apache/incubator-kie-tools/pull/2342#discussion_r1606101518
##########
packages/kie-sandbox-helm-chart/scripts/update-readmes.js:
##########
@@ -0,0 +1,30 @@
+const { execSync } = require("child_process");
+const path = require("path");
+const fs = require("fs");
+
+// Install helm-docs if not installed
+console.log("[kie-sandbox-helm-chart scripts/update-readmes.js] Installing
helm-docs...");
+if (process.platform === "win32") {
+ execSync("where /q helm-docs || go install
github.com/norwoodj/helm-docs/cmd/[email protected]");
+} else {
+ execSync("which helm-docs || go install
github.com/norwoodj/helm-docs/cmd/[email protected]");
+}
+
+const packageRootPath = path.join(__dirname, "..");
+const srcPath = path.join(packageRootPath, "./src");
+
+console.log(srcPath);
+
+console.log("[kie-sandbox-helm-chart scripts/update-readmes.js] Updating
Charts README.md files...");
+execSync(`cd ${srcPath} && helm-docs --document-dependency-values=true -t
templates/README.md.gotmpl`);
Review Comment:
## Shell command built from environment values
This shell command depends on an uncontrolled [absolute path](1).
[Show more
details](https://github.com/apache/incubator-kie-tools/security/code-scanning/779)
--
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]