Giter Club home page Giter Club logo

Comments (4)

jmarcil avatar jmarcil commented on August 16, 2024

I confirm this issue. Took me a while to figure out what was the problem.

Currently we have a namespace issue that breaks the way PHPCS is working.

PR #14 seem to have caused it. I asked the author to validate and update.

from phpcs-security-audit.

jmarcil avatar jmarcil commented on August 16, 2024

When this bug is fixed, we should be able to change severity on those different levels:

<rule ref="Security">
<severity>8</severity>
</rule>

<rule ref="Security.BadFunctions">
<severity>8</severity>
</rule>

<rule ref="Security.BadFunctions.EasyXSS">
<severity>8</severity>
</rule>

<rule ref="Security.BadFunctions.EasyXSS.EasyXSSwarn">
<severity>8</severity>
</rule>

from phpcs-security-audit.

b-roberts avatar b-roberts commented on August 16, 2024

I agree, the severity levels do not work. This appears to be caused by the namespacing implemented in #14.

The severity is ultimately referenced by this line in PHPCS:
$listenerCode = Util\Common::getSniffCode($this->activeListener);
which is based off of the fully qualified class name of the sniff, for example: PHPCS_SecurityAudit.BadFunctions.NoEvals

In order to fix this the entire project would need to be refactored to the Security namespace or the Security Folder would need to be renamed to PHPCS_SecurityAudit

Either fix would almost certainly break compatibility with any existing integrations.

from phpcs-security-audit.

jrfnl avatar jrfnl commented on August 16, 2024

Please consider my proposal in issue #47. What I'm proposing there would/should - aside from removing the symlink hack and updating the install instructions - have no impact on existing integrations. Rulesets referencing the sniffs in this standard would still work or rather, will start working again.

from phpcs-security-audit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.