BUGFIX: Hide secrets from output
Security vulnerability
This commit is contained in:
parent
ad7dad9e54
commit
86f0e9bd50
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -1921,7 +1921,7 @@
|
||||||
"node_modules/@types/minimatch": {
|
"node_modules/@types/minimatch": {
|
||||||
"version": "3.0.5",
|
"version": "3.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz",
|
||||||
"integrity": "sha512-fKlz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==",
|
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
|
|
|
@ -406,6 +406,13 @@ class Job extends Repository
|
||||||
if ($manual === true) {
|
if ($manual === true) {
|
||||||
$flags[] = Run::MANUAL;
|
$flags[] = Run::MANUAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove secrets from output
|
||||||
|
foreach($job['data']['vars'] as $key => $var) {
|
||||||
|
if ($var['issecret']) {
|
||||||
|
$result['output'] = str_replace($var['value'], '{'.$key.'}', $result['output']);
|
||||||
|
}
|
||||||
|
}
|
||||||
// saving to database
|
// saving to database
|
||||||
$runRepo = new Run($this->dbcon);
|
$runRepo = new Run($this->dbcon);
|
||||||
$runRepo->addRun($job['id'], $result['exitcode'], floor($starttime), $runtime, $result['output'], $flags);
|
$runRepo->addRun($job['id'], $result['exitcode'], floor($starttime), $runtime, $result['output'], $flags);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user