Skip to content

Commit a723675

Browse files
Copilotdermatz
andcommitted
#fix - Address command injection vulnerability in MagentoStandard Builder
Co-authored-by: dermatz <6103201+dermatz@users.noreply.github.com>
1 parent 42d5221 commit a723675

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/Service/ThemeBuilder/MagentoStandard/Builder.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,17 @@ public function build(string $themePath, SymfonyStyle $io, OutputInterface $outp
4949
try {
5050
if ($isVerbose) {
5151
$io->text('Running grunt clean...');
52+
$this->shell->execute('node_modules/.bin/grunt clean');
53+
} else {
54+
$this->shell->execute('node_modules/.bin/grunt clean --quiet');
5255
}
53-
// Use --quiet only in non-verbose mode to suppress routine output
54-
$quietFlag = $isVerbose ? '' : '--quiet';
55-
$this->shell->execute("node_modules/.bin/grunt clean $quietFlag");
5656

5757
if ($isVerbose) {
5858
$io->text('Running grunt less...');
59+
$this->shell->execute('node_modules/.bin/grunt less');
60+
} else {
61+
$this->shell->execute('node_modules/.bin/grunt less --quiet');
5962
}
60-
$this->shell->execute("node_modules/.bin/grunt less $quietFlag");
6163

6264
if ($isVerbose) {
6365
$io->success('Grunt tasks completed successfully.');

0 commit comments

Comments
 (0)