The Exakat Engine : smart static analysis for PHP

Overview

Exakat

The Exakat Engine is an automated code reviewing engine for PHP.

Installation

Installation with the phar

Phar is the recommended installation process.

The Exakat engine is distributed as a phar archive, that contains all the needed PHP code.

The rest of the installation (Gremlin-server) is detailled in the installation documentation.

The quick installation guide is the following (command line, MacOS. See docs for more options):

mkdir exakat
cd exakat
curl -o exakat.phar https://www.exakat.io/versions/index.php?file=latest
curl -o apache-tinkerpop-gremlin-server-3.4.7-bin.zip https://www.exakat.io/versions/apache-tinkerpop-gremlin-server-3.4.7-bin.zip
unzip apache-tinkerpop-gremlin-server-3.4.7-bin.zip
mv apache-tinkerpop-gremlin-server-3.4.7 tinkergraph
rm -rf apache-tinkerpop-gremlin-server-3.4.7-bin.zip

# Optional : install neo4j engine.
cd tinkergraph
./bin/gremlin-server.sh install org.apache.tinkerpop neo4j-gremlin 3.4.7
cd ..

php exakat.phar doctor

Run online

Projects smaller than 10k lines of code may be tested online, with the most recent version of exakat.

Contribute

See CONTRIBUTING.md for information on how to contribute to the Exakat engine.

Changelog

See Changelog.txt for information on how to contribute to the Exakat engine.

