Skip to content

Commit 21f251a

Browse files
authored
Merge pull request #275 from crazy-max/redact-aws-creds
aws: ensure temp credentials redacted in workflow logs
2 parents be010b4 + 07cad18 commit 21f251a

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/aws.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ export const getRegistriesData = async (registry: string, username?: string, pas
9696
}
9797
const authToken = Buffer.from(authTokenResponse.authorizationData.authorizationToken, 'base64').toString('utf-8');
9898
const creds = authToken.split(':', 2);
99+
core.setSecret(creds[0]); // redacted in workflow logs
100+
core.setSecret(creds[1]); // redacted in workflow logs
99101
return [
100102
{
101103
registry: 'public.ecr.aws',
@@ -122,6 +124,8 @@ export const getRegistriesData = async (registry: string, username?: string, pas
122124
for (const authData of authTokenResponse.authorizationData) {
123125
const authToken = Buffer.from(authData.authorizationToken || '', 'base64').toString('utf-8');
124126
const creds = authToken.split(':', 2);
127+
core.setSecret(creds[0]); // redacted in workflow logs
128+
core.setSecret(creds[1]); // redacted in workflow logs
125129
regDatas.push({
126130
registry: authData.proxyEndpoint || '',
127131
username: creds[0],

0 commit comments

Comments
 (0)