Skip to content

Commit 5e192a5

Browse files
authored
fix(security): resolve CodeQL warnings (#380)
1 parent 8b6ffe6 commit 5e192a5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/config/integrations/heroku.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def vars
2626
end
2727

2828
def environment
29-
heroku("run 'echo $RAILS_ENV'").chomp[/(\w+)\z/]
29+
heroku("run 'echo $RAILS_ENV'").chomp[/(?>\w+)\z/]
3030
end
3131

3232
def heroku(command)

lib/config/options.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def has_key?(key)
150150
end
151151

152152
def method_missing(method_name, *args)
153-
if Config.fail_on_missing && method_name !~ /.*(?==\z)/m
153+
if Config.fail_on_missing && !method_name.to_s.end_with?('=')
154154
raise KeyError, "key not found: #{method_name.inspect}" unless key?(method_name)
155155
end
156156
super

0 commit comments

Comments
 (0)