Skip to content

Commit

Permalink
SRCH-5217 SRCH-5168 Fix error `visit_Psych_Nodes_Alias' ... (Psych::B…
Browse files Browse the repository at this point in the history
…adAlias)`. Fix suid & sgid deletion, remove crontabs and init files (#257)
  • Loading branch information
stevenbarragan authored May 28, 2024
1 parent 1e94d27 commit f349709
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion bin/secure_docker
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ echo "echo -e 'This is a U.S. General Services Administration Federal Government
rm -fr /etc/sysctl* /etc/modprobe.d /etc/modules /etc/mdev.conf /etc/acpi

# Remove suid & sgid files to enforce simple permission sets.
find /bin /etc /lib /sbin /usr -xdev -type f -a \( -perm +4000 -o -perm +2000 \) -delete
find /bin /etc /lib /sbin /usr -xdev -type f -a \( -perm /4000 -o -perm /2000 \) -delete

# Check for calls out of the dockerfile to download software externally
apt-get remove -y --auto-remove curl

# Remove any broken symlinks, if any.
find /bin /etc /lib /sbin /usr -xdev -type l -exec test ! -e {} \; -delete

# Remove existing crontabs
rm -rf /etc/cron.d /etc/cron.daily

# Remove init scripts since we do not use them.
rm -fr /etc/init.d /lib/rc /etc/conf.d /etc/inittab /etc/runlevels /etc/rc.conf /etc/logrotate.d
2 changes: 1 addition & 1 deletion config/initializers/redis.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

if Rails.env.production?
sidekiq = YAML.load_file("#{Rails.root}/config/sidekiq.yml")
sidekiq = Rails.application.config_for(:sidekiq)
else
sidekiq = Rails.configuration.sidekiq
end
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/sidekiq.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

if Rails.env.production?
sidekiq = YAML.load_file("#{Rails.root}/config/sidekiq.yml")
sidekiq = Rails.application.config_for(:sidekiq)
else
sidekiq = Rails.configuration.sidekiq
end
Expand Down

0 comments on commit f349709

Please # to comment.