-
Notifications
You must be signed in to change notification settings - Fork 431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add security-checker using Composer Audit #1122
Add security-checker using Composer Audit #1122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Looks like a nice addition.
I've added a couple of small remarks here and there. Can you take a second look at them.
working_dir: ./ | ||
``` | ||
|
||
**format** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this one (with default value) to the code sample as well - for completeness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this.
]; | ||
} | ||
|
||
public function provideExternalTaskRuns(): iterable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal of this test is to check what impact a change in configuraton has on the executed command.
Can you add a test for every configuration option as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! added tests for the options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great feature, 👍
Just 2 littles comments.
|
||
yield 'working-dir' => [ | ||
[ | ||
'working_dir' => './', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./
Is the default value, can you test with src/
for example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually might need help here. When manually testing to another path the option works. But when modifying the test to another path I wasn't able to get the test to pass yet.
Also a side note, I think it might be a good idea for this to be fully optional ( default to null) but would require more logic to check the path for a changed composer.lock file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably take a look at
grumphp/src/Task/ComposerScript.php
Line 30 in 9fb0b10
$resolver->addAllowedTypes('working_directory', ['null', 'string']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is addressed now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGFM 👍
Looks good, thanks! |
Add security-checker using Composer Audit
https://getcomposer.org/doc/03-cli.md#audit
New Task Checklist:
run()
method readable?run()
method using the configuration correctly?