Git Product home page Git Product logo

Comments (6)

dryabov avatar dryabov commented on July 18, 2024

The problem is in very simple regex in JAMSS (\$\w[^;=\)]*=[^;=\)]*`.*`), unlikely it may be fixed easily. The proper way is to use token_get_all and search for ` token there, but it's out of JAMSS approach.

from jedchecker.

Llewellynvdm avatar Llewellynvdm commented on July 18, 2024

The sample code does not seem to have the ` or what am I missing...

from jedchecker.

anibalsanchez avatar anibalsanchez commented on July 18, 2024

@dryabov A new case related to backticks and images:

#001 /joomhelper360/assets/css/ajax-loader.gif in line: 26
? Pattern found#24 - PHP execution operator: backticks (``)

from jedchecker.

dryabov avatar dryabov commented on July 18, 2024

I know, there is a lot of false-positives with this rule, because it just finds $ followed by = and two `s (at any distances). That's why the warning message may contain a code that doesn't contain ` at all, because of it may be located many lines below (usually inside of a quoted string).

from jedchecker.

Llewellynvdm avatar Llewellynvdm commented on July 18, 2024

in that case, just giving the file path and not the code will be more helpful... so that we do self investigation. Since seeing the code, and not seeing the issue make one ignore it, and that is bad.

from jedchecker.

dryabov avatar dryabov commented on July 18, 2024

My current idea is to implement a concept of "scopes" for JAMSS rules, e.g. the check of PHP embedded into a GIF file requires to analyze the entire file (a "full" scope), and this check for backticks requires to analyze PHP code only (a "code" scope, i.e. excluding HTML and quoted strings). As a result, most of false-positives will be eliminated.

from jedchecker.

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.