olacabs / jackhammer

Jackhammer - One Security vulnerability assessment/management tool to solve all the security team problems.
https://jch.olacabs.com/userguide
Other
721 stars 162 forks source link

Most frustrating project I think I've ever seen. #71

Open aeoniandev opened 6 years ago

aeoniandev commented 6 years ago

1 Your install install instructions do not work when doing:

a.) clean vm deployment using ubuntu 14, 16, centos 7, debian 8, or any other os b.) installing latest version of docker and docker-compose

2 It appears the reason login credentials are not working is because the database is not being populated and .. even if I manually insert a team and try to add a user .. it fails.

3 I fixed the nc issue with heath check -- take some pride in your work and don't include things that don't work, this is confusing.

4 I challenge you to show me your commands working on a clean vm install of any os.

Please check your work and show some respect to the rest of us that end up wasting a ton of time because of sloppy work.

You can reply to this by simply fixing your work and giving correct instructions.

aeoniandev commented 6 years ago

This error: Could not find gem 'mocha (~> 0.14.0)' in any of the gem sources listed in your Gemfile.

Another issue that should be fixed in the gemfile.

kmadhusudhan commented 6 years ago

if your docker is up and application is running fine , Please login to web docker and run rake db:drop && rake db:migrate && rake db:seed . These commands will do db setup

aeoniandev commented 6 years ago

So ..

I logged into the web container and did:

root@f894f73ad246:/home/app# rake db:drop && rake db:migrate && rake db:seed Could not find gem 'mocha (~> 0.14.0)' in any of the gem sources listed in your Gemfile. Run bundle install to install missing gems. root@f894f73ad246:/home/app#

So then I did:

root@f894f73ad246:/home/app# gem install mocha Fetching: metaclass-0.0.4.gem (100%) Successfully installed metaclass-0.0.4 Fetching: mocha-1.3.0.gem (100%) Successfully installed mocha-1.3.0 Parsing documentation for metaclass-0.0.4 Installing ri documentation for metaclass-0.0.4 Parsing documentation for mocha-1.3.0 Installing ri documentation for mocha-1.3.0 Done installing documentation for metaclass, mocha after 1 seconds 2 gems installed root@f894f73ad246:/home/app#

Then:

root@f894f73ad246:/home/app# rake db:drop && rake db:migrate && rake db:seed Could not find gem 'mocha (~> 0.14.0)' in any of the gem sources listed in your Gemfile. Run bundle install to install missing gems. root@f894f73ad246:/home/app#

So its failing I think? It looked like mocha 1.3.0 was installed, yet it still throws the error.

Any advice?

aeoniandev commented 6 years ago

Also I checked and the commands are not dropping the database, etc. I did notice that the db did have the following:

+-----------------------------+------------+ | TABLE_NAME | TABLE_ROWS | +-----------------------------+------------+ | alert_notifications | 0 | | branches | 0 | | comments | 0 | | configurations | 1 | | filters | 0 | | findings | 0 | | findings_scaners | 0 | | findings_tags | 0 | | functionalities | 0 | | functionalities_permissions | 0 | | functionalities_roles | 0 | | notifications | 0 | | permissions | 0 | | permissions_roles | 0 | | repos | 0 | | repos_users | 0 | | roles | 0 | | roles_teams | 0 | | roles_users | 0 | | scan_types | 0 | | scaner_instances | 0 | | scaners | 0 | | schema_migrations | 107 | | sessions | 0 | | settings | 0 | | taggings | 0 | | tags | 0 | | tasks | 0 | | tasks_users | 0 | | teams | 0 | | teams_users | 0 | | uploads | 0 | | users | 0 | +-----------------------------+------------+ 33 rows in set (0.00 sec)

So only two tables had any rows.

I DID NOT select SingleUser when installing.

aeoniandev commented 6 years ago

mysql> select * from configurations; +----+------------------------------+-----------------------------+---------------------+---------------------+ | id | name | value | created_at | updated_at | +----+------------------------------+-----------------------------+---------------------+---------------------+ | 1 | admin:paths:plugin_templates | /home/app/templates/plugins | 2018-01-24 15:20:01 | 2018-01-24 15:20:01 | +----+------------------------------+-----------------------------+---------------------+---------------------+ 1 row in set (0.00 sec)

aeoniandev commented 6 years ago

