sfrod / exakat-ci

Exakat Docker Container - SAST stage for Gitlab CI/CD Pipeline
2 stars 0 forks source link

failed to run exakat-ci on Prestashop framework #1

Open ghost opened 3 years ago

ghost commented 3 years ago

Hi @sfrod ,

Hope you are all well !

I tried to run exakat-ci locally on a Prestashop source code but it triggers various error messages:

$ docker run -v $(pwd):/src/ -v $(pwd)/reports:/report/ sfrod/exakat-ci:latest Prestashop
====> Installing Extension...'Prestashop'
Rename project_themes in project_rulesets, in your config/exakat.ini file
Couldn't reach the remote server.
Couldn't find that extension on the remote server. Aborting
====> Display Config
Rename project_themes in project_rulesets, in your config/exakat.ini file
exakat :
    executable           : exakat.phar
    version              : 2.0.6
    build                : 1039
    exakat.ini           : ./config/exakat.ini
    graphdb              : gsneo4j
    reports              :
    rulesets             : CompatibilityPHP56,
                           CompatibilityPHP70,
                           CompatibilityPHP71,
                           CompatibilityPHP72,
                           CompatibilityPHP73,
                           CompatibilityPHP74,
                           Analyze,
                           Preferences,
                           Appinfo,
                           Appcontent,
                           "Dead code",
                           Security,
                           Custom,
                           Prestashop
    extra rulesets       :
    tokenslimit          : 100 000 000

PHP :
    binary               : 7.4.4
    memory_limit         : 128M
    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
    ext/pcntl            : No (Optional)
    parallel_processing  : No (Optional)
    pcre.jit             : On (Must be off on PHP 7.3 and OSX)

java :
    installed            : Yes
    type                 : OpenJDK Runtime Environment (build 11.0.6+10-post-Debian-1deb10u1)
    version              : openjdk
    $JAVA_HOME           :
    $JAVA_OPTIONS        :

tinkergraph :
    installed            : Yes (folder : /usr/src/exakat/tinkergraph)
    host                 : 127.0.0.1
    port                 : 8182
    gremlin version      : 3.4.6

gsneo4j :
    installed            : Yes (folder : /usr/src/exakat/tinkergraph)
    host                 : 127.0.0.1
    port                 : 8182
    gremlin version      : 3.4.6
    neo4j version        : 3.2.3

folders :
    projects folder      : Yes
    projects/test        : No
    projects/default     : No
    projects/onepage     : No

php52 :
    configured           : No

php53 :
    configured           : No

php54 :
    configured           : No

php55 :
    configured           : No

php56 :
    configured           : Yes (/root/.phpbrew/php/php-5.6/bin/php)
    actual version       : 5.6.40

php70 :
    configured           : Yes (/root/.phpbrew/php/php-7.0/bin/php)
    actual version       : 7.0.33

php71 :
    configured           : Yes (/root/.phpbrew/php/php-7.1/bin/php)
    actual version       : 7.1.33

php72 :
    configured           : Yes (/root/.phpbrew/php/php-7.2/bin/php)
    actual version       : 7.2.29

php73 :
    configured           : Yes (/root/.phpbrew/php/php-7.3/bin/php)
    actual version       : 7.3.16

php74 :
    configured           : Yes (/usr/local/bin/php)
    actual version       : 7.4.4
    auditing             : with this version

php80 :
    configured           : No

====> Init Project...
Rename project_themes in project_rulesets, in your config/exakat.ini file

Fatal error: Uncaught Error: Call to undefined method Exakat\Configsource\ProjectConfig::writeConfig() in phar:///usr/src/exakat/exakat.phar/library/Exakat/Tasks/Initproject.php:233
Stack trace:
#0 phar:///usr/src/exakat/exakat.phar/library/Exakat/Tasks/Initproject.php(64): Exakat\Tasks\Initproject->init_project(Object(Exakat\Project), '/src')
#1 phar:///usr/src/exakat/exakat.phar/library/Exakat/Exakat.php(112): Exakat\Tasks\Initproject->run()
#2 phar:///usr/src/exakat/exakat.phar/library/Exakat/Exakat.php(41): Exakat\Exakat->local()
#3 phar:///usr/src/exakat/exakat.phar/exakat(46): Exakat\Exakat->execute()
#4 /usr/src/exakat/exakat.phar(10): include('phar:///usr/src...')
#5 {main}
  thrown in phar:///usr/src/exakat/exakat.phar/library/Exakat/Tasks/Initproject.php on line 233
====> Running scan on Target...
Rename project_themes in project_rulesets, in your config/exakat.ini file

Error : No code in project 'myScan'

on file phar:///usr/src/exakat/exakat.phar/library/Exakat/Tasks/Project.php
on line 80

====> Generating Report...
Rename project_themes in project_rulesets, in your config/exakat.ini file

Error : No such ruleset as 'Prestashop'.
You can try : Custom, Rector

on file phar:///usr/src/exakat/exakat.phar/library/Exakat/Tasks/Analyze.php
on line 92

Rename project_themes in project_rulesets, in your config/exakat.ini file

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 843

Rename project_themes in project_rulesets, in your config/exakat.ini file

Error : No results database was found for project 'myScan'.
Run php exakat.phar project -p myScan first

on file phar:///usr/src/exakat/exakat.phar/library/Exakat/Tasks/Report.php
on line 59

====> Sending Extension Report to Mount Point...
cp: cannot stat 'projects/myScan/Ext_Prestashop_report.txt': No such file or directory
====> Sending Exakat Report to Mount Point...
cp: cannot stat 'projects/myScan/report': No such file or directory

Do you know why ? are you using the open source version of exakat ?

Thanks for any insights or inputs on that.

Cheers, Luc Michalski

sfrod commented 3 years ago

Hey Luc,

I got the same error when I pass a framework to exakat-ci but works correctly without that feature. I also noticied that some pages of the official exakat documentation, especially regarding the use of extensions have been moved.

Yes, I use the open source version of exakat.

I'll rebuild the image and upload it later on Dockerhub. If the error subsists, I'll try to solve the issue as soons as possible.

Best regards, Sergio Rodrigues

ghost commented 3 years ago

Awesome, thanks for the reply :-)