Comments
  • How to exclude analyzers?

    How to exclude analyzers?

    I am not sure if this parameter is for that purpose because is not documented https://github.com/exakat/exakat/blob/master/projects/test/config.ini#L23 but I want that specific analyzers are not executed but I cannot find a documentation for that.

    opened by Mte90 15
  • No reports after execution using code from your documentation

    No reports after execution using code from your documentation

    Hi,

    I installed exakat on ubuntu 16.04. This is report from exakat doctor: https://pastebin.com/FR7MVBfY The first issue which I had was that this command: php exakat.phar init -p sculpin -R https://github.com/sculpin/sculpin didn't clome given repository, so entered code dir and put git clone in terminal. After that I run: php exakat.phar project -p sculpin And there was few progress bar and script ended without error, but there is no dir like: projects/sculpin/report. Why report didn't generate?

    Best regards, KS

    opened by kstalega 14
  • Error: gremlin-php driver : Connection refused

    Error: gremlin-php driver : Connection refused

    Hello, when I run Exakat, I receive the next error:

    Error : gremlin-php driver has thrown the following error : Connection refused 
    on file phar:///usr/src/exakat/exakat.phar/vendor/brightzone/gremlin-php/src/Connection.php
    on line 845
    

    I receive this error also when I use docker container

    Verbose log

    Cleaning project
    Cleaning project nlptools
    removing log
    removing datastore.sqlite
    Removed 1 files
    Recreating database
    Search for external libraries
    Processing files
    No files to process. Aborting
    Running project 'nlptools'
    Running the following analysis : CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, CompatibilityPHP70, CompatibilityPHP71, CompatibilityPHP72, Analyze, Preferences, Appinfo, Appcontent, "Dead code", Security, Custom, CompatibilityPHP73, Inventory, Performances, Dead code, Suggestions
    Producing the following reports : Ambassador
    Cleaning DB
    start gremlin server 3.3.x
    started gremlin server
    Restarted in 20 rounds
    started [32] in 21,031.85 ms
    Running files
    Check composer
    Searching for files
    Found the files
    Check compilation for 71
    Check short tag (normal pass)
    Check short tag (with directive activated)
    Short tag OK
    Check config files
    + .git
    Done
    Array
    (
        [notCompilable52] => N/C
        [notCompilable53] => N/C
        [notCompilable54] => N/C
        [notCompilable55] => N/C
        [notCompilable56] => N/C
        [notCompilable70] => N/C
        [notCompilable71] => 0
        [notCompilable72] => N/C
        [notCompilable73] => N/C
        [php] => 20
    )
    Loading with SplitGraphson
    
    Error : gremlin-php driver has thrown the following error : Connection refused 
    on file phar:///usr/src/exakat/exakat.phar/vendor/brightzone/gremlin-php/src/Connection.php
    on line 845
    
    
    opened by svdubovik 9
  • Error - No code in project

    Error - No code in project

    root@server:~/exakat# php exakat.phar init -p ES51 root@server:~/exakat# php exakat.phar project -p ES51

    Error : No code in project 'ES51' on file phar:///root/exakat/exakat.phar/library/Exakat/Tasks/Files.php on line 57

    Because of what this error?

    cd projects/ES51/ && ls ls

    opened by 4val0v 8
  • Warning : forgotten atom

    Warning : forgotten atom

    I get this:

    Error : Load task met an error : 'Warning : forgotten atom 22691 in /admin/includes/CMB2/includes/CMB2_JS.php : Ppp'
     
    on file phar:///home/vagrant/exakat.phar/library/Exakat/Tasks/Load.php
    on line 5155
    

    This is the file https://github.com/CMB2/CMB2/blob/trunk/includes/CMB2_JS.php and this was excluded (https://github.com/exakat/exakat/issues/52).

    opened by Mte90 7
  • Increment code crash exakat

    Increment code crash exakat

    I got this error:

    Error : Load task met an error : 'Warning : expression is not empty in /admin/includes/cmb2-extra.php : 1Array
    (
        [0] => Exakat\Tasks\Helpers\Atom Object
            (
                [id] => 2541
                [atom] => Cast
                [code] => ++
                [lccode] => 
                [fullcode] => ++  
                [line] => 64
                [token] => T_INC
                [rank] => 
                [alternative] => 
                [reference] => 
                [heredoc] => 
                [delimiter] => 
                [noDelimiter] => 
                [variadic] => 
                [count] => 
                [fullnspath] => 
                [absolute] => 
                [alias] => 
                [origin] => 
                [encoding] => 
                [block] => 
                [intval] => 
                [strval] => 
                [boolean] => 
                [enclosing] => 
                [args_max] => 
                [args_min] => 
                [bracket] => 
                [flexible] => 
                [close_tag] => 
                [aliased] => 
                [propertyname] => 
                [constant] => 
                [root] => 
                [globalvar] => 
                [binaryString] => 
                [isNull] => 
                [visibility] => 
                [final] => 
                [abstract] => 
                [static] => 
                [ctype1] => ++V
                [ctype1_size] => 1
            )
    
    )
    '
    

    The line with issues contain:

    $i++;
    

    Removing it fixed the problem.

    bug 
    opened by Mte90 7
  • Error : No such loader as

    Error : No such loader as "Tinkergraph". Use one of SplitGraphson

    Hi,

    When I try to scan initialised project, I have this error: Error : No such loader as "Tinkergraph". Use one of SplitGraphson

    on file phar:////exakat/exakat.phar/library/Exakat/Tasks/Load.php on line 449

    When checking the file I found that the loaderList array only contains SplitGraphson: private $loaderList = array('SplitGraphson'); //'CypherG3', 'Neo4jImport', 'Janusgraph', 'Tinkergraph', 'GSNeo4j', 'JanusCaES', 'Tcsv',

    Is this on purpose ?

    How can I get this SplitGraphson ?

    Thank you !

    opened by abderrahmaneib 6
  • Exakat crash, no output even on `doctor`.

    Exakat crash, no output even on `doctor`.

    I've installed Exakat on Ubuntu Linux with the instructions from here: https://exakat.readthedocs.io/en/latest/Installation.html#full-installation-with-debian-ubuntu

    And using the Gremlin 3 installation instructions from here: https://www.exakat.io/up-and-running-with-exakat/

    When I run doctor there is no output:

    $ php exakat.phar doctor
    
    $ echo $?
    255
    
    $ uname -a
    Linux latitude 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
    
    $ php -v
    PHP 7.2.11
    (abbreviated)
    

    I know that this is not a support forum, but as I've had Exakat working in the past (on CentOS) and I've followed the installation instructions, I suppose that I should file an issue here similar to this previous no-errors crash.

    opened by dotancohen 5
  • Error when cloning joomla repository

    Error when cloning joomla repository

    HI, when I'm trying to clone Joomla! repository I got an error: php exakat.phar init -v -p joomla-3-8-3 -R https://github.com/joomla/joomla-cms.git

    This is the output:

    Check out with branch
    An error prevented code initialization : 'Git reported an error and no code could be loaded : Remote branch master not found in upstream origin.'
    .No code was loaded.
    Done
    

    What can I do to clone it? Thanks.

    opened by kstalega 5
  • How to understand that is excluding files?

    How to understand that is excluding files?

    I added different folders to ignore but in the log results as scanned. There is a way to understand if the config is right? maybe is only scanning but ignoring them?

    opened by Mte90 5
  • Exakat crashes without any errors

    Exakat crashes without any errors

    Followed the instructions to a T and ran:

    php exakat.phar project -v -p sculpin-test

    Exakat runs with the following output and then shuts down or crashes. Not sure how to debug from here.I think its probably because its a rather big PHP project and I have far too many files in the directory, but a failure/exception/stack trace would help.

    Here's the output :

    Cleaning project
    Cleaning project sculpin-test
    removing datastore.sqlite
    Removed 1 files
    Recreating database
    Search for external libraries
    Processing files
    No files to process. Aborting
    fatal: Not a git repository (or any of the parent directories): .git
    fatal: Not a git repository (or any of the parent directories): .git
    Running project 'sculpin-test'
    Running the following analysis : CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, CompatibilityPHP70, CompatibilityPHP71, CompatibilityPHP72, CompatibilityPHP73, Analyze, Preferences, Inventory, Performances, Appinfo, Appcontent, Dead code, Security, Custom
    Producing the following reports : Ambassador
    Cleaning DB
    stop gremlin server 3.2.x
    started [29624] in 4,522.93 ms
    Running files
    Check composer
    Searching for files
    Found the files
    Check compilation for 71
    Check compilation for 56
    Check short tag (normal pass)
    Check short tag (with directive activated)
    Short tag OK
    Check config files
    + .DS_Store
    Done
    Array
    (
        [notCompilable52] => N/C
        [notCompilable53] => N/C
        [notCompilable54] => N/C
        [notCompilable55] => N/C
        [notCompilable56] => 0
        [notCompilable70] => N/C
        [notCompilable71] => 1
        [notCompilable72] => N/C
        [notCompilable73] => N/C
        [php] => 780
    )
    Loading with SplitGraphson
    

    It crashes and returns to command prompt after SplitGraphson above.

    opened by MojoJojo 5
  • Is the changes made to the behaviour of timestamps in datetimes in the scope of exakat ?

    Is the changes made to the behaviour of timestamps in datetimes in the scope of exakat ?

    The behavior of DateTimes has changed a few times between PHP 7.4 and PHP 8.1.17 ; and code is not retro-compatible:

    https://3v4l.org/lTg7r

    <?php
    
    $time = 1319932800;
    
    $timezoneUTC = new DateTimeZone('UTC');
    $datetimeUTC1 = (new \DateTime('@' . $time));
    $datetimeUTC2 = (new \DateTime('@' . $time))->setTimeZone($timezoneUTC);
    $datetimeUTC3 = (new \DateTime('now', $timezoneUTC))->setTimestamp($time);
    $datetimeUTC4 = (new \DateTime('now'))->setTimestamp($time)->setTimeZone($timezoneUTC);
    
    $timezoneLocal = new DateTimeZone('Europe/Paris');
    $datetimeLocal1 = (new \DateTime('@' . $time))->setTimeZone($timezoneLocal);
    $datetimeLocal2 = (new \DateTime('now', $timezoneLocal))->setTimestamp($time);
    $datetimeLocal3 = (new \DateTime('now'))->setTimestamp($time)->setTimeZone($timezoneLocal);
    
    var_dump(
        $timezoneUTC,
        $datetimeUTC1,
        $datetimeUTC2,
        $datetimeUTC3,
        $datetimeUTC4,
        $timezoneLocal,
        $datetimeLocal1,
        $datetimeLocal2,
        $datetimeLocal3,
    );
    printf("------------------------------------\n");
    var_dump(
        $time,
        $datetimeUTC1->getTimestamp(),
        $datetimeUTC2->getTimestamp(),
        $datetimeUTC3->getTimestamp(),
        $datetimeUTC4->getTimestamp(),
        $datetimeLocal1->getTimestamp(),
        $datetimeLocal2->getTimestamp(),
        $datetimeLocal3->getTimestamp(),
    );
    

    image

    Is identifying this change in the scope of exakat ?

    opened by PierreAntoineGuillaume 0
  • [issue] Exakat fails to generate report - PHP Fatal Error: Uncaught Error: Return value must be instance Brightzone\GremlinDriver\mixed, array returned

    [issue] Exakat fails to generate report - PHP Fatal Error: Uncaught Error: Return value must be instance Brightzone\GremlinDriver\mixed, array returned

    Expected Behavior

    • running exakat to generate sample audit php exakat.phar project -p sculpin after installing / configuring should generate a sample report in projects (name of project) folder

    Current Behavior

    • exakat fails to generate a sample audit, file php_error.log returns the following error:

    [06-Dec-2021 00:16:26 America/New_York] PHP Fatal error: Uncaught TypeError: Return value of Brightzone\GremlinDriver\RequestMessage::jsonSerialize() must be an instance of Brightzone\GremlinDriver\mixed, array returned in phar:///sample/user/exakat/exakat.phar/vendor/brightzone/gremlin-php/src/RequestMessage.php:60

    Possible Solution Replace the jsonSerialize() method and remove the :mixed from the signature (or the equiv. if possible to 'any')

    `

    /** * The json serialize method * * @return mixed * */ public function jsonSerialize():mixed { return $this->getData(); }

    ` becomes

    `

    /** * The json serialize method */ public function jsonSerialize() { return $this->getData(); }

    `

    and repackage the .phar file

    Steps to Reproduce

    1. Follow full installation steps to install exakat for Ubuntu 20+
    2. Follow instructions for debian/ubuntu installation with Tinkergraph 3.4.9
    3. init sample project php exakat.phar init -p sculpin -R https://github.com/sculpin/sculpin
    4. run audit with php exakat.phar project -p sculpin

    Context (Environment)

    • Ubuntu 20+
    • PHP 7.4.26
    • followed instructions from exakat documentation to install exakat. No issues encountered per se.
    • Caveat: Using openJDK 1.8 vs. Oracle Java JDK but that really should not be a difference in this issue afaik

    Full stack trace is shown

    [06-Dec-2021 00:16:26 America/New_York] PHP Fatal error: Uncaught TypeError: Return value of Brightzone\GremlinDriver\RequestMessage::jsonSerialize() must be an instance of Brightzone\GremlinDriver\mixed, array returned in phar:///x/iy/exakat/exakat.phar/vendor/brightzone/gremlin-php/src/RequestMessage.php:60

    Stack trace: #0 phar:///home/x/exakat-ubuntu/exakat.phar/library/Exakat/Graph/Helpers/GraphsonV3.php(306): Brightzone\GremlinDriver\RequestMessage->jsonSerialize() #1 phar:///home/x/exakat/exakat.phar/library/Exakat/Graph/Helpers/GraphsonV3.php(144): Exakat\Graph\Helpers\GraphsonV3->convertObject() #2 phar:///home/x/exakat/exakat.phar/library/Exakat/Graph/Helpers/GraphsonV3.php(84): Exakat\Graph\Helpers\GraphsonV3->convert() #3 phar:///home/x/exakat/exakat.phar/vendor/brightzone/gremlin-php/src/Message.php(189): Exakat\Graph\Helpers\GraphsonV3->serialize() #4 phar:///home/x/exakat/exakat.phar/vendor/brightzone/gremlin-php/src/Connection.php(184): Brightzone\GremlinDriver in phar:///home/x/exakat/exakat.phar/vendor/brightzone/gremlin-php/src/RequestMessage.php on line 60

    opened by eapostol 2
  • Exakat not working through Docker 2.1.9

    Exakat not working through Docker 2.1.9

    Using guide:

    https://exakat.readthedocs.io/en/stable/Tutorial.html#docker-container-within-the-code-folder

    On the code folder, the following command doesn't work:

    docker run -it --rm -w /src -v $(pwd):/src exakat/exakat:latest exakat project
    

    Nor:

    docker run -it --rm -w /src -v $(pwd):/src exakat/exakat:2.1.9 exakat project
    

    It outputs:

    Error : This command requires a project name. Pass the -p option, or use .exakat.yaml config file.
    Aborting
     
    on file phar:///usr/src/exakat/exakat/library/Exakat/Tasks/Project.php
    on line 60
    

    There is a .exakat.yaml file on the code dir with the following simple content as recommended in the guide:

    project: "MyProject"
    

    But it doesn't seem to be detected at all:

    docker run -it --rm -w /src -v $(pwd):/src exakat/exakat:latest exakat doctor
    

    returns:

    Warning: mkdir(): File exists in phar:///usr/src/exakat/exakat/library/Exakat/Tasks/Doctor.php on line 232
    exakat : 
        executable           : /usr/src/exakat//exakat
        version              : 2.1.9
        build                : 1156
        exakat.ini           : /usr./exakat/config/exakat.ini,
                               environnment
        graphdb              : gsneo4j
        reports              : 
        rulesets             : CompatibilityPHP53,
                               CompatibilityPHP54,
                               CompatibilityPHP55,
                               CompatibilityPHP56,
                               CompatibilityPHP70,
                               CompatibilityPHP71,
                               CompatibilityPHP72,
                               CompatibilityPHP73,
                               CompatibilityPHP74,
                               CompatibilityPHP80,
                               Analyze,
                               Preferences,
                               Appinfo,
                               Appcontent,
                               Dead code,
                               ClassReview,
                               Performances,
                               Security,
                               Custom,
                               Inventory,
                               Stats,
                               php-cs-fixable,
                               Rector
        extra rulesets       : 
        ignored rules        : 
        tokenslimit          : 100 000 000
        stubs                : 
    
    PHP : 
        binary               : 7.4.11
        memory_limit         : -1
        short_open_tags      : Off
        ext/curl             : Yes
        ext/hash             : Yes
        ext/phar             : Yes
        ext/sqlite3          : Yes
        ext/tokenizer        : Yes
        ext/mbstring         : Yes
        ext/json             : Yes
        ext/xmlwriter        : Yes
        pcre.jit             : On (Must be off on PHP 7.3 and OSX)
    
    java : 
        installed            : Yes
        type                 : OpenJDK Runtime Environment (build 11.0.8+10-post-Debian-1deb10u1)
        version              : openjdk
        $JAVA_HOME           : <none>
        $JAVA_OPTIONS        : 
    
    tinkergraph : 
        configured           : No tinkergraph configured in config/exakat.ini.
    
    tinkergraphv3 : 
        configured           : No tinkergraph configured in config/exakat.ini.
    
    gsneo4j : 
        installed            : Yes (folder : /usr/src/exakat/tinkergraph)
        host                 : 127.0.0.1
        port                 : 8182
        gremlin version      : 3.4.8
        neo4j version        : 3.2.3
    
    gsneo4jv3 : 
        configured           : No gsneo4jv3_folder configured in config/exakat.ini.
    
    nogremlin : 
        installed            : Always
    
    project : 
        name                 : 
        url                  : 
        phpversion           : 7.4
        reports              : "Ambassador"
        rulesets             : CompatibilityPHP53, CompatibilityPHP54, CompatibilityPHP55, CompatibilityPHP56, CompatibilityPHP70, CompatibilityPHP71, CompatibilityPHP72, CompatibilityPHP73, CompatibilityPHP74, CompatibilityPHP80, Analyze, Preferences, Appinfo, Appcontent, Dead code, ClassReview, Performances, Security, Custom, Inventory, Stats, php-cs-fixable, Rector
        included dirs        : 
        ignored dirs         : /assets, /cache, /css, /data, /doc, /docker, /docs, /example, /examples, /images, /js, /lang, /spec, /sql, /test, /tests, /tmp, /version, /var
        ignored rules        : 
        file extensions      : php, php3, inc, tpl, phtml, tmpl, phps, ctp, module
    
    folders : 
        projects folder      : Yes
    
    php74 : 
        configured           : Yes (/usr/local/bin/php)
        actual version       : 7.4.11
        auditing             : with this version
    

    Specially this part:

    project : 
        name                 : 
        url                  : 
    [...]
    
    folders : 
        projects folder      : Yes
    

    And this dot in the exakat.ini part seems suspicious:

    exakat : 
        executable           : /usr/src/exakat//exakat
        version              : 2.1.9
        build                : 1156
        exakat.ini           : /usr./exakat/config/exakat.ini,
                               environnment
    

    It says: /usr./exakat/config/exakat.ini.

    But running the following command, changing the working dir, also changes the path, making it look as ir replaced the working dir with a dot:

    Command:

    docker run -it --rm -w / -v $(pwd):/src exakat/exakat:latest exakat doctor
    

    Returns: (notice the multiple dots on exakat.ini entry and the lack of the mkdir() error at the beginning).

    exakat : 
        executable           : /usr/src/exakat//exakat
        version              : 2.1.9
        build                : 1156
        exakat.ini           : .usr.src.exakat.config.exakat.ini,
                               environnment
    (...)
    

    Running on bare metal Linux Ubuntu 18.04.5. Docker version 19.03.6, build 369ce74a3c.

    Also tried the projects folder mode (with -p and symlinking at the init command (with -R .... -symlink) without results too, said it couldn't find code, but this in-code-directory setup fits much better my use case).

    Thanks in advance!!

    opened by NeoEGM 2
  • Missing CompatibilityPHP80 ruleset

    Missing CompatibilityPHP80 ruleset

    I've just installed this tool and wanted to check this ruleset https://exakat.readthedocs.io/en/latest but got an error:

    Can't produce Emissary format. There are 1 missing rulesets : CompatibilityPHP80.

    The doctor command confirms that there is no ruleset for php8.

    rulesets             : CompatibilityPHP53,
                               CompatibilityPHP54,
                               CompatibilityPHP55,
                               CompatibilityPHP56,
                               CompatibilityPHP70,
                               CompatibilityPHP71,
                               CompatibilityPHP72,
                               Analyze,
                               Preferences,
                               Appinfo,
                               Appcontent,
                               "Dead code",
                               Security,
                               Custom
    

    Documentation says that it should be there so I think it's a bug

    opened by lukaszwit 0
  • Fixed incorrect assignment to array variable

    Fixed incorrect assignment to array variable

    This fixes the assignment of a string value to a variable that is used as an array later on.

    Without this fix, following the instructions here: https://exakat.readthedocs.io/en/latest/Installation.html#composer-installation-first-run on a machine that does not have Java installed, would cause the following error:

    Fatal error: Uncaught Error: [] operator not supported for strings in .../exakat/vendor/exakat/exakat/library/Exakat/Tasks/Install.php on line 48
    

    After applaying this fix, the installation task gives the desired output:

    Zip 3.0 : OK
    Please install Java 1.8
    Fix the above 1 and try again
    
    opened by alexey-pkv 2
  • everybody need FIX

    everybody need FIX

    this function is still not working, any new update? fix?

    Originally posted by @oliverhavrila in https://github.com/exakat/exakat/issues/84#issuecomment-696592996

    opened by oliverhavrila 1
Releases(v-0.6.1)
Owner
Exakat
Exakat is a static analysis engine for PHP.
Exakat
Beautiful and understandable static analysis tool for PHP

PhpMetrics PhpMetrics provides metrics about PHP project and classes, with beautiful and readable HTML report. Documentation | Twitter | Contributing

PhpMetrics 2.3k Dec 22, 2022
Performs advanced static analysis on PHP code

PHP Analyzer Please report bugs or feature requests via our website support system ? in bottom right or by emailing [email protected]. Contri

Continuous Inspection 443 Sep 23, 2022
A static php code analysis tool using the Graph Theory

Mondrian Ok guyz, you have a master degree in Graph Theory, you follow Law of Demeter and you live on S.O.L.I.D principles ? Let's have some Fun ! (^ω

Florent Genette 391 Nov 30, 2022
A static analysis tool for finding errors in PHP applications

Psalm Psalm is a static analysis tool for finding errors in PHP applications. Installation To get started, check out the installation guide. Live Demo

Vimeo 5k Jan 2, 2023
Deptrac is a static code analysis tool for PHP that helps you communicate, visualize and enforce architectural decisions in your projects

Deptrac is a static code analysis tool for PHP that helps you communicate, visualize and enforce architectural decisions in your projects. You can freely define your architectural layers over classes and which rules should apply to them.

QOSSMIC GmbH 2.2k Dec 30, 2022
Static code analysis to find violations in a dependency graph

PhpDependencyAnalysis PhpDependencyAnalysis is an extendable static code analysis for object-oriented PHP-Projects to generate dependency graphs from

Marco Muths 546 Dec 7, 2022
A static analysis tool for security

progpilot A static analyzer for security purposes Only PHP language is currently supported Installation Option 1: use standalone phar Download the lat

null 271 Dec 27, 2022
Static Analysis Results Baseliner

Static Analysis Results Baseliner (SARB) Why SARB Requirements Installing Using SARB Examples Further reading Why SARB? If you've tried to introduce a

Dave Liddament 151 Jan 3, 2023
Infection Static Analysis Plugin

Static analysis on top of mutation testing - prevents escaped mutants from being invalid according to static analysis

Roave, LLC 108 Jan 2, 2023
PHPSA - Smart Analyzer for PHP

PHPSA - Smart Analyzer for PHP PHPSA is a development tool aimed at bringing complex analysis for PHP applications and libraries. P.S This software is

Dmitry Patsura 647 Nov 20, 2022
A set of tools for lexical and syntactical analysis written in pure PHP.

Welcome to Dissect! master - this branch always contains the last stable version. develop - the unstable development branch. Dissect is a set of tools

Jakub Lédl 221 Nov 29, 2022
A project to add Psalm support for Drupal for security testing, focused only on taint analysis.

psalm-plugin-drupal A Drupal integration for Psalm focused on security scanning (SAST) taint analysis. Features Stubs for sinks, sources, and sanitize

Samuel Mortenson 38 Aug 29, 2022
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.

Phan is a static analyzer for PHP that prefers to minimize false-positives. Phan attempts to prove incorrectness rather than correctness. Phan looks f

null 5.4k Jan 7, 2023
A static analyzer for PHP version migration

PHP Migration Readme in Chinese 中文 This is a static analyzer for PHP version migration and compatibility checking. It can suppose your current code ru

Yuchen Wang 194 Sep 27, 2022
SonarPHP: PHP static analyzer for SonarQube & SonarLint

Code Quality and Security for PHP This SonarSource project is a static code analyser for PHP language used as an extension for the SonarQube platform.

SonarSource 343 Dec 25, 2022
Parse: A Static Security Scanner

Parse: A PHP Security Scanner PLEASE NOTE: This tool is still in a very early stage. The work continues... The Parse scanner is a static scanning tool

psec.io 342 Jan 2, 2023
PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly frontend application for the raw metrics stream measured by PHP Depend.

PHPMD PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD. PHPMD can be seen as an user friendly

PHP Mess Detector 2.1k Jan 8, 2023
A PHP parser written in PHP

PHP Parser This is a PHP 5.2 to PHP 8.0 parser written in PHP. Its purpose is to simplify static code analysis and manipulation. Documentation for ver

Nikita Popov 15.9k Jan 3, 2023
A PHP VM implementation in PHP

PHPPHP A PHP VM implementation written in PHP. This is a basic VM implemented in PHP using the AST generating parser developed by @nikic To see what's

Anthony Ferrara 801 Dec 25, 2022