New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dradis-CE 3.6 - /opt/dradis-csv/lib/tasks/thorfile.rb:2:in Error #113

Closed
Kalaratri opened this Issue Apr 22, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@Kalaratri

Kalaratri commented Apr 22, 2017

Attempting to run:

/opt/dradis-ce# RAILS_ENV=production bundle exec thor dradis

produces an error:

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-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-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
WARNING: unable to load thorfile "/opt/dradis-ce/Thorfile": undefined method thor_helper_module' for Dradis::Plugins:Module /opt/dradis-csv/lib/tasks/thorfile.rb:2:inclass:CSVTasks'
Commands:
thor dradis:backup # creates a backup of your current repository
thor dradis:help [COMMAND] # Describe available commands or one specifi...
thor dradis:logs:clean DAYS # delete all logs older than DAYS days (defa...
thor dradis:reset # resets your local dradis repository
thor dradis:reset:attachments # removes all attachments
thor dradis:reset:database # removes all data from a dradis repository,...
thor dradis:reset:logs # removes all log files
thor dradis:reset:password # Set a new shared password to access the we...
thor dradis:server # start dradis server
thor dradis:setup:configure # Creates the Dradis configuration files fro...
thor dradis:setup:migrate # ensures the database schema is up-to-date
thor dradis:setup:seed # adds initial values to the database (i.e.,...
thor dradis:version # displays the version of the dradis server

So I commented out the CSV plugin in Gemfiles.plugins and when running again it progresses to the next plugin, then fails on the html export plugin with the same error.

This is critical as HTML export is seemingly not working in Dradis 3.6 within the browser or via the command line.

I've tried using the 3.3.4 version of the html export gem, but have the same issue.

root@kali:/opt/dradis-ce# RAILS_ENV=production bundle exec thor dradis:version
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from require at /usr/local/rvm/gems/ruby-2.2.2/gems/bundler-1.14.6/lib/bundler/runtime.rb:91)
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from require at /usr/local/rvm/gems/ruby-2.2.2/gems/bundler-1.14.6/lib/bundler/runtime.rb:91)
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
cvss - Provides a CVSS score calculator under /calculators/cvss
dread - Provides a DREAD score calculator under /calculators/dread
html_export - Generate advanced HTML reports
WARNING: unable to load thorfile "/opt/dradis-ce/Thorfile": undefined method thor_helper_module' for Dradis::Plugins:Module /opt/dradis-ce/ruby/2.2.0/gems/dradis-html_export-3.3.3/lib/tasks/thorfile.rb:2:inclass:HtmlExportTasks'
bundler: failed to load command: thor (/opt/dradis-ce/ruby/2.2.0/bin/thor)
LoadError: cannot load such file -- lib/core/version
/opt/dradis-ce/ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:in require' /opt/dradis-ce/ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:inblock in require'
/opt/dradis-ce/ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:259:in load_dependency' /opt/dradis-ce/ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:293:inrequire'
/opt/dradis-ce/lib/tasks/thorfile.rb:79:in version' /opt/dradis-ce/ruby/2.2.0/gems/thor-0.19.4/lib/thor/command.rb:27:inrun'
/opt/dradis-ce/ruby/2.2.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in invoke_command' /opt/dradis-ce/ruby/2.2.0/gems/thor-0.19.4/lib/thor.rb:369:indispatch'
/opt/dradis-ce/ruby/2.2.0/gems/thor-0.19.4/lib/thor/base.rb:444:in start' /opt/dradis-ce/ruby/2.2.0/gems/thor-0.19.4/lib/thor/runner.rb:44:inmethod_missing'
/opt/dradis-ce/ruby/2.2.0/gems/thor-0.19.4/lib/thor/command.rb:29:in run' /opt/dradis-ce/ruby/2.2.0/gems/thor-0.19.4/lib/thor/command.rb:126:inrun'
/opt/dradis-ce/ruby/2.2.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in invoke_command' /opt/dradis-ce/ruby/2.2.0/gems/thor-0.19.4/lib/thor.rb:369:indispatch'
/opt/dradis-ce/ruby/2.2.0/gems/thor-0.19.4/lib/thor/base.rb:444:in start' /opt/dradis-ce/ruby/2.2.0/gems/thor-0.19.4/bin/thor:6:in<top (required)>'
/opt/dradis-ce/ruby/2.2.0/bin/thor:22:in load' /opt/dradis-ce/ruby/2.2.0/bin/thor:22:in<top (required)>'

