Fixing string interpolation security risk in test metrics

This commit is contained in:
evanchia
2021-04-22 14:30:15 -07:00
parent f44f06c9f0
commit 8f76dd0f26
+1 -1
View File
@@ -361,7 +361,7 @@ def TestMetrics(Map options, String workspace, String branchName, String repoNam
]
withCredentials([usernamePassword(credentialsId: "${env.SERVICE_USER}", passwordVariable: 'apitoken', usernameVariable: 'username')]) {
def command = "${options.PYTHON_DIR}/python.cmd -u mars/scripts/python/ctest_test_metric_scraper.py " +
"-e jenkins.creds.user ${username} -e jenkins.creds.pass ${apitoken} " +
'-e jenkins.creds.user $username -e jenkins.creds.pass $apitoken ' +
"-e jenkins.base_url ${env.JENKINS_URL} " +
"${cmakeBuildDir} ${branchName} %BUILD_NUMBER% AR ${configuration} ${repoName} "
bat label: "Publishing ${buildJobName} Test Metrics",