Merge pull request #24795 from backstage/blam/redact-to-stars
chore: Updating the redaction message to something a little less dramatic
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
'@backstage/backend-app-api': patch
|
||||
---
|
||||
|
||||
Updating the logger redaction message to something less dramatic
|
||||
@@ -50,7 +50,7 @@ describe('WinstonLogger', () => {
|
||||
expect.objectContaining({
|
||||
[MESSAGE]: JSON.stringify({
|
||||
level: 'error',
|
||||
message: '[REDACTED]) from this file',
|
||||
message: '***) from this file',
|
||||
}),
|
||||
}),
|
||||
expect.any(Function),
|
||||
@@ -83,10 +83,10 @@ describe('WinstonLogger', () => {
|
||||
[MESSAGE]: JSON.stringify({
|
||||
level: 'error',
|
||||
message: 'something went wrong',
|
||||
nested: '[REDACTED] (world) from nested object',
|
||||
nested: '*** (world) from nested object',
|
||||
null: null,
|
||||
nullProto: {
|
||||
foo: '[REDACTED] foo',
|
||||
foo: '*** foo',
|
||||
},
|
||||
}),
|
||||
}),
|
||||
|
||||
@@ -92,7 +92,7 @@ export class WinstonLogger implements RootLoggerService {
|
||||
return obj;
|
||||
}
|
||||
|
||||
obj[MESSAGE] = obj[MESSAGE]?.replace?.(redactionPattern, '[REDACTED]');
|
||||
obj[MESSAGE] = obj[MESSAGE]?.replace?.(redactionPattern, '***');
|
||||
|
||||
return obj;
|
||||
})(),
|
||||
|
||||
@@ -272,10 +272,7 @@ export class NunjucksWorkflowRunner implements WorkflowRunner {
|
||||
|
||||
if (task.isDryRun) {
|
||||
const redactedSecrets = Object.fromEntries(
|
||||
Object.entries(task.secrets ?? {}).map(secret => [
|
||||
secret[0],
|
||||
'[REDACTED]',
|
||||
]),
|
||||
Object.entries(task.secrets ?? {}).map(secret => [secret[0], '***']),
|
||||
);
|
||||
const debugInput =
|
||||
(step.input &&
|
||||
|
||||
@@ -114,7 +114,7 @@ export class WinstonLogger implements RootLoggerService {
|
||||
return obj;
|
||||
}
|
||||
|
||||
obj[MESSAGE] = obj[MESSAGE]?.replace?.(redactionPattern, '[REDACTED]');
|
||||
obj[MESSAGE] = obj[MESSAGE]?.replace?.(redactionPattern, '***');
|
||||
|
||||
return obj;
|
||||
})(),
|
||||
|
||||
Reference in New Issue
Block a user