-
-
Notifications
You must be signed in to change notification settings - Fork 27
phpcs-security-audit > Add Security ruleset to phpcs #345
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
Conversation
Why composer-bin-plugin cannot be used? |
Apologies, I didn't fully understand how I could also change
|
Please, do that. Thanks! |
|
Note: Should the namespace I'm adding be |
|
I'm having a bit of trouble after running |
|
My bad, v2.0.1 doesn't actually require |
|
Looks good. Ready? |
|
@mihai-stancu you might want to clean up your branch. Perhaps rebase? Also, it seems that your commiter email address is not connected to your github account. |
|
Hey, I experimented a bit last night and was waiting for the Scrutinizer check to pass in the morning. I'll rebase soon. 10ks. |
|
The PR looks clean now after the rebase. All good? |
|
@mihai-stancu can you do one more thing for me and run |
|
I've done that, but there's a catch -- by adding the phpcodesniffer-composer-install plugin explicitly as a tool in the Is there a way to specify that it shouldn't? |
|
That's fine. Keep it simple. |
|
So should we let the |
|
Yes, please. Let's not make exceptions. We already list other "pre-installation" type of tools. |
|
Thank you @mihai-stancu 🍺 |
**Breaking changes**: * Install larastan in a separate namespace with its own phpstan installation. Phpstan installation with larastan is available as . jakzal/toolbox#349 Updates: * psalm (4.6.0 -> 4.6.1) jakzal/toolbox#351 New tools: * phpcs-security-audit - [Finds vulnerabilities and weaknesses related to security in PHP code](https://github.com/FloeDesignTechnologies/phpcs-security-audit) jakzal/toolbox#345 (thank you @mihai-stancu) * phpcodesniffer-composer-install - [Easy installation of PHP_CodeSniffer coding standards (rulesets).](https://github.com/Dealerdirect/phpcodesniffer-composer-installer) jakzal/toolbox#345 (thank you @mihai-stancu)
Hello,
I'd like to propose the addition of a
phpcssecurity ruleset provided by FloeDesignTechnologies here.Approach
Since it's a
phpcsruleset it's not a standalone command so it cannot be installed viaphar-downloadorcomposer-bin-pluginso I usedcomposer-global-installwhich incidentally also installssquizlabs/PHP_CodeSnifferas a dependency.Drawbacks
The package also requires
dealerdirect/phpcodesniffer-composer-installerwhich normally would configurephpcsto recognize the new ruleset but since it does that by discovering wherephpcsis installed via composer it will not discover the correctphpcsbinary (from/tools). So I also executed ashline to correcly configurephpcs.There seem to be a lot of drawbacks to this approach. The only alternative I see would be downloading rulesets separately. Please advise.