mysql> select * from schema_migrations; +----------------+ | version | +----------------+ | 20160816085229 | | 20160816121813 | | 20160816173941 | | 20160816194215 | | 20160816200020 | | 20160816200234 | | 20160817022927 | | 20160817024602 | | 20160817025227 | | 20160817090800 | | 20160817093715 | | 20160817111008 | | 20160817111259 | | 20160817182158 | | 20160817190715 | | 20160818124115 | | 20160819094054 | | 20160820171648 | | 20160820175605 | | 20160820181859 | | 20160822054949 | | 20160822072057 | | 20160823092355 | | 20160824060429 | | 20160824090905 | | 20160824091124 | | 20160825115945 | | 20160826102326 | | 20160826102741 | | 20160826131936 | | 20160830051444 | | 20160830065109 | | 20160830092427 | | 20160906055355 | | 20160906055712 | | 20160906060201 | | 20160907051548 | | 20160907062844 | | 20160908055736 | | 20160908101509 | | 20160909055923 | | 20160911050021 | | 20160911050409 | | 20160911052623 | | 20160916051519 | | 20160916084522 | | 20160916095748 | | 20160919051329 | | 20160919064638 | | 20160919100040 | | 20160921122322 | | 20160922093939 | | 20160926093037 | | 20161024125208 | | 20161025081956 | | 20161026122549 | | 20161027111258 | | 20161103105954 | | 20161104124140 | | 20161111122351 | | 20161201065221 | | 20161201101041 | | 20161202083718 | | 20161202090704 | | 20161228064445 | | 20161229081514 | | 20161230061324 | | 20170103083113 | | 20170113110215 | | 20170116100650 | | 20170120095925 | | 20170126061617 | | 20170129102818 | | 20170202101829 | | 20170202123445 | | 20170203055855 | | 20170206094437 | | 20170206120544 | | 20170206130402 | | 20170221112258 | | 20170222120531 | | 20170222131256 | | 20170223194443 | | 20170227161918 | | 20170303180510 | | 20170316095320 | | 20170322125112 | | 20170322142200 | | 20170323090816 | | 20170323130643 | | 20170324120613 | | 20170324144114 | | 20170324150831 | | 20170325072724 | | 20170326154708 | | 20170327164310 | | 20170327202039 | | 20170327202659 | | 20170328093944 | | 20170330072400 | | 20170330085651 | | 20170403080733 | | 20170413172407 | | 20170418062929 | | 20170422093312 | | 20170502121027 | | 20170524061211 | +----------------+ 107 rows in set (0.00 sec)

kmadhusudhan commented 6 years ago

please Remove Gemfile.lock and run bundle exec bundle install && bundle exec rake db:drop && bundle exec rake db:migrate && bundle exec rake db:seed

aeoniandev commented 6 years ago

I had to modify the above and do:

bundle exec bundle install && bundle exec rake db:drop && bundle exec rake db:create && bundle exec rake db:migrate && bundle exec rake db:seed

And then it worked... FINALLY!

aeoniandev commented 6 years ago

I'm going to fix these issues so it can actually be installed from scratch and it will work. This is crazy what I had to go through to get this to work. I had to incorporate the mysql wait as well because the web container would fail when it couldn't talk to db...because db was still initializing..also I fixed the unhealthy status.

So I will fork this project .. fix these issues and refer back here soon so others can get project up and running smoothly. Hopefully ocalabs team will incorporate fixes quickly to save all this frustration and time.

Thank you again for your help and I look forward to contributing to the project moving forward.

sampathmende commented 6 years ago

Hey @aeoniandev I also built the jackhammer application successfully. and showed the message jackhammer is up. got below error while building the app but build is done successfully. Could not find gem 'mocha (~> 0.14.0)' in any of the gem sources listed in your Gemfile.

By the way i am windows 8.1 and installed docker toolbox and it installs oracle vm. So how to access the jackhammer application now ?? i tried using localhost:5000 but no success. please help i have been trying it for last 2 months.

thanks in advance sampath

kmadhusudhan commented 6 years ago

@sampathmende @aeoniandev . is this sorted out ? or still your facing same issue ? . please let me know if your facing same problem , i can help you in that

sampathmende commented 6 years ago

Yeah facing error still. Cant load file selenium/webdriver/phantomjs I installed phantomjs 2.1.1 but no use Its looking for phantonjs in above location

kmadhusudhan commented 6 years ago

@sampathmende Sidekiq depends on phantomjs to run web scanner. This is something related to dependency issue , some how you need to resolve it .

sampathmende commented 6 years ago

Pls help how to resolve it. Gemfile change is required???? Gemfile need any extra entries