codeforamerica/ohana-web-search

View on GitHub

Showing 2,141 of 2,141 total issues

Unsanitized input leading to code injection in Dalli
Open

dalli (2.7.11)
Severity: Info
Found in Gemfile.lock by bundler-audit

Function FeedbackForm has a Cognitive Complexity of 16 (exceeds 6 allowed). Consider refactoring.
Open

function FeedbackForm() {
var _instance = this;
 
// The events this instance broadcasts.
var _events = {
Severity: Minor
Found in app/javascript/app/FeedbackForm.js - About 1 hr to fix

Function DefaultPopup has a Cognitive Complexity of 14 (exceeds 6 allowed). Consider refactoring.
Open

function DefaultPopup() {
var _instance = this;
 
// The events this instance broadcasts.
var _events = {
Severity: Minor
Found in app/javascript/app/popup/DefaultPopup.js - About 1 hr to fix

Function _checkIfFloating has a Cognitive Complexity of 12 (exceeds 6 allowed). Consider refactoring.
Open

function _checkIfFloating() {
var c;
if (window.scrollY >= _offsetY) {
// Make the header float.
_header.classList.add('floating');
Severity: Minor
Found in app/javascript/app/search/header.js - About 1 hr to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

} else {
// Reset the header position.
_header.classList.remove('floating');
for (c in _floatingContent)
if (_floatingContent[c].classList)
Severity: Major
Found in app/javascript/app/search/header.js and 1 other location - About 1 hr to fix
app/javascript/app/search/header.js on lines 53..59

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if (window.scrollY >= _offsetY) {
// Make the header float.
_header.classList.add('floating');
for (c in _floatingContent)
if (_floatingContent[c].classList)
Severity: Major
Found in app/javascript/app/search/header.js and 1 other location - About 1 hr to fix
app/javascript/app/search/header.js on lines 59..65

Function EventObserver has a Cognitive Complexity of 11 (exceeds 6 allowed). Consider refactoring.
Open

function EventObserver() {
 
// The events registered on this instance.
var _events = {};
 
 
Severity: Minor
Found in app/javascript/app/util/EventObserver.js - About 1 hr to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

else {
if (_atMaxSize)
manager.turnOn(manager.LARGE_ICON | manager.UNSPIDERFIED_ICON);
else
manager.turnOn(manager.SMALL_ICON | manager.UNSPIDERFIED_ICON);
Severity: Minor
Found in app/javascript/app/util/map/google/map-renderer.js and 1 other location - About 55 mins to fix
app/javascript/app/util/map/google/map-renderer.js on lines 192..197

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if (useSpiderfied) {
if (_atMaxSize)
manager.turnOn(manager.LARGE_ICON | manager.SPIDERFIED_ICON);
else
manager.turnOn(manager.SMALL_ICON | manager.SPIDERFIED_ICON);
Severity: Minor
Found in app/javascript/app/util/map/google/map-renderer.js and 1 other location - About 55 mins to fix
app/javascript/app/util/map/google/map-renderer.js on lines 198..203

ReDoS based DoS vulnerability in Action Dispatch
Open

actionpack (6.1.6)
Severity: Minor
Found in Gemfile.lock by bundler-audit

ReDoS based DoS vulnerability in Action Dispatch
Open

actionpack (6.1.6)
Severity: Minor
Found in Gemfile.lock by bundler-audit

ReDoS based DoS vulnerability in Active Support’s underscore
Open

activesupport (6.1.6)
Severity: Minor
Found in Gemfile.lock by bundler-audit

StatusController#check_status refers to 'response_hash' more than self (maybe move it to another class?)
Open

response_hash[:dependencies] = %w[SendGrid Memcachier]
response_hash[:status] = everything_ok? ? 'OK' : 'NOT OK'
response_hash[:updated] = Time.zone.now.to_i
Severity: Minor
Found in app/controllers/status_controller.rb by reek

DetailFormatHelper#contact_details_for refers to 'contact' more than self (maybe move it to another class?)
Open

if contact.title.present? && contact.department.present?
return contact_title_and_department_for(contact)
end
return contact_title_for(contact) if contact.title.present?
return contact_department_for(contact) if contact.department.present?
Severity: Minor
Found in app/helpers/detail_format_helper.rb by reek

Search#hash_for refers to 'location' more than self (maybe move it to another class?)
Open

latitude: location.latitude,
longitude: location.longitude,
name: location.name,
org_name: location.organization.name,
slug: location.slug,
Severity: Minor
Found in app/facades/search.rb by reek

SchedulesHelper#holiday_hours is controlled by argument 'closed'
Open

if closed == true
Severity: Minor
Found in app/helpers/schedules_helper.rb by reek

SchedulesHelper#holiday_schedule_content_for refers to 'schedule' more than self (maybe move it to another class?)
Open

"#{date_range_for(schedule.start_date, schedule.end_date)}: " \
"#{holiday_hours(
schedule.closed, schedule.opens_at, schedule.closes_at
Severity: Minor
Found in app/helpers/schedules_helper.rb by reek

StatusController#check_status has approx 6 statements
Open

def check_status
Severity: Minor
Found in app/controllers/status_controller.rb by reek

ResultSummaryHelper#location_link_for refers to 'location' more than self (maybe move it to another class?)
Open

if location.organization.name == location.name
location_path([location.slug], request.query_parameters)
else
location_path([location.organization.slug, location.slug], request.query_parameters)
Severity: Minor
Found in app/helpers/result_summary_helper.rb by reek

InfoBoxHelper#render_html_for_generic_info_box has approx 6 statements
Open

def render_html_for_generic_info_box(info_box)
Severity: Minor
Found in app/helpers/info_box_helper.rb by reek
Severity
Category
Status
Source
Language