scnr / installer

Installation script for Codename SCNR.
https://ecsypno.com/pages/codename-scnr
26 stars 3 forks source link

can't access summary #33

Closed Bzyczek7 closed 8 months ago

Bzyczek7 commented 8 months ago

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

If you are the application owner check the logs for more information.

Zapotek commented 8 months ago

Hello,

Can you please provide some steps to reproduce?

Cheers!

Bzyczek7 commented 8 months ago

[ScanScheduler#126] [1st zdziekiejwarmii] Checking progress. [ScanScheduler#126] [1st zdziekiejwarmii] Got progress. Enqueued Broadcasts::Sites::UpdateJob (Job ID: b92f8975-dc22-408c-ab6b-33b31d389f08) to Async(default) with arguments: 4 Enqueued Broadcasts::Profiles::UpdateJob (Job ID: df91fb87-f5f9-4337-8357-b123949eef4a) to Async(default) with arguments: 12 Enqueued Broadcasts::Scans::UpdateJob (Job ID: 1b1171e1-86b6-49fe-9566-b4fc1871c39d) to Async(default) with arguments: 7 Enqueued Broadcasts::ScanResults::UpdateJob (Job ID: 04bab7a0-33db-40fc-9a81-1996e8346e73) to Async(default) with arguments: 1 Performing Broadcasts::ScanResults::UpdateJob (Job ID: 04bab7a0-33db-40fc-9a81-1996e8346e73) from Async(default) enqueued at 2024-01-22T09:00:19Z with arguments: 1 Performed Broadcasts::ScanResults::UpdateJob (Job ID: 04bab7a0-33db-40fc-9a81-1996e8346e73) from Async(default) in 1.0ms Performing Broadcasts::Profiles::UpdateJob (Job ID: df91fb87-f5f9-4337-8357-b123949eef4a) from Async(default) enqueued at 2024-01-22T09:00:19Z with arguments: 12 Performed Broadcasts::Profiles::UpdateJob (Job ID: df91fb87-f5f9-4337-8357-b123949eef4a) from Async(default) in 4.33ms Performing Broadcasts::Scans::UpdateJob (Job ID: 1b1171e1-86b6-49fe-9566-b4fc1871c39d) from Async(default) enqueued at 2024-01-22T09:00:19Z with arguments: 7 Performed Broadcasts::Scans::UpdateJob (Job ID: 1b1171e1-86b6-49fe-9566-b4fc1871c39d) from Async(default) in 25.62ms Started GET "/sites/4/scans/7/revisions/15/summary?filter%5Bseverities%5D%5B%5D=high&filter%5Bseverities%5D%5B%5D=medium&filter%5Bseverities%5D%5B%5D=low&filter%5Bstates%5D%5B%5D=trusted&filter%5Btype%5D=include&=1705913469141" for 127.0.0.1 at 2024-01-22 10:00:20 +0100 Processing by RevisionsController#summary as JS Parameters: {"filter"=>{"severities"=>["high", "medium", "low"], "states"=>["trusted"], "type"=>"include"}, ""=>"1705913469141", "site_id"=>"4", "scanid"=>"7", "id"=>"15"} Started GET "/sites/4/scans/7/revisions/15/summary?filter%5Bseverities%5D%5B%5D=high&filter%5Bseverities%5D%5B%5D=medium&filter%5Bseverities%5D%5B%5D=low&filter%5Bstates%5D%5B%5D=trusted&filter%5Btype%5D=include&=1705913469139" for 127.0.0.1 at 2024-01-22 10:00:20 +0100 Processing by RevisionsController#summary as JS Parameters: {"filter"=>{"severities"=>["high", "medium", "low"], "states"=>["trusted"], "type"=>"include"}, "_"=>"1705913469139", "site_id"=>"4", "scanid"=>"7", "id"=>"15"} Performing Broadcasts::Sites::UpdateJob (Job ID: b92f8975-dc22-408c-ab6b-33b31d389f08) from Async(default) enqueued at 2024-01-22T09:00:19Z with arguments: 4 Rendered revisions/show.js.erb (Duration: 22.4ms | Allocations: 9637) Completed 500 Internal Server Error in 130ms (ActiveRecord: 4.9ms | Allocations: 48434) Started GET "/sites/4/scans/7/revisions/15/summary?filter%5Bseverities%5D%5B%5D=high&filter%5Bseverities%5D%5B%5D=medium&filter%5Bseverities%5D%5B%5D=low&filter%5Bstates%5D%5B%5D=trusted&filter%5Btype%5D=include&=1705913469137" for 127.0.0.1 at 2024-01-22 10:00:20 +0100 Processing by RevisionsController#summary as JS Parameters: {"filter"=>{"severities"=>["high", "medium", "low"], "states"=>["trusted"], "type"=>"include"}, "_"=>"1705913469137", "site_id"=>"4", "scanid"=>"7", "id"=>"15"} Started GET "/sites/4/scans/7/revisions/15/summary?filter%5Bseverities%5D%5B%5D=high&filter%5Bseverities%5D%5B%5D=medium&filter%5Bseverities%5D%5B%5D=low&filter%5Bstates%5D%5B%5D=trusted&filter%5Btype%5D=include&=1705913469140" for 127.0.0.1 at 2024-01-22 10:00:20 +0100 Processing by RevisionsController#summary as JS Parameters: {"filter"=>{"severities"=>["high", "medium", "low"], "states"=>["trusted"], "type"=>"include"}, "_"=>"1705913469140", "site_id"=>"4", "scanid"=>"7", "id"=>"15"} Rendered revisions/show.js.erb (Duration: 29.3ms | Allocations: 9682) Completed 500 Internal Server Error in 182ms (ActiveRecord: 5.3ms | Allocations: 64565) Rendered revisions/show.js.erb (Duration: 36.7ms | Allocations: 10185) Started GET "/sites/4/scans/7/revisions/15/summary?filter%5Bseverities%5D%5B%5D=high&filter%5Bseverities%5D%5B%5D=medium&filter%5Bseverities%5D%5B%5D=low&filter%5Bstates%5D%5B%5D=trusted&filter%5Btype%5D=include&=1705913469138" for 127.0.0.1 at 2024-01-22 10:00:20 +0100 Processing by RevisionsController#summary as JS

ActionView::Template::Error (undefined method `capitalize' for nil:NilClass): 59: with a maximum severity of 60: 61: 62: <%= max_severity.capitalize %> 63: 64: 65: <% end %>

app/views/shared/scan_results/_summary.html.erb:62 app/views/shared/_scan_results.html.erb:88 app/views/shared/_scan_results.js.erb:3 app/views/revisions/show.js.erb:1 app/controllers/concerns/scan_results.rb:199:in block (2 levels) in process_and_show' app/controllers/concerns/scan_results.rb:190:inprocess_and_show' app/controllers/concerns/scan_results.rb:34:in `summary'

ActionView::Template::Error (undefined method `capitalize' for nil:NilClass): 59: with a maximum severity of 60: 61: 62: <%= max_severity.capitalize %> 63: 64: 65: <% end %>

app/views/shared/scan_results/_summary.html.erb:62 app/views/shared/_scan_results.html.erb:88 app/views/shared/_scan_results.js.erb:3 app/views/revisions/show.js.erb:1 app/controllers/concerns/scan_results.rb:199:in block (2 levels) in process_and_show' app/controllers/concerns/scan_results.rb:190:inprocess_and_show' app/controllers/concerns/scanresults.rb:34:in `summary' Parameters: {"filter"=>{"severities"=>["high", "medium", "low"], "states"=>["trusted"], "type"=>"include"}, ""=>"1705913469138", "site_id"=>"4", "scan_id"=>"7", "id"=>"15"} Performed Broadcasts::Sites::UpdateJob (Job ID: b92f8975-dc22-408c-ab6b-33b31d389f08) from Async(default) in 164.17ms Rendered revisions/show.js.erb (Duration: 26.8ms | Allocations: 10134) Completed 500 Internal Server Error in 195ms (ActiveRecord: 8.3ms | Allocations: 66772) Rendered revisions/show.js.erb (Duration: 29.8ms | Allocations: 9702) Completed 500 Internal Server Error in 67ms (ActiveRecord: 9.7ms | Allocations: 22183)

ActionView::Template::Error (undefined method `capitalize' for nil:NilClass): 59: with a maximum severity of 60: 61: 62: <%= max_severity.capitalize %> 63: 64: 65: <% end %>

app/views/shared/scan_results/_summary.html.erb:62 app/views/shared/_scan_results.html.erb:88 app/views/shared/_scan_results.js.erb:3 app/views/revisions/show.js.erb:1 app/controllers/concerns/scan_results.rb:199:in block (2 levels) in process_and_show' app/controllers/concerns/scan_results.rb:190:inprocess_and_show' app/controllers/concerns/scan_results.rb:34:in `summary' Completed 500 Internal Server Error in 66ms (ActiveRecord: 5.2ms | Allocations: 22122)

ActionView::Template::Error (undefined method `capitalize' for nil:NilClass): 59: with a maximum severity of 60: 61: 62: <%= max_severity.capitalize %> 63: 64: 65: <% end %>

app/views/shared/scan_results/_summary.html.erb:62 app/views/shared/_scan_results.html.erb:88 app/views/shared/_scan_results.js.erb:3 app/views/revisions/show.js.erb:1 app/controllers/concerns/scan_results.rb:199:in block (2 levels) in process_and_show' app/controllers/concerns/scan_results.rb:190:inprocess_and_show' app/controllers/concerns/scan_results.rb:34:in `summary'

ActionView::Template::Error (undefined method `capitalize' for nil:NilClass): 59: with a maximum severity of 60: 61: 62: <%= max_severity.capitalize %> 63: 64: 65: <% end %>

app/views/shared/scan_results/_summary.html.erb:62 app/views/shared/_scan_results.html.erb:88 app/views/shared/_scan_results.js.erb:3 app/views/revisions/show.js.erb:1 app/controllers/concerns/scan_results.rb:199:in block (2 levels) in process_and_show' app/controllers/concerns/scan_results.rb:190:inprocess_and_show' app/controllers/concerns/scan_results.rb:34:in `summary'

Bzyczek7 commented 8 months ago

I click on a scan i'm running ... than i click on summary and than i get that error ...

Zapotek commented 8 months ago

I can see the issue.

I'll look into it shortly, thanks for the feedback.

Bzyczek7 commented 8 months ago

image

Bzyczek7 commented 8 months ago

my pleasure, running on Ubuntu just FYI

Zapotek commented 8 months ago

Any chance you can send me the target in private?

Bzyczek7 commented 8 months ago

the what ?

Zapotek commented 8 months ago

I meant the domain of the webapp you're scanning.

Bzyczek7 commented 8 months ago

aaaaaa zdzikiejwarmii.pl

Bzyczek7 commented 8 months ago

just FYI the summary does not work on any site i'm scanning that belongs to the company i'm working for.

Bzyczek7 commented 8 months ago

I also see this

"[ActiveRecord::StatementInvalid] SQLite3::BusyException: database is locked" [ [ 0] "/home/marek/scnr-v1.1/.system/gems/gems/sqlite3-1.7.0/lib/sqlite3/statement.rb:108:in step'", [ 1] "/home/marek/scnr-v1.1/.system/gems/gems/sqlite3-1.7.0/lib/sqlite3/statement.rb:108:inblock in each'", [ 2] "/home/marek/scnr-v1.1/.system/gems/gems/sqlite3-1.7.0/lib/sqlite3/statement.rb:107:in loop'", [ 3] "/home/marek/scnr-v1.1/.system/gems/gems/sqlite3-1.7.0/lib/sqlite3/statement.rb:107:ineach'", [ 4] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/connection_adapters/sqlite3/database_statements.rb:56:in to_a'", [ 5] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/connection_adapters/sqlite3/database_statements.rb:56:inblock (2 levels) in exec_query'", [ 6] "/home/marek/scnr-v1.1/.system/gems/gems/activesupport-7.0.2.3/lib/active_support/concurrency/share_lock.rb:187:in yield_shares'", [ 7] "/home/marek/scnr-v1.1/.system/gems/gems/activesupport-7.0.2.3/lib/active_support/dependencies/interlock.rb:41:inpermit_concurrent_loads'", [ 8] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/connection_adapters/sqlite3/database_statements.rb:47:in block in exec_query'", [ 9] "/home/marek/scnr-v1.1/.system/gems/gems/activesupport-7.0.2.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:inhandle_interrupt'", [10] "/home/marek/scnr-v1.1/.system/gems/gems/activesupport-7.0.2.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in block in synchronize'", [11] "/home/marek/scnr-v1.1/.system/gems/gems/activesupport-7.0.2.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:inhandle_interrupt'", [12] "/home/marek/scnr-v1.1/.system/gems/gems/activesupport-7.0.2.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in synchronize'", [13] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:765:inblock in log'", [14] "/home/marek/scnr-v1.1/.system/gems/gems/activesupport-7.0.2.3/lib/active_support/notifications/instrumenter.rb:24:in instrument'", [15] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:756:inlog'", [16] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/connection_adapters/sqlite3/database_statements.rb:46:in exec_query'", [17] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:560:inselect'", [18] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in select_all'", [19] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:110:inselect_all'", [20] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:91:in select_rows'", [21] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/relation/finder_methods.rb:344:inblock in exists?'", [22] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/relation.rb:961:in skip_query_cache_if_necessary'", [23] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/relation/finder_methods.rb:344:inexists?'", [24] "/home/marek/scnr-v1.1/.system/gems/gems/activerecord-7.0.2.3/lib/active_record/relation.rb:273:in empty?'", [25] "/home/marek/scnr-v1.1/.system/scnr-ui-pro/lib/scan_scheduler/helpers/scan.rb:114:ineach_due_scan'", [26] "/home/marek/scnr-v1.1/.system/scnr-ui-pro/lib/scan_scheduler.rb:56:in block in start'", [27] "/home/marek/scnr-v1.1/.system/gems/gems/raktr-0.0.3/lib/raktr/tasks/base.rb:51:incall_task'", [28] "/home/marek/scnr-v1.1/.system/gems/gems/raktr-0.0.3/lib/raktr/tasks/persistent.rb:23:in call'", [29] "/home/marek/scnr-v1.1/.system/gems/gems/raktr-0.0.3/lib/raktr/tasks/periodic.rb:42:incall'", [30] "/home/marek/scnr-v1.1/.system/gems/gems/raktr-0.0.3/lib/raktr/tasks.rb:95:in block in call'", [31] "/home/marek/scnr-v1.1/.system/gems/gems/raktr-0.0.3/lib/raktr/tasks.rb:95:ineach'", [32] "/home/marek/scnr-v1.1/.system/gems/gems/raktr-0.0.3/lib/raktr/tasks.rb:95:in call'", [33] "/home/marek/scnr-v1.1/.system/gems/gems/raktr-0.0.3/lib/raktr.rb:305:inblock in run'", [34] "/home/marek/scnr-v1.1/.system/gems/gems/raktr-0.0.3/lib/raktr.rb:303:in loop'", [35] "/home/marek/scnr-v1.1/.system/gems/gems/raktr-0.0.3/lib/raktr.rb:303:inrun'", [36] "/home/marek/scnr-v1.1/.system/gems/gems/raktr-0.0.3/lib/raktr.rb:345:in `block in run_in_thread'"

Zapotek commented 8 months ago

Yeah for it's better to switch to PostgreSQL for heavier loads: https://github.com/scnr/installer#scnr-webui SQLite can only get you so far.

https://github.com/scnr/installer#postgresql

Bzyczek7 commented 8 months ago

I thought i did

Bzyczek7 commented 8 months ago

marek@marek-HP-Laptop-17-by3xxx:~/scnr-v1.1/bin$ sudo -u postgres psql could not change directory to "/home/marek/scnr-v1.1/bin": Permission denied psql (14.10 (Ubuntu 14.10-0ubuntu0.22.04.1)) Type "help" for help.

Bzyczek7 commented 8 months ago

these two commands I execute while in postgres?

mv .system/scnr-ui-pro/config/database.yml .system/scnr-ui-pro/config/database.yml.bak cp .system/scnr-ui-pro/config/database.postgres.yml .system/scnr-ui-pro/config/database.yml

Bzyczek7 commented 8 months ago

I have to say these instructions are not working for me ... especially these two marek@marek-HP-Laptop-17-by3xxx:/$ mv .system/scnr-ui-pro/config/database.yml .system/scnr-ui-pro/config/database.yml.bak mv: cannot stat '.system/scnr-ui-pro/config/database.yml': No such file or directory

Bzyczek7 commented 8 months ago

you have to forgive me ... i'm not linux savvy

Bzyczek7 commented 8 months ago

I see now .system is a hidden folder :P

Zapotek commented 8 months ago

Yes it's in the package root, I figured it wouldn't be distracting to users that way.

I'll make it clear in the instructions.

Bzyczek7 commented 8 months ago

ok ... so now with the new database it looks really good ... I can see the issues ... I couldn't see this screen before

image

Thank you for your help.

Zapotek commented 8 months ago

Great!

Cheers!