HTML Export error in the browser:

NoMethodError in Dradis::Plugins::HtmlExport::BaseController#index
undefined method `constantize' for nil:NilClass
Extracted source (around line #13):

11
12
13
14
15
16

      # these come from Export#create
      export_manager_hash   = session[:export_manager].with_indifferent_access
      content_service_class = export_manager_hash[:content_service].constantize

      exporter = Dradis::Plugins::HtmlExport::Exporter.new(
        content_service: content_service_class.new(plugin: Dradis::Plugins::HtmlExport)

Rails.root: /opt/dradis-ce
Application Trace | Framework Trace | Full Trace

ruby/2.2.0/gems/dradis-html_export-3.3.3/app/controllers/dradis/plugins/html_export/base_controller.rb:13:in index' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_controller/metal/basic_implicit_render.rb:4:insend_action'
ruby/2.2.0/gems/actionpack-5.0.2/lib/abstract_controller/base.rb:188:in process_action' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_controller/metal/rendering.rb:30:inprocess_action'
ruby/2.2.0/gems/actionpack-5.0.2/lib/abstract_controller/callbacks.rb:20:in block in process_action' ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:126:incall'
ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:126:in call' ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:506:inblock (2 levels) in compile'
ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:455:in call' ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:455:incall'
ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:101:in __run_callbacks__' ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:750:in_run_process_action_callbacks'
ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:90:in run_callbacks' ruby/2.2.0/gems/actionpack-5.0.2/lib/abstract_controller/callbacks.rb:19:inprocess_action'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_controller/metal/rescue.rb:20:in process_action' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_controller/metal/instrumentation.rb:32:inblock in process_action'
ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/notifications.rb:164:in block in instrument' ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/notifications/instrumenter.rb:21:ininstrument'
ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/notifications.rb:164:in instrument' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_controller/metal/instrumentation.rb:30:inprocess_action'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_controller/metal/params_wrapper.rb:248:in process_action' ruby/2.2.0/gems/activerecord-5.0.2/lib/active_record/railties/controller_runtime.rb:18:inprocess_action'
ruby/2.2.0/gems/actionpack-5.0.2/lib/abstract_controller/base.rb:126:in process' ruby/2.2.0/gems/actionview-5.0.2/lib/action_view/rendering.rb:30:inprocess'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_controller/metal.rb:190:in dispatch' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_controller/metal.rb:262:indispatch'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:50:in dispatch' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:32:inserve'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/journey/router.rb:39:in block in serve' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/journey/router.rb:26:ineach'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/journey/router.rb:26:in serve' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:725:incall'
ruby/2.2.0/gems/railties-5.0.2/lib/rails/engine.rb:522:in call' ruby/2.2.0/gems/railties-5.0.2/lib/rails/railtie.rb:193:inpublic_send'
ruby/2.2.0/gems/railties-5.0.2/lib/rails/railtie.rb:193:in method_missing' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/mapper.rb:17:inblock in class:Constraints'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/mapper.rb:46:in call' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/mapper.rb:46:inserve'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/journey/router.rb:39:in block in serve' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/journey/router.rb:26:ineach'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/journey/router.rb:26:in serve' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:725:incall'
ruby/2.2.0/gems/warden-1.2.7/lib/warden/manager.rb:36:in block in call' ruby/2.2.0/gems/warden-1.2.7/lib/warden/manager.rb:35:incatch'
ruby/2.2.0/gems/warden-1.2.7/lib/warden/manager.rb:35:in call' engines/dradis-api/lib/dradis/ce/api/catch_json_parse_errors.rb:10:incall'
ruby/2.2.0/gems/bullet-5.5.1/lib/bullet/rack.rb:10:in call' ruby/2.2.0/gems/rack-2.0.1/lib/rack/etag.rb:25:incall'
ruby/2.2.0/gems/rack-2.0.1/lib/rack/conditional_get.rb:25:in call' ruby/2.2.0/gems/rack-2.0.1/lib/rack/head.rb:12:incall'
ruby/2.2.0/gems/rack-2.0.1/lib/rack/session/abstract/id.rb:222:in context' ruby/2.2.0/gems/rack-2.0.1/lib/rack/session/abstract/id.rb:216:incall'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/cookies.rb:613:in call' ruby/2.2.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:553:incall'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/callbacks.rb:38:in block in call' ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:97:inrun_callbacks'
ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:750:in _run_call_callbacks' ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/callbacks.rb:90:inrun_callbacks'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/callbacks.rb:36:in call' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/executor.rb:12:incall'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/remote_ip.rb:79:in call' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/debug_exceptions.rb:49:incall'
ruby/2.2.0/gems/web-console-3.5.0/lib/web_console/middleware.rb:135:in call_app' ruby/2.2.0/gems/web-console-3.5.0/lib/web_console/middleware.rb:28:inblock in call'
ruby/2.2.0/gems/web-console-3.5.0/lib/web_console/middleware.rb:18:in catch' ruby/2.2.0/gems/web-console-3.5.0/lib/web_console/middleware.rb:18:incall'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/show_exceptions.rb:31:in call' ruby/2.2.0/gems/railties-5.0.2/lib/rails/rack/logger.rb:36:incall_app'
ruby/2.2.0/gems/railties-5.0.2/lib/rails/rack/logger.rb:24:in block in call' ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/tagged_logging.rb:69:inblock in tagged'
ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/tagged_logging.rb:26:in tagged' ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/tagged_logging.rb:69:intagged'
ruby/2.2.0/gems/railties-5.0.2/lib/rails/rack/logger.rb:24:in call' ruby/2.2.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/quiet_assets.rb:13:incall'
ruby/2.2.0/gems/request_store-1.3.2/lib/request_store/middleware.rb:9:in call' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/request_id.rb:24:incall'
ruby/2.2.0/gems/rack-2.0.1/lib/rack/method_override.rb:22:in call' ruby/2.2.0/gems/rack-2.0.1/lib/rack/runtime.rb:22:incall'
ruby/2.2.0/gems/activesupport-5.0.2/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call' ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/executor.rb:12:incall'
ruby/2.2.0/gems/actionpack-5.0.2/lib/action_dispatch/middleware/static.rb:136:in call' ruby/2.2.0/gems/rack-2.0.1/lib/rack/sendfile.rb:111:incall'
ruby/2.2.0/gems/railties-5.0.2/lib/rails/engine.rb:522:in call' ruby/2.2.0/gems/rack-2.0.1/lib/rack/urlmap.rb:68:inblock in call'
ruby/2.2.0/gems/rack-2.0.1/lib/rack/urlmap.rb:53:in each' ruby/2.2.0/gems/rack-2.0.1/lib/rack/urlmap.rb:53:incall'
ruby/2.2.0/gems/rack-2.0.1/lib/rack/handler/webrick.rb:86:in service' /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:inservice'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in run' /usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:inblock in start_thread'

Request

Parameters:

None

Toggle session dump
Toggle env dump
Response

Headers:

None

=========

@dormi

This comment has been minimized.

Show comment
Hide comment
@dormi

dormi Apr 24, 2017

Contributor

You may try to use the latest version for all dradis plugin gems.
To do that you can try copying Gemfile.plugins.template to Gemfile.plugins, then running bundle install again.
Dradis CE version (3.6.0) and plugin gems versions are now related (both should be 3.6)

Contributor

dormi commented Apr 24, 2017

You may try to use the latest version for all dradis plugin gems.
To do that you can try copying Gemfile.plugins.template to Gemfile.plugins, then running bundle install again.
Dradis CE version (3.6.0) and plugin gems versions are now related (both should be 3.6)

@Kalaratri

This comment has been minimized.

Show comment
Hide comment
@Kalaratri

Kalaratri Apr 24, 2017

Thanks for your suggestion. Unfortunately I am not able to migrate to 3.6 as I can't import my backup from 3.1.0RC2 as you will see in my other thread. If we can solve that problem I wold love to give your suggestions a try and upgrade!

Kalaratri commented Apr 24, 2017

Thanks for your suggestion. Unfortunately I am not able to migrate to 3.6 as I can't import my backup from 3.1.0RC2 as you will see in my other thread. If we can solve that problem I wold love to give your suggestions a try and upgrade!

@Kalaratri

This comment has been minimized.

Show comment
Hide comment
@Kalaratri

Kalaratri Apr 27, 2017

Your suggestions worked perfectly, gems updated...

Kalaratri commented Apr 27, 2017

Your suggestions worked perfectly, gems updated...

@Kalaratri Kalaratri closed this Apr 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment