Skip to content

Commit aa5fc98

Browse files
committed
πŸ› fix(command): update action env warning prefix
1 parent d7bcfa8 commit aa5fc98

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

β€Žapp/triggers/providers/command/Command.test.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ test('should log shell execution security warning once on first command trigger
102102
await cmd.trigger({ name: 'test', id: '2' });
103103

104104
const securityWarningCalls = warnSpy.mock.calls.filter(([message]) =>
105-
String(message).includes('Security: Command trigger executes DD_TRIGGER_COMMAND_* cmd'),
105+
String(message).includes('Security: Command trigger executes DD_ACTION_COMMAND_* cmd'),
106106
);
107107
expect(securityWarningCalls).toHaveLength(1);
108108
});

β€Žapp/triggers/providers/command/Command.tsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Command extends Trigger<CommandConfiguration> {
6767

6868
hasLoggedShellExecutionWarning = true;
6969
this.log.warn(
70-
`Security: Command trigger executes DD_TRIGGER_COMMAND_* cmd using ${this.configuration.shell} -c with drydock process privileges. Use only trusted command strings and interpolated values.`,
70+
`Security: Command trigger executes DD_ACTION_COMMAND_* cmd using ${this.configuration.shell} -c with drydock process privileges. Use only trusted command strings and interpolated values.`,
7171
);
7272
}
7373

@@ -127,7 +127,7 @@ class Command extends Trigger<CommandConfiguration> {
127127
try {
128128
const { stdout, stderr } = await new Promise<{ stdout: string; stderr: string }>(
129129
(resolve, reject) => {
130-
// Intentional admin-controlled shell execution from DD_TRIGGER_COMMAND_* env configuration.
130+
// Intentional admin-controlled shell execution from DD_ACTION_COMMAND_* env configuration.
131131
execFile(
132132
this.configuration.shell,
133133
['-c', this.configuration.cmd],

0 commit comments

Comments
Β (0)