mirror of
https://github.com/hashicorp/vault-action.git
synced 2026-05-19 05:51:53 +00:00
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:
parent
f60544fbda
commit
3526e1be65
3 changed files with 46 additions and 2 deletions
|
|
@ -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}`);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue