mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-11-29 11:24:23 +01:00
fix: omit account IDs from the allowed-account-ids failure message
The mismatch error is thrown before exportAccountId registers the account-id mask, so setFailed wrote the raw account ID (and the configured allow-list) into a public annotation. (C4)
This commit is contained in:
2 files changed
+7
-10
No files matched your search
+2
-5
@@ -171,11 +171,8 @@ export function validateAccountId(expectedAccountIds: string[] | undefined, acco
|
||||
return;
|
||||
}
|
||||
if (!account || !allowedAccountIds.includes(account)) {
|
||||
throw new Error(
|
||||
`The account ID of the provided credentials (${
|
||||
account ?? 'unknown'
|
||||
}) does not match any of the expected account IDs: ${allowedAccountIds.join(', ')}`,
|
||||
);
|
||||
// Account IDs are deliberately omitted: this error reaches the job log before any mask exists.
|
||||
throw new Error('The account ID of the provided credentials does not match any of the allowed account IDs');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user