Skip to content

Commit 857f298

Browse files
Fix Security Checker Enlightn Allow List
Error: Allow list didn't work with more than one entry Caused by: list was passed as "--allow-list=allow_advisory_1,allow_advisory_2" but arguments "--allow-list=allow_advisory_1" "--allow-list=allow_advisory_2" were expected See: https://github.com/enlightn/security-checker?tab=readme-ov-file#allow-vulnerabilities
1 parent cb139d7 commit 857f298

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/Task/SecurityCheckerEnlightn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function run(ContextInterface $context): TaskResultInterface
5252
$arguments = $this->processBuilder->createArgumentsForCommand('security-checker');
5353
$arguments->add('security:check');
5454
$arguments->addOptionalArgument('%s', $config['lockfile']);
55-
$arguments->addOptionalCommaSeparatedArgument('--allow-list=%s', $config['allow_list']);
55+
$arguments->addArgumentArray('--allow-list=%s', $config['allow_list']);
5656

5757
$process = $this->processBuilder->buildProcess($arguments);
5858
$process->run();

test/Unit/Task/SecurityCheckerEnlightnTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ public function provideExternalTaskRuns(): iterable
116116
[
117117
'security:check',
118118
'./composer.lock',
119-
'--allow-list=allow_advisory_1,allow_advisory_2'
119+
'--allow-list=allow_advisory_1',
120+
'--allow-list=allow_advisory_2',
120121
]
121122
];
122123
}

0 commit comments

Comments
 (0)