dradis / dradis-ce

Dradis Framework: Collaboration and reporting for IT Security teams
https://dradis.com/ce/
GNU General Public License v2.0
678 stars 190 forks source link

Reset seems to be broken #76

Closed nheiniger closed 7 years ago

nheiniger commented 7 years ago

Hello,

I installed Dradis-DE from GIT as explained here https://dradisframework.com/ce/documentation/install_git.html I made some modification to the instance and tried to reset it without success. I already opened a thread on CE forums and was asked to add an issue here.

Here is the output that I got:

/opt/dradis/dradis-ce$ bundle exec thor dradis:reset
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from <top (required)> at /opt/dradis/dradis-ce/config/application.rb:16)
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from <top (required)> at /opt/dradis/dradis-ce/config/application.rb:16)
Loaded add-ons:
        acunetix - Processes Acunetix XML format
        api - Dradis REST HTTP API
        brakeman - Processes Brakeman JSON output, use: brakeman -f json -o results.json
        burp - Processes Burp Scanner XML output
        csv - Export results in CSV format
        cvss - Provides a CVSS score calculator under /calculators/cvss
        dread - Provides a DREAD score calculator under /calculators/dread
        html_export - Generate advanced HTML reports
        metasploit - Processes Metasploit XML output, use: db_export
        nessus - Processes Nessus XML v2 format (.nessus)
        nexpose - Processes Nexpose XML format
        nikto - Processes Nikto output
        nmap - Processes Nmap output
        nto_spider - Processes NTOSpider reports
        open_vas - Processes OpenVAS XML v6 or v7 format
        projects - Save and restore project information
        qualys - Processes Qualys output
        zap - Processes ZAP XML format
** Checking database migrations...                                    [  DONE  ]
** Saving backup...                                                   /opt/dradis/dradis-ce/lib/tasks/thorfile.rb:26:in `backup': uninitialized constant DradisTasks::ProjectExport (NameError)
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:115:in `invoke'
        from /opt/dradis/dradis-ce/lib/tasks/thorfile.rb:50:in `reset'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/runner.rb:44:in `method_missing'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:29:in `run'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/command.rb:126:in `run'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
        from /var/lib/gems/2.3.0/gems/thor-0.19.4/bin/thor:6:in `<top (required)>'
        from /usr/local/bin/thor:22:in `load'
        from /usr/local/bin/thor:22:in `<main>'
lfuelling commented 7 years ago

This also happens at build time after precompiling the assets.

** Saving backup...                                                   bundler: failed to load command: thor (/usr/local/bundle/bin/thor)
NameError: uninitialized constant DradisTasks::ProjectExport
  /dradis-git/server/lib/tasks/thorfile.rb:26:in `backup'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor/invocation.rb:115:in `invoke'
  /dradis-git/server/lib/tasks/thorfile.rb:50:in `reset'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor/command.rb:27:in `run'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor/runner.rb:44:in `method_missing'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor/command.rb:29:in `run'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor/command.rb:126:in `run'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor/invocation.rb:126:in `invoke_command'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor.rb:369:in `dispatch'
  /usr/local/bundle/gems/thor-0.19.4/lib/thor/base.rb:444:in `start'
  /usr/local/bundle/gems/thor-0.19.4/bin/thor:6:in `<top (required)>'
  /usr/local/bundle/bin/thor:17:in `load'
  /usr/local/bundle/bin/thor:17:in `<top (required)>'
djsekops commented 7 years ago

Yep, getting the same error. It seems to work using reset:database or reset:attachments, but neither allow me to clear the DB successfully and import a backup successfully.