brakeman 8.0.4 → 8.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +17 -0
- data/bundle/load.rb +6 -6
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/NEWS.md +39 -1
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/README.md +1 -1
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/parser.rb +7 -2
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/row.rb +26 -2
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/version.rb +1 -1
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv.rb +30 -58
- data/bundle/ruby/3.2.0/gems/parallel-1.28.0/lib/parallel/version.rb +4 -0
- data/bundle/ruby/3.2.0/gems/{parallel-1.27.0 → parallel-1.28.0}/lib/parallel.rb +11 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/ansi.rb +6 -4
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/windows.rb +49 -23
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io.rb +8 -2
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/line_editor.rb +49 -21
- data/bundle/ruby/3.2.0/gems/reline-0.7.0/lib/reline/version.rb +3 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline.rb +10 -9
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/CHANGES +8 -2
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/Gemfile +5 -2
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/LICENSE +1 -1
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/README.jp.md +10 -12
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/README.md +21 -26
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/embedded.rb +1 -1
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/logic_less/context.rb +4 -3
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/splat/builder.rb +18 -19
- data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/version.rb +1 -1
- data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/CHANGES +8 -0
- data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/README.md +1 -1
- data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/static_analyzer.rb +1 -1
- data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/string_splitter.rb +61 -5
- data/bundle/ruby/3.2.0/gems/temple-0.10.6/lib/temple/parser_engine.rb +34 -0
- data/bundle/ruby/3.2.0/gems/temple-0.10.6/lib/temple/static_analyzer.rb +148 -0
- data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/version.rb +1 -1
- data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/COPYING +1 -1
- data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/commonmarker.rb +24 -0
- data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/rdoc.rb +10 -2
- data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt.rb +1 -1
- data/lib/brakeman/checks/check_eol_rails.rb +2 -1
- data/lib/brakeman/checks/check_eol_ruby.rb +1 -0
- data/lib/brakeman/checks/check_execute.rb +23 -19
- data/lib/brakeman/checks/check_sql.rb +2 -2
- data/lib/brakeman/processors/base_processor.rb +13 -6
- data/lib/brakeman/processors/gem_processor.rb +1 -1
- data/lib/brakeman/processors/haml_template_processor.rb +3 -1
- data/lib/brakeman/processors/lib/render_helper.rb +3 -1
- data/lib/brakeman/scanner.rb +8 -2
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman.rb +1 -1
- metadata +171 -170
- data/bundle/ruby/3.2.0/gems/parallel-1.27.0/lib/parallel/version.rb +0 -4
- data/bundle/ruby/3.2.0/gems/reline-0.6.3/lib/reline/version.rb +0 -3
- data/bundle/ruby/3.2.0/gems/temple-0.10.4/lib/temple/static_analyzer.rb +0 -78
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/LICENSE.txt +0 -0
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/core_ext/array.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/core_ext/string.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/fields_converter.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/input_record_separator.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/table.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{csv-3.3.5 → csv-3.3.6}/lib/csv/writer.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{parallel-1.27.0 → parallel-1.28.0}/MIT-LICENSE.txt +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/BSDL +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/COPYING +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/README.md +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/config.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/face.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/history.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/io/dumb.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/base.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/composite.rb +0 -0
- data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/emacs.rb +2 -2
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/vi_command.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor/vi_insert.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_actor.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/key_stroke.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/kill_ring.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/unicode/east_asian_width.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/lib/reline/unicode.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{reline-0.6.3 → reline-0.7.0}/license_of_rb-readline +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/code_attributes.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/command.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/controls.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/do_inserter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/end_inserter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/engine.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/erb_converter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/filter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/grammar.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/include.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/interpolation.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/logic_less/filter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/logic_less.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/parser.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/railtie.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/smart/escaper.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/smart/filter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/smart/parser.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/smart.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/splat/filter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/template.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim/translator.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/lib/slim.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{slim-5.2.1 → slim-5.2.2}/slim.gemspec +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/EXPRESSIONS.md +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/Gemfile +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/LICENSE +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/engine.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/erb/engine.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/erb/parser.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/erb/template.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/erb/trimming.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/exceptions.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/ambles.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/code_merger.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/control_flow.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/dynamic_inliner.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/dynamic_merger.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/encoding.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/eraser.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/escapable.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/multi_flattener.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/remove_bom.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/static_merger.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/validator.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generator.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/array.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/array_buffer.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/erb.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/rails_output_buffer.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/generators/string_buffer.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/grammar.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/attribute_merger.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/attribute_remover.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/attribute_sorter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/dispatcher.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/fast.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/filter.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/pretty.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/html/safe.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/map.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/dispatcher.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/engine_dsl.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/grammar_dsl.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/options.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/mixins/template.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/parser.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/templates/rails.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/templates/tilt.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/templates.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/utils.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/temple.gemspec +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/_emacs_org.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/_handlebars.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/_jbuilder.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/_org.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/asciidoc.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/babel.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/builder.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/cli.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/coffee.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/csv.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/erb.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/erubi.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/etanni.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/haml.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/kramdown.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/liquid.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/livescript.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/mapping.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/markaby.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/nokogiri.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/pandoc.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/pipeline.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/plain.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/prawn.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/radius.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/rdiscount.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/redcarpet.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/redcloth.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/rst-pandoc.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/sass.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/slim.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/string.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/template.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/typescript.rb +0 -0
- /data/bundle/ruby/3.2.0/gems/{tilt-2.7.0 → tilt-2.8.0}/lib/tilt/yajl.rb +0 -0
data/bundle/ruby/3.2.0/gems/{temple-0.10.4 → temple-0.10.6}/lib/temple/filters/string_splitter.rb
RENAMED
|
@@ -1,14 +1,70 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require 'ripper'
|
|
4
|
-
rescue LoadError
|
|
5
|
-
end
|
|
2
|
+
require 'temple/parser_engine'
|
|
6
3
|
|
|
7
4
|
module Temple
|
|
8
5
|
module Filters
|
|
9
6
|
# Compile [:dynamic, "foo#{bar}"] to [:multi, [:static, 'foo'], [:dynamic, 'bar']]
|
|
10
7
|
class StringSplitter < Filter
|
|
11
|
-
if
|
|
8
|
+
if PARSER_ENGINE == :prism
|
|
9
|
+
class << self
|
|
10
|
+
# `code` param must be valid string literal
|
|
11
|
+
def compile(code)
|
|
12
|
+
compiled = try_compile(code)
|
|
13
|
+
raise(FilterError, "Expected string literal") unless compiled
|
|
14
|
+
compiled
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def try_compile(code)
|
|
18
|
+
result = Prism.parse(code)
|
|
19
|
+
return unless result.success?
|
|
20
|
+
|
|
21
|
+
stmts = result.value.statements.body
|
|
22
|
+
return if stmts.size != 1
|
|
23
|
+
|
|
24
|
+
stack = [stmts.first]
|
|
25
|
+
compiled = []
|
|
26
|
+
|
|
27
|
+
until stack.empty?
|
|
28
|
+
case (node = stack.pop).type
|
|
29
|
+
when :interpolated_string_node
|
|
30
|
+
stack.concat(node.parts.reverse)
|
|
31
|
+
when :string_node
|
|
32
|
+
if !(unescaped = node.unescaped).empty?
|
|
33
|
+
compiled << [:static, unescaped]
|
|
34
|
+
end
|
|
35
|
+
when :embedded_statements_node
|
|
36
|
+
if (stmts = node.statements) && !(slice = stmts.slice).empty?
|
|
37
|
+
compiled << [:dynamic, slice]
|
|
38
|
+
end
|
|
39
|
+
when :embedded_variable_node
|
|
40
|
+
compiled << [:dynamic, node.variable.slice]
|
|
41
|
+
else
|
|
42
|
+
return
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
compiled
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def on_dynamic(code)
|
|
51
|
+
return [:dynamic, code] if code.include?("\n")
|
|
52
|
+
|
|
53
|
+
compiled = StringSplitter.try_compile(code)
|
|
54
|
+
return [:dynamic, code] unless compiled
|
|
55
|
+
|
|
56
|
+
temple = [:multi]
|
|
57
|
+
compiled.each do |type, content|
|
|
58
|
+
case type
|
|
59
|
+
when :static
|
|
60
|
+
temple << [:static, content]
|
|
61
|
+
when :dynamic
|
|
62
|
+
temple << on_dynamic(content)
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
temple
|
|
66
|
+
end
|
|
67
|
+
elsif PARSER_ENGINE == :ripper
|
|
12
68
|
class << self
|
|
13
69
|
# `code` param must be valid string literal
|
|
14
70
|
def compile(code)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Temple
|
|
4
|
+
temple_parser_engine = ENV['TEMPLE_PARSER_ENGINE']
|
|
5
|
+
|
|
6
|
+
prism_available =
|
|
7
|
+
if !temple_parser_engine || temple_parser_engine == 'prism'
|
|
8
|
+
begin
|
|
9
|
+
require 'prism'
|
|
10
|
+
true
|
|
11
|
+
rescue LoadError
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
ripper_available =
|
|
16
|
+
if !temple_parser_engine || temple_parser_engine == 'ripper'
|
|
17
|
+
begin
|
|
18
|
+
require 'ripper'
|
|
19
|
+
Ripper.respond_to?(:lex)
|
|
20
|
+
rescue LoadError
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
PARSER_ENGINE =
|
|
25
|
+
if prism_available
|
|
26
|
+
:prism
|
|
27
|
+
elsif ripper_available
|
|
28
|
+
:ripper
|
|
29
|
+
else
|
|
30
|
+
:none
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
private_constant :PARSER_ENGINE
|
|
34
|
+
end
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
require 'temple/parser_engine'
|
|
3
|
+
|
|
4
|
+
module Temple
|
|
5
|
+
module StaticAnalyzer
|
|
6
|
+
if PARSER_ENGINE == :prism
|
|
7
|
+
class << self
|
|
8
|
+
def available?
|
|
9
|
+
true
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def static?(code)
|
|
13
|
+
return false if code.nil? || code.strip.empty?
|
|
14
|
+
(result = Prism.parse(code)).success? && static_node?(result.value)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def syntax_error?(code)
|
|
18
|
+
!Prism.parse_success?(code)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
private
|
|
22
|
+
|
|
23
|
+
def static_node?(node)
|
|
24
|
+
case node.type
|
|
25
|
+
when :program_node
|
|
26
|
+
static_node?(node.statements)
|
|
27
|
+
when :parentheses_node
|
|
28
|
+
(stmts = node.body).is_a?(Prism::StatementsNode) &&
|
|
29
|
+
static_node?(stmts)
|
|
30
|
+
when :statements_node
|
|
31
|
+
node.body.size == 1 && static_node?(node.body.first)
|
|
32
|
+
when :interpolated_string_node
|
|
33
|
+
node.parts.all? { |part| static_node?(part) }
|
|
34
|
+
when :embedded_statements_node
|
|
35
|
+
(stmts = node.statements) && static_node?(stmts)
|
|
36
|
+
when :array_node
|
|
37
|
+
node.elements.all? { |elem| static_node?(elem) }
|
|
38
|
+
when :hash_node, :keyword_hash_node
|
|
39
|
+
node.elements.all? { |elem| static_node?(elem) }
|
|
40
|
+
when :assoc_node
|
|
41
|
+
static_node?(node.key) && static_node?(node.value)
|
|
42
|
+
when :string_node, :integer_node, :float_node, :imaginary_node,
|
|
43
|
+
:rational_node, :symbol_node, :true_node, :false_node, :nil_node
|
|
44
|
+
true
|
|
45
|
+
else
|
|
46
|
+
false
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
elsif PARSER_ENGINE == :ripper
|
|
51
|
+
STATIC_TOKENS = [
|
|
52
|
+
:on_tstring_beg, :on_tstring_end, :on_tstring_content,
|
|
53
|
+
:on_embexpr_beg, :on_embexpr_end,
|
|
54
|
+
:on_lbracket, :on_rbracket,
|
|
55
|
+
:on_qwords_beg, :on_words_sep, :on_qwords_sep,
|
|
56
|
+
:on_lparen, :on_rparen,
|
|
57
|
+
:on_lbrace, :on_rbrace, :on_label,
|
|
58
|
+
:on_int, :on_float, :on_imaginary,
|
|
59
|
+
:on_comma, :on_sp, :on_ignored_nl,
|
|
60
|
+
].freeze
|
|
61
|
+
|
|
62
|
+
DYNAMIC_TOKENS = [
|
|
63
|
+
:on_ident, :on_period,
|
|
64
|
+
].freeze
|
|
65
|
+
|
|
66
|
+
STATIC_KEYWORDS = [
|
|
67
|
+
'true', 'false', 'nil',
|
|
68
|
+
].freeze
|
|
69
|
+
|
|
70
|
+
STATIC_OPERATORS = [
|
|
71
|
+
'=>',
|
|
72
|
+
].freeze
|
|
73
|
+
|
|
74
|
+
class << self
|
|
75
|
+
def available?
|
|
76
|
+
true
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def static?(code)
|
|
80
|
+
return false if code.nil? || code.strip.empty? || syntax_error?(code)
|
|
81
|
+
|
|
82
|
+
Ripper.lex(code).each do |_, token, str|
|
|
83
|
+
case token
|
|
84
|
+
when *STATIC_TOKENS
|
|
85
|
+
# noop
|
|
86
|
+
when :on_kw
|
|
87
|
+
return false unless STATIC_KEYWORDS.include?(str)
|
|
88
|
+
when :on_op
|
|
89
|
+
return false unless STATIC_OPERATORS.include?(str)
|
|
90
|
+
when *DYNAMIC_TOKENS
|
|
91
|
+
return false
|
|
92
|
+
else
|
|
93
|
+
return false
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
!ShorthandSyntaxChecker.shorthand?(code)
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def syntax_error?(code)
|
|
101
|
+
SyntaxChecker.new(code).parse
|
|
102
|
+
false
|
|
103
|
+
rescue SyntaxChecker::ParseError
|
|
104
|
+
true
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
class SyntaxChecker < Ripper
|
|
108
|
+
class ParseError < StandardError; end
|
|
109
|
+
|
|
110
|
+
private
|
|
111
|
+
|
|
112
|
+
def on_parse_error(*)
|
|
113
|
+
raise ParseError
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
class ShorthandSyntaxChecker < Ripper
|
|
118
|
+
class << self
|
|
119
|
+
def shorthand?(code)
|
|
120
|
+
instance = new(code)
|
|
121
|
+
instance.parse
|
|
122
|
+
instance.shorthand
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
attr_reader :shorthand
|
|
127
|
+
|
|
128
|
+
def initialize(*)
|
|
129
|
+
super
|
|
130
|
+
@shorthand = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
private
|
|
134
|
+
|
|
135
|
+
def on_assoc_new(key, value)
|
|
136
|
+
@shorthand = true if value.nil?
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
else
|
|
141
|
+
class << self
|
|
142
|
+
def available?
|
|
143
|
+
false
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Copyright (c) 2010-2016 Ryan Tomayko <http://tomayko.com/about>
|
|
2
|
-
Copyright (c) 2015-
|
|
2
|
+
Copyright (c) 2015-2026 Jeremy Evans and contributors
|
|
3
3
|
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
5
|
of this software and associated documentation files (the "Software"), to
|
|
@@ -50,14 +50,24 @@ if defined?(::Commonmarker)
|
|
|
50
50
|
parse_opts = [
|
|
51
51
|
:smart,
|
|
52
52
|
:default_info_string,
|
|
53
|
+
:relaxed_tasklist_matching,
|
|
54
|
+
:relaxed_autolinks,
|
|
55
|
+
:leave_footnote_definitions,
|
|
56
|
+
:ignore_setext,
|
|
53
57
|
].freeze
|
|
54
58
|
render_opts = [
|
|
55
59
|
:hardbreaks,
|
|
56
60
|
:github_pre_lang,
|
|
61
|
+
:full_info_string,
|
|
57
62
|
:width,
|
|
58
63
|
:unsafe,
|
|
59
64
|
:escape,
|
|
60
65
|
:sourcepos,
|
|
66
|
+
:escaped_char_spans,
|
|
67
|
+
:ignore_empty_links,
|
|
68
|
+
:gfm_quirks,
|
|
69
|
+
:prefer_fenced,
|
|
70
|
+
:tasklist_classes,
|
|
61
71
|
].freeze
|
|
62
72
|
exts = [
|
|
63
73
|
:strikethrough,
|
|
@@ -68,9 +78,23 @@ if defined?(::Commonmarker)
|
|
|
68
78
|
:superscript,
|
|
69
79
|
:header_ids,
|
|
70
80
|
:footnotes,
|
|
81
|
+
:inline_footnotes,
|
|
71
82
|
:description_lists,
|
|
72
83
|
:front_matter_delimiter,
|
|
84
|
+
:multiline_block_quotes,
|
|
85
|
+
:math_dollars,
|
|
86
|
+
:math_code,
|
|
73
87
|
:shortcodes,
|
|
88
|
+
:wikilinks_title_before_pipe,
|
|
89
|
+
:wikilinks_title_after_pipe,
|
|
90
|
+
:underline,
|
|
91
|
+
:spoiler,
|
|
92
|
+
:greentext,
|
|
93
|
+
:subscript,
|
|
94
|
+
:subtext,
|
|
95
|
+
:alerts,
|
|
96
|
+
:cjk_friendly_emphasis,
|
|
97
|
+
:highlight,
|
|
74
98
|
].freeze
|
|
75
99
|
|
|
76
100
|
Tilt::CommonMarkerTemplate = Tilt::StaticTemplate.subclass do
|
|
@@ -28,6 +28,14 @@ require 'rdoc/markup'
|
|
|
28
28
|
require 'rdoc/markup/to_html'
|
|
29
29
|
require 'rdoc/options'
|
|
30
30
|
|
|
31
|
-
Tilt::RDocTemplate =
|
|
32
|
-
|
|
31
|
+
Tilt::RDocTemplate = if defined?(RDoc::VERSION) && RDoc::VERSION >= "8"
|
|
32
|
+
Tilt::StaticTemplate.subclass do
|
|
33
|
+
RDoc::Markup::ToHtml.new.convert(@data).to_s
|
|
34
|
+
end
|
|
35
|
+
# :nocov:
|
|
36
|
+
else
|
|
37
|
+
Tilt::StaticTemplate.subclass do
|
|
38
|
+
RDoc::Markup::ToHtml.new(RDoc::Options.new, nil).convert(@data).to_s
|
|
39
|
+
end
|
|
33
40
|
end
|
|
41
|
+
# :nocov:
|
|
@@ -25,6 +25,7 @@ class Brakeman::CheckEOLRails < Brakeman::EOLCheck
|
|
|
25
25
|
['7.0.0', '7.0.99'] => Date.new(2025, 4, 1),
|
|
26
26
|
['7.1.0', '7.1.99'] => Date.new(2025, 10, 1),
|
|
27
27
|
['7.2.0', '7.2.99'] => Date.new(2026, 8, 9),
|
|
28
|
-
['8.0.0', '8.0.99'] => Date.new(2026,
|
|
28
|
+
['8.0.0', '8.0.99'] => Date.new(2026, 11, 7),
|
|
29
|
+
['8.1.0', '8.1.99'] => Date.new(2027, 10, 10),
|
|
29
30
|
}
|
|
30
31
|
end
|
|
@@ -55,6 +55,13 @@ class Brakeman::CheckExecute < Brakeman::BaseCheck
|
|
|
55
55
|
first_arg = call.first_arg
|
|
56
56
|
failure = nil
|
|
57
57
|
|
|
58
|
+
# All spawn-family methods optionally accept an env hash as the first
|
|
59
|
+
# argument. Strip it so first_arg always points to the command name.
|
|
60
|
+
if hash?(first_arg)
|
|
61
|
+
args.delete_at(1)
|
|
62
|
+
first_arg = args[1]
|
|
63
|
+
end
|
|
64
|
+
|
|
58
65
|
case call.method
|
|
59
66
|
when :popen
|
|
60
67
|
# Normally, if we're in a `popen` call, we only are worried about shell
|
|
@@ -99,14 +106,17 @@ class Brakeman::CheckExecute < Brakeman::BaseCheck
|
|
|
99
106
|
|
|
100
107
|
break if failure
|
|
101
108
|
end
|
|
102
|
-
when :system, :exec
|
|
103
|
-
|
|
104
|
-
#
|
|
105
|
-
#
|
|
106
|
-
#
|
|
107
|
-
#
|
|
108
|
-
#
|
|
109
|
-
|
|
109
|
+
when :system, :exec, :spawn, :capture2, :capture2e, :capture3,
|
|
110
|
+
:popen2, :popen2e, :popen3
|
|
111
|
+
# Comma-separated arguments are passed directly to execve without a
|
|
112
|
+
# shell, so only the first argument (the command name) needs checking.
|
|
113
|
+
# Exception: `bash -c <script>` — the script is the injection vector.
|
|
114
|
+
#
|
|
115
|
+
# All of these methods accept an optional trailing options hash
|
|
116
|
+
# (e.g. stdin_data:, chdir:); strip it before checking.
|
|
117
|
+
args.pop if hash?(args.last) && args.length > 2
|
|
118
|
+
|
|
119
|
+
if dash_c_shell_command?(first_arg, args[2])
|
|
110
120
|
failure = include_user_input?(args[3]) ||
|
|
111
121
|
dangerous_interp?(args[3]) ||
|
|
112
122
|
dangerous_string_building?(args[3])
|
|
@@ -115,16 +125,6 @@ class Brakeman::CheckExecute < Brakeman::BaseCheck
|
|
|
115
125
|
dangerous_interp?(first_arg) ||
|
|
116
126
|
dangerous_string_building?(first_arg)
|
|
117
127
|
end
|
|
118
|
-
when :capture2, :capture2e, :capture3
|
|
119
|
-
# Open3 capture methods can take a :stdin_data argument which is used as the
|
|
120
|
-
# the input to the called command so it is not succeptable to command injection.
|
|
121
|
-
# As such if the last argument is a hash (and therefore execution options) it
|
|
122
|
-
# should be ignored
|
|
123
|
-
|
|
124
|
-
args.pop if hash?(args.last) && args.length > 2
|
|
125
|
-
failure = include_user_input?(args) ||
|
|
126
|
-
dangerous_interp?(args) ||
|
|
127
|
-
dangerous_string_building?(args)
|
|
128
128
|
else
|
|
129
129
|
failure = include_user_input?(args) ||
|
|
130
130
|
dangerous_interp?(args) ||
|
|
@@ -176,6 +176,8 @@ class Brakeman::CheckExecute < Brakeman::BaseCheck
|
|
|
176
176
|
def include_user_input? exp
|
|
177
177
|
if node_type? exp, :arglist, :dstr, :evstr, :dxstr
|
|
178
178
|
exp.each_sexp do |e|
|
|
179
|
+
next if shell_escape? e
|
|
180
|
+
|
|
179
181
|
if res = include_user_input?(e)
|
|
180
182
|
return res
|
|
181
183
|
end
|
|
@@ -196,7 +198,7 @@ class Brakeman::CheckExecute < Brakeman::BaseCheck
|
|
|
196
198
|
# Check for input at start of string
|
|
197
199
|
exp[1] == "" and
|
|
198
200
|
node_type? exp[2], :evstr and
|
|
199
|
-
|
|
201
|
+
dangerous? exp[2]
|
|
200
202
|
else
|
|
201
203
|
has_immediate_user_input? exp
|
|
202
204
|
end
|
|
@@ -266,6 +268,8 @@ class Brakeman::CheckExecute < Brakeman::BaseCheck
|
|
|
266
268
|
end
|
|
267
269
|
|
|
268
270
|
def dangerous_interp? exp
|
|
271
|
+
return if shell_escape? exp
|
|
272
|
+
|
|
269
273
|
match = include_interp? exp
|
|
270
274
|
return unless match
|
|
271
275
|
interp = match.match
|
|
@@ -311,7 +311,7 @@ class Brakeman::CheckSQL < Brakeman::BaseCheck
|
|
|
311
311
|
end
|
|
312
312
|
|
|
313
313
|
if request_value? arg
|
|
314
|
-
unless call? arg and params? arg.target and [:permit, :slice, :to_h, :to_hash, :symbolize_keys].include? arg.method
|
|
314
|
+
unless call? arg and params? arg.target and [:permit, :slice, :to_h, :to_hash, :symbolize_keys, :compact, :compact_blank].include? arg.method
|
|
315
315
|
# Model.where(params[:where])
|
|
316
316
|
arg
|
|
317
317
|
end
|
|
@@ -645,7 +645,7 @@ class Brakeman::CheckSQL < Brakeman::BaseCheck
|
|
|
645
645
|
locale_call? exp
|
|
646
646
|
end
|
|
647
647
|
|
|
648
|
-
QUOTE_METHODS = [:quote, :quote_column_name, :quoted_date, :quote_string, :quote_table_name]
|
|
648
|
+
QUOTE_METHODS = [:quote, :quote_column_name, :quoted_date, :quote_string, :quote_table_name, :quote_schema_name]
|
|
649
649
|
|
|
650
650
|
def quote_call? exp
|
|
651
651
|
if call? exp.target
|
|
@@ -258,12 +258,19 @@ class Brakeman::BaseProcessor < Brakeman::SexpProcessor
|
|
|
258
258
|
#Look for "type" of render in options hash
|
|
259
259
|
#For example, render :file => "blah"
|
|
260
260
|
if hash? last_arg
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
261
|
+
if type
|
|
262
|
+
#The render type was already determined by a positional argument, so a
|
|
263
|
+
#key in the options hash that happens to match a render type name (e.g.
|
|
264
|
+
#`text:`) is a local passed to the partial/action, not a type directive.
|
|
265
|
+
rest = last_arg
|
|
266
|
+
else
|
|
267
|
+
hash_iterate(last_arg) do |key, val|
|
|
268
|
+
if symbol? key and types_in_hash.include? key.value
|
|
269
|
+
type = key.value
|
|
270
|
+
value = val
|
|
271
|
+
else
|
|
272
|
+
rest << key << val
|
|
273
|
+
end
|
|
267
274
|
end
|
|
268
275
|
end
|
|
269
276
|
end
|
|
@@ -6,7 +6,7 @@ class Brakeman::GemProcessor < Brakeman::BasicProcessor
|
|
|
6
6
|
def initialize *args
|
|
7
7
|
super
|
|
8
8
|
@gem_name_version = /^\s*([-_+.A-Za-z0-9]+) \((\w(\.\w+)*)\)/
|
|
9
|
-
@ruby_version = /^\s+ruby (\d
|
|
9
|
+
@ruby_version = /^\s+ruby (\d+\.\d+\.\d+)/
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def process_gems gem_files
|
|
@@ -19,7 +19,9 @@ module Brakeman::RenderHelper
|
|
|
19
19
|
end
|
|
20
20
|
when :default
|
|
21
21
|
begin
|
|
22
|
-
|
|
22
|
+
# exp[2] is either the action name (from controller) or :default when no explicit arg
|
|
23
|
+
name_arg = (exp[2].nil? || exp[2] == :default) ? nil : exp[2]
|
|
24
|
+
process_template template_name(name_arg), exp[3], nil, exp.line
|
|
23
25
|
rescue ArgumentError
|
|
24
26
|
Brakeman.debug "Problem processing render: #{exp}"
|
|
25
27
|
end
|
data/lib/brakeman/scanner.rb
CHANGED
|
@@ -187,8 +187,14 @@ class Brakeman::Scanner
|
|
|
187
187
|
end
|
|
188
188
|
|
|
189
189
|
if @app_tree.exists? ".ruby-version"
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
contents = @app_tree.file_path(".ruby-version").read
|
|
191
|
+
# Skip alternative Ruby implementations — the EOL dates Brakeman knows
|
|
192
|
+
# about are MRI's, so a `.ruby-version` of "jruby-10.0.2.0" should not
|
|
193
|
+
# be parsed as MRI 0.0.2 / 10.0.2.
|
|
194
|
+
unless contents =~ /\A\s*(jruby|truffleruby|rbx|rubinius|mruby)\b/i
|
|
195
|
+
if version = contents[/(\d+\.\d+\.\d+)/]
|
|
196
|
+
tracker.config.set_ruby_version version, @app_tree.file_path(".ruby-version"), 1
|
|
197
|
+
end
|
|
192
198
|
end
|
|
193
199
|
end
|
|
194
200
|
|
data/lib/brakeman/version.rb
CHANGED
data/lib/brakeman.rb
CHANGED
|
@@ -427,7 +427,7 @@ module Brakeman
|
|
|
427
427
|
release_date = latest.date.to_date
|
|
428
428
|
latest_version = latest.version.to_s
|
|
429
429
|
|
|
430
|
-
if (Date.today -
|
|
430
|
+
if (Date.today - release_date) >= days_old
|
|
431
431
|
if current != latest_version
|
|
432
432
|
return "Brakeman #{current} is not the latest version #{latest_version}"
|
|
433
433
|
else
|