Mask each line of multi-line secrets (#208)
* Mask each line of multi-line secrets * Don't include carriage return characters in masking * Update CHANGELOG.md
This commit is contained in:
@@ -77,8 +77,12 @@ async function exportSecrets() {
|
||||
const { value, request, cachedResponse } = result;
|
||||
if (cachedResponse) {
|
||||
core.debug('ℹ using cached response');
|
||||
}
|
||||
command.issue('add-mask', value);
|
||||
}
|
||||
for (const line of value.replace(/\r/g, '').split('\n')) {
|
||||
if (line.length > 0) {
|
||||
command.issue('add-mask', line);
|
||||
}
|
||||
}
|
||||
if (exportEnv) {
|
||||
core.exportVariable(request.envVarName, `${value}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user