GithubHelp home page GithubHelp logo

Comments (3)

milosdjakonovic avatar milosdjakonovic commented on June 17, 2024 1

Definitely needs better approach then what I did initially. New PR will be ready soon.
Basically, public static $extensions should be scanned by default regardless of MIME type.

I have also introduced a non-default --all option to scan absolutely everything readable: according to early estimations, ~3 fold longer scan times on Wordpress site. Speaking for myself, not a big deal.

from php-antimalware-scanner.

marcocesarato avatar marcocesarato commented on June 17, 2024 1

Hi @milosdjakonovic , merged and released on v0.10.0. Thank for your pull request and your support 👍

from php-antimalware-scanner.

milosdjakonovic avatar milosdjakonovic commented on June 17, 2024

It seems to me that PAS is restricting file scan criteria to a set of defined extensions ( public static $extensions ), and then further to text/ MIME.

What do you think about changing this? Maybe it is best to scan everything that is PHP? It does sound good to me but, there is a sub-issue how to do it in practice. An extremely performance-efficient solution would be:

grep -ir "<?php" /path/to/targetdir

and then to construct iterator from returned list, plus PHP fallback for absence of grep command.

Than it would be near complete: the only malware code that would be able to escape this would be php code without open tag, something that would require a different including / executing strategy (rarely existing).

A complete solution would be, yes 😀 scan absolutely everything that is readable, I cannot even get the picture how many times would the scan duration be multiplied.

from php-antimalware-scanner.

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.