brakeman 6.2.2 → 7.0.1
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 +26 -0
- data/README.md +1 -1
- data/bundle/load.rb +10 -8
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/LICENSE.txt +33 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/NEWS.md +990 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/README.md +55 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/core_ext/array.rb +9 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/core_ext/string.rb +9 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/fields_converter.rb +96 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/input_record_separator.rb +18 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/parser.rb +1302 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/row.rb +757 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/table.rb +1055 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/version.rb +6 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv/writer.rb +209 -0
- data/bundle/ruby/3.1.0/gems/csv-3.3.3/lib/csv.rb +3017 -0
- data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/Changelog.md +4 -0
- data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/Gemfile +1 -0
- data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/list_renderer.rb +2 -2
- data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/menu.rb +7 -5
- data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/version.rb +1 -1
- data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline.rb +17 -12
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/config.rb +22 -26
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/history.rb +3 -3
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io/ansi.rb +64 -111
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io/dumb.rb +16 -2
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io/windows.rb +77 -60
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/io.rb +14 -0
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/base.rb +10 -4
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/emacs.rb +96 -96
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/vi_command.rb +182 -182
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/vi_insert.rb +137 -137
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_stroke.rb +26 -16
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/line_editor.rb +238 -404
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/unicode.rb +415 -0
- data/bundle/ruby/3.1.0/gems/reline-0.6.0/lib/reline/version.rb +3 -0
- data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline.rb +18 -18
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/NEWS.md +74 -0
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/baseparser.rb +78 -48
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/pullparser.rb +4 -0
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/rexml.rb +1 -1
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/source.rb +61 -6
- data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/text.rb +15 -40
- data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/History.rdoc +6 -0
- data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/lib/ruby2ruby.rb +7 -4
- data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/History.rdoc +6 -0
- data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/sexp.rb +1 -1
- data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/History.rdoc +149 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/README.md +417 -0
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table/cell.rb +9 -9
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table/row.rb +18 -4
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/separator.rb +66 -0
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/style.rb +284 -0
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table/table.rb +49 -18
- data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/util.rb +13 -0
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table/version.rb +1 -1
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table.rb +2 -2
- data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/terminal-table.gemspec +3 -4
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/creole.rb +2 -0
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/liquid.rb +0 -3
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/mapping.rb +3 -3
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/rdoc.rb +0 -8
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/template.rb +178 -27
- data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt.rb +9 -4
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/CHANGELOG.md +291 -0
- data/bundle/ruby/3.1.0/gems/{unicode-display_width-1.8.0 → unicode-display_width-3.1.4}/MIT-LICENSE.txt +1 -1
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/README.md +194 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/constants.rb +10 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/emoji_support.rb +52 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/index.rb +34 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/no_string_ext.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/reline_ext.rb +14 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width/string_ext.rb +9 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-3.1.4/lib/unicode/display_width.rb +247 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/CHANGELOG.md +191 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/CODE_OF_CONDUCT.md +74 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/Gemfile +7 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/Gemfile.lock +33 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/MIT-LICENSE.txt +20 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/README.md +205 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/data/emoji.marshal.gz +0 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/data/generate_constants.rb +344 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/constants.rb +49 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_basic.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_emoji_keycap.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_mqe.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_mqe_uqe.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_picto.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_picto_no_emoji.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_possible.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_component.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_emoji.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_modifier.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_modifier_base.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_prop_presentation.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_text_presentation.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_valid.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_valid_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_well_formed.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated/regex_well_formed_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_basic.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_emoji_keycap.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_mqe.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_mqe_uqe.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_picto.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_picto_no_emoji.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_possible.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_component.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_emoji.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_modifier.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_modifier_base.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_prop_presentation.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_text_presentation.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_valid.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_valid_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_well_formed.rb +8 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/generated_native/regex_well_formed_include_text.rb +8 -0
- data/bundle/ruby/3.1.0/gems/{unicode-display_width-1.8.0/lib/unicode/display_width → unicode-emoji-4.0.4/lib/unicode/emoji}/index.rb +5 -3
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/lazy_constants.rb +56 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji/list.rb +13 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/lib/unicode/emoji.rb +111 -0
- data/bundle/ruby/3.1.0/gems/unicode-emoji-4.0.4/unicode-emoji.gemspec +22 -0
- data/lib/brakeman/app_tree.rb +29 -19
- data/lib/brakeman/checks/check_deserialize.rb +4 -1
- data/lib/brakeman/checks/check_evaluation.rb +45 -8
- data/lib/brakeman/checks/check_model_attr_accessible.rb +1 -0
- data/lib/brakeman/checks/check_weak_rsa_key.rb +1 -1
- data/lib/brakeman/file_parser.rb +2 -1
- data/lib/brakeman/options.rb +12 -5
- data/lib/brakeman/processors/alias_processor.rb +9 -4
- data/lib/brakeman/processors/lib/file_type_detector.rb +9 -7
- data/lib/brakeman/report/ignore/config.rb +0 -1
- data/lib/brakeman/report/report_sarif.rb +122 -2
- data/lib/brakeman/rescanner.rb +40 -390
- data/lib/brakeman/scanner.rb +84 -51
- data/lib/brakeman/tracker/file_cache.rb +83 -0
- data/lib/brakeman/tracker.rb +19 -2
- data/lib/brakeman/version.rb +1 -1
- data/lib/brakeman.rb +19 -2
- metadata +265 -199
- data/bundle/ruby/3.1.0/gems/reline-0.5.10/lib/reline/terminfo.rb +0 -158
- data/bundle/ruby/3.1.0/gems/reline-0.5.10/lib/reline/unicode.rb +0 -671
- data/bundle/ruby/3.1.0/gems/reline-0.5.10/lib/reline/version.rb +0 -3
- data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/History.rdoc +0 -85
- data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/README.rdoc +0 -247
- data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -14
- data/bundle/ruby/3.1.0/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -79
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/erubis.rb +0 -51
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/maruku.rb +0 -10
- data/bundle/ruby/3.1.0/gems/tilt-2.4.0/lib/tilt/wikicloth.rb +0 -12
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/CHANGELOG.md +0 -137
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/README.md +0 -124
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/constants.rb +0 -8
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/no_string_ext.rb +0 -7
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/string_ext.rb +0 -17
- data/bundle/ruby/3.1.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width.rb +0 -51
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/AUTHORS +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/COPYING +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/LICENSE +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/README.md +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/TODO +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/highline.gemspec +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/builtin_styles.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/color_scheme.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/compatibility.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/custom_errors.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/import.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/io_console_compatible.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/list.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/menu/item.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/paginator.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/question/answer_converter.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/question.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/question_asker.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/simulate.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/statement.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/string.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/string_extensions.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/style.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/template_renderer.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal/io_console.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal/ncurses.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal/unix_stty.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/terminal.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{highline-3.1.1 → highline-3.1.2}/lib/highline/wrapper.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/BSDL +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/COPYING +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/README.md +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/face.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor/composite.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/key_actor.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/kill_ring.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/lib/reline/unicode/east_asian_width.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{reline-0.5.10 → reline-0.6.0}/license_of_rb-readline +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/LICENSE.txt +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/README.md +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/attlistdecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/attribute.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/cdata.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/child.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/comment.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/doctype.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/document.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/dtd/attlistdecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/dtd/dtd.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/dtd/elementdecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/dtd/entitydecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/dtd/notationdecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/element.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/encoding.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/entity.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/formatters/default.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/formatters/pretty.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/formatters/transitive.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/functions.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/instruction.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/light/node.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/namespace.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/node.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/output.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parent.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parseexception.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/lightparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/sax2parser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/streamparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/treeparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/ultralightparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/parsers/xpathparser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/quickpath.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/sax2listener.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/security.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/streamlistener.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/undefinednamespaceexception.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/validation/relaxng.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/validation/validation.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/validation/validationexception.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/xmldecl.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/xmltokens.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/xpath.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml/xpath_parser.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{rexml-3.3.8 → rexml-3.4.1}/lib/rexml.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/Manifest.txt +0 -0
- /data/bundle/ruby/3.1.0/gems/{ruby2ruby-2.5.1 → ruby2ruby-2.5.2}/README.rdoc +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/Manifest.txt +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/README.rdoc +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/composite_sexp_processor.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/pt_testcase.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/sexp_matcher.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/strict_sexp.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{sexp_processor-4.17.2 → sexp_processor-4.17.3}/lib/unique.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/Gemfile +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/LICENSE.txt +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/Manifest +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/Todo.rdoc +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table/import.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{terminal-table-1.8.0 → terminal-table-4.0.0}/lib/terminal-table/table_helper.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/COPYING +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/_emacs_org.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/_handlebars.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/_jbuilder.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/_org.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/asciidoc.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/babel.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/builder.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/cli.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/coffee.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/commonmarker.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/csv.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/erb.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/erubi.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/etanni.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/haml.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/kramdown.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/livescript.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/markaby.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/nokogiri.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/pandoc.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/pipeline.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/plain.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/prawn.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/radius.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/rdiscount.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/redcarpet.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/redcloth.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/rst-pandoc.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/sass.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/slim.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/string.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/typescript.rb +0 -0
- /data/bundle/ruby/3.1.0/gems/{tilt-2.4.0 → tilt-2.6.0}/lib/tilt/yajl.rb +0 -0
@@ -0,0 +1,111 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "emoji/constants"
|
4
|
+
|
5
|
+
module Unicode
|
6
|
+
module Emoji
|
7
|
+
autoload :INDEX, File.expand_path('emoji/index', __dir__)
|
8
|
+
|
9
|
+
%w[
|
10
|
+
EMOJI_CHAR
|
11
|
+
EMOJI_PRESENTATION
|
12
|
+
TEXT_PRESENTATION
|
13
|
+
EMOJI_COMPONENT
|
14
|
+
EMOJI_MODIFIER_BASES
|
15
|
+
EMOJI_MODIFIERS
|
16
|
+
EXTENDED_PICTOGRAPHIC
|
17
|
+
EXTENDED_PICTOGRAPHIC_NO_EMOJI
|
18
|
+
EMOJI_KEYCAPS
|
19
|
+
VALID_REGION_FLAGS
|
20
|
+
VALID_SUBDIVISIONS
|
21
|
+
RECOMMENDED_SUBDIVISION_FLAGS
|
22
|
+
RECOMMENDED_ZWJ_SEQUENCES
|
23
|
+
].each do |const_name|
|
24
|
+
autoload const_name, File.expand_path('emoji/lazy_constants', __dir__)
|
25
|
+
end
|
26
|
+
|
27
|
+
%w[
|
28
|
+
LIST
|
29
|
+
LIST_REMOVED_KEYS
|
30
|
+
].each do |const_name|
|
31
|
+
autoload const_name, File.expand_path('emoji/list', __dir__)
|
32
|
+
end
|
33
|
+
|
34
|
+
generated_constants_dirpath = File.expand_path(
|
35
|
+
EMOJI_VERSION == RbConfig::CONFIG["UNICODE_EMOJI_VERSION"] ? "emoji/generated_native/" : "emoji/generated/",
|
36
|
+
__dir__
|
37
|
+
)
|
38
|
+
|
39
|
+
%w[
|
40
|
+
REGEX
|
41
|
+
REGEX_INCLUDE_TEXT
|
42
|
+
REGEX_INCLUDE_MQE
|
43
|
+
REGEX_INCLUDE_MQE_UQE
|
44
|
+
REGEX_VALID
|
45
|
+
REGEX_VALID_INCLUDE_TEXT
|
46
|
+
REGEX_WELL_FORMED
|
47
|
+
REGEX_WELL_FORMED_INCLUDE_TEXT
|
48
|
+
REGEX_POSSIBLE
|
49
|
+
REGEX_BASIC
|
50
|
+
REGEX_TEXT
|
51
|
+
REGEX_TEXT_PRESENTATION
|
52
|
+
REGEX_PROP_EMOJI
|
53
|
+
REGEX_PROP_MODIFIER
|
54
|
+
REGEX_PROP_MODIFIER_BASE
|
55
|
+
REGEX_PROP_COMPONENT
|
56
|
+
REGEX_PROP_PRESENTATION
|
57
|
+
REGEX_PICTO
|
58
|
+
REGEX_PICTO_NO_EMOJI
|
59
|
+
REGEX_EMOJI_KEYCAP
|
60
|
+
].each do |const_name|
|
61
|
+
autoload const_name, File.join(generated_constants_dirpath, const_name.downcase)
|
62
|
+
end
|
63
|
+
|
64
|
+
# Return Emoji properties of character as an Array or nil
|
65
|
+
# See PROPERTY_NAMES constant for possible properties
|
66
|
+
#
|
67
|
+
# Source: see https://www.unicode.org/Public/16.0.0/ucd/emoji/emoji-data.txt
|
68
|
+
def self.properties(char)
|
69
|
+
ord = get_codepoint_value(char)
|
70
|
+
props = INDEX[:PROPERTIES][ord]
|
71
|
+
|
72
|
+
if props
|
73
|
+
props.map{ |prop| PROPERTY_NAMES[prop] }
|
74
|
+
else
|
75
|
+
# nothing
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Returns ordered list of Emoji, categorized in a three-level deep Hash structure
|
80
|
+
def self.list(key = nil, sub_key = nil)
|
81
|
+
return LIST unless key || sub_key
|
82
|
+
if LIST_REMOVED_KEYS.include?(key)
|
83
|
+
$stderr.puts "Warning(unicode-emoji): The category of #{key} does not exist anymore"
|
84
|
+
end
|
85
|
+
LIST.dig(*[key, sub_key].compact)
|
86
|
+
end
|
87
|
+
|
88
|
+
def self.get_codepoint_value(char)
|
89
|
+
ord = nil
|
90
|
+
|
91
|
+
if char.valid_encoding?
|
92
|
+
ord = char.ord
|
93
|
+
elsif char.encoding.name == "UTF-8"
|
94
|
+
begin
|
95
|
+
ord = char.unpack("U*")[0]
|
96
|
+
rescue ArgumentError
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
if ord
|
101
|
+
ord
|
102
|
+
else
|
103
|
+
raise(ArgumentError, "Unicode::Emoji must be given a valid string")
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
class << self
|
108
|
+
private :get_codepoint_value
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
require File.dirname(__FILE__) + "/lib/unicode/emoji/constants"
|
4
|
+
|
5
|
+
Gem::Specification.new do |gem|
|
6
|
+
gem.name = "unicode-emoji"
|
7
|
+
gem.version = Unicode::Emoji::VERSION
|
8
|
+
gem.summary = "Emoji data and regex"
|
9
|
+
gem.description = "[Emoji #{Unicode::Emoji::EMOJI_VERSION}] Provides Unicode Emoji data and regexes, incorporating the latest Unicode and Emoji standards. Includes a categorized list of recommended Emoji."
|
10
|
+
gem.authors = ["Jan Lelis"]
|
11
|
+
gem.email = ["hi@ruby.consulting"]
|
12
|
+
gem.homepage = "https://github.com/janlelis/unicode-emoji"
|
13
|
+
gem.license = "MIT"
|
14
|
+
|
15
|
+
gem.files = Dir["{**/}{.*,*}"].select{ |path| File.file?(path) && path !~ /^pkg/ && path !~ /spec\/data\/[^.]/ }
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.require_paths = ["lib"]
|
19
|
+
gem.metadata = { "rubygems_mfa_required" => "true" }
|
20
|
+
|
21
|
+
gem.required_ruby_version = ">= 2.5", "< 4.0"
|
22
|
+
end
|
data/lib/brakeman/app_tree.rb
CHANGED
@@ -22,6 +22,8 @@ module Brakeman
|
|
22
22
|
init_options[:additional_libs_path] = options[:additional_libs_path]
|
23
23
|
init_options[:engine_paths] = options[:engine_paths]
|
24
24
|
init_options[:skip_vendor] = options[:skip_vendor]
|
25
|
+
init_options[:follow_symlinks] = options[:follow_symlinks]
|
26
|
+
|
25
27
|
new(root, init_options)
|
26
28
|
end
|
27
29
|
|
@@ -64,6 +66,7 @@ module Brakeman
|
|
64
66
|
@absolute_engine_paths = @engine_paths.select { |path| path.start_with?(File::SEPARATOR) }
|
65
67
|
@relative_engine_paths = @engine_paths - @absolute_engine_paths
|
66
68
|
@skip_vendor = init_options[:skip_vendor]
|
69
|
+
@follow_symlinks = init_options[:follow_symlinks]
|
67
70
|
@gemspec = nil
|
68
71
|
@root_search_pattern = nil
|
69
72
|
end
|
@@ -161,28 +164,38 @@ module Brakeman
|
|
161
164
|
end
|
162
165
|
|
163
166
|
def glob_files(directory, name, extensions = ".rb")
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
167
|
+
if @follow_symlinks
|
168
|
+
root_directory = "#{root_search_pattern}#{directory}"
|
169
|
+
patterns = ["#{root_directory}/**/#{name}#{extensions}"]
|
170
|
+
|
171
|
+
Dir.glob("#{root_directory}/**/*", File::FNM_DOTMATCH).each do |path|
|
172
|
+
if File.symlink?(path) && File.directory?(path)
|
173
|
+
symlink_target = File.readlink(path)
|
174
|
+
if Pathname.new(symlink_target).relative?
|
175
|
+
symlink_target = File.join(File.dirname(path), symlink_target)
|
176
|
+
end
|
177
|
+
patterns << "#{search_pattern(symlink_target)}/**/#{name}#{extensions}"
|
172
178
|
end
|
173
|
-
patterns << "#{search_pattern(symlink_target)}/**/#{name}#{extensions}"
|
174
179
|
end
|
175
|
-
end
|
176
180
|
|
177
|
-
|
178
|
-
|
181
|
+
files = patterns.flat_map { |pattern| Dir.glob(pattern) }
|
182
|
+
files.uniq
|
183
|
+
else
|
184
|
+
pattern = "#{root_search_pattern}#{directory}/**/#{name}#{extensions}"
|
185
|
+
Dir.glob(pattern)
|
186
|
+
end
|
179
187
|
end
|
180
188
|
|
181
189
|
def select_files(paths)
|
182
190
|
paths = select_only_files(paths)
|
183
191
|
paths = reject_skipped_files(paths)
|
184
192
|
paths = convert_to_file_paths(paths)
|
185
|
-
reject_global_excludes(paths)
|
193
|
+
paths = reject_global_excludes(paths)
|
194
|
+
reject_directories(paths)
|
195
|
+
end
|
196
|
+
|
197
|
+
def reject_directories(paths)
|
198
|
+
paths.reject { |path| File.directory?(path) }
|
186
199
|
end
|
187
200
|
|
188
201
|
def select_only_files(paths)
|
@@ -201,15 +214,14 @@ module Brakeman
|
|
201
214
|
end
|
202
215
|
end
|
203
216
|
|
204
|
-
EXCLUDED_PATHS = %w[
|
205
|
-
|
217
|
+
EXCLUDED_PATHS = regex_for_paths %w[
|
218
|
+
generators/
|
206
219
|
lib/tasks/
|
207
220
|
lib/templates/
|
208
221
|
db/
|
209
222
|
spec/
|
210
223
|
test/
|
211
224
|
tmp/
|
212
|
-
log/
|
213
225
|
]
|
214
226
|
|
215
227
|
def reject_global_excludes(paths)
|
@@ -219,9 +231,7 @@ module Brakeman
|
|
219
231
|
if @skip_vendor and relative_path.include? 'vendor/' and !in_engine_paths?(path) and !in_add_libs_paths?(path)
|
220
232
|
true
|
221
233
|
else
|
222
|
-
EXCLUDED_PATHS
|
223
|
-
relative_path.include? excluded
|
224
|
-
end
|
234
|
+
match_path EXCLUDED_PATHS, path
|
225
235
|
end
|
226
236
|
end
|
227
237
|
end
|
@@ -76,10 +76,13 @@ class Brakeman::CheckDeserialize < Brakeman::BaseCheck
|
|
76
76
|
confidence = :high
|
77
77
|
elsif input = include_user_input?(arg)
|
78
78
|
confidence = :medium
|
79
|
+
elsif target == :Marshal
|
80
|
+
confidence = :low
|
81
|
+
message = msg("Use of ", msg_code("#{target}.#{method}"), " may be dangerous")
|
79
82
|
end
|
80
83
|
|
81
84
|
if confidence
|
82
|
-
message
|
85
|
+
message ||= msg(msg_code("#{target}.#{method}"), " called with ", msg_input(input))
|
83
86
|
|
84
87
|
warn :result => result,
|
85
88
|
:warning_type => "Remote Code Execution",
|
@@ -22,14 +22,51 @@ class Brakeman::CheckEvaluation < Brakeman::BaseCheck
|
|
22
22
|
def process_result result
|
23
23
|
return unless original? result
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
25
|
+
first_arg = result[:call].first_arg
|
26
|
+
|
27
|
+
unless safe_value? first_arg
|
28
|
+
if input = include_user_input?(first_arg)
|
29
|
+
confidence = :high
|
30
|
+
message = msg(msg_input(input), " evaluated as code")
|
31
|
+
elsif string_evaluation? first_arg
|
32
|
+
confidence = :low
|
33
|
+
message = "Dynamic string evaluated as code"
|
34
|
+
elsif result[:call].method == :eval
|
35
|
+
confidence = :low
|
36
|
+
message = "Dynamic code evaluation"
|
37
|
+
end
|
38
|
+
|
39
|
+
if confidence
|
40
|
+
warn :result => result,
|
41
|
+
:warning_type => "Dangerous Eval",
|
42
|
+
:warning_code => :code_eval,
|
43
|
+
:message => message,
|
44
|
+
:user_input => input,
|
45
|
+
:confidence => confidence,
|
46
|
+
:cwe_id => [913, 95]
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def string_evaluation? exp
|
52
|
+
string_interp? exp or
|
53
|
+
(call? exp and string? exp.target)
|
54
|
+
end
|
55
|
+
|
56
|
+
def safe_value? exp
|
57
|
+
return true unless sexp? exp
|
58
|
+
|
59
|
+
case exp.sexp_type
|
60
|
+
when :dstr
|
61
|
+
exp.all? { |e| safe_value? e}
|
62
|
+
when :evstr
|
63
|
+
safe_value? exp.value
|
64
|
+
when :str, :lit
|
65
|
+
true
|
66
|
+
when :call
|
67
|
+
always_safe_method? exp.method
|
68
|
+
else
|
69
|
+
false
|
33
70
|
end
|
34
71
|
end
|
35
72
|
end
|
data/lib/brakeman/file_parser.rb
CHANGED
@@ -13,8 +13,9 @@ module Brakeman
|
|
13
13
|
if @use_prism
|
14
14
|
begin
|
15
15
|
require 'prism'
|
16
|
+
Brakeman.debug '[Notice] Using Prism parser'
|
16
17
|
rescue LoadError => e
|
17
|
-
Brakeman.debug "Asked to use Prism, but failed to load: #{e}"
|
18
|
+
Brakeman.debug "[Notice] Asked to use Prism, but failed to load: #{e}"
|
18
19
|
@use_prism = false
|
19
20
|
end
|
20
21
|
end
|
data/lib/brakeman/options.rb
CHANGED
@@ -161,14 +161,13 @@ module Brakeman::Options
|
|
161
161
|
|
162
162
|
opts.on "--[no-]prism", "Use the Prism parser" do |use_prism|
|
163
163
|
if use_prism
|
164
|
-
|
164
|
+
min_prism_version = '1.0.0'
|
165
165
|
|
166
166
|
begin
|
167
|
-
|
168
|
-
|
169
|
-
gem 'prism', "~>#{prism_version}"
|
167
|
+
gem 'prism', ">=#{min_prism_version}"
|
168
|
+
require 'prism'
|
170
169
|
rescue Gem::MissingSpecVersionError, Gem::MissingSpecError, Gem::LoadError => e
|
171
|
-
$stderr.puts "Please install `prism` version #{
|
170
|
+
$stderr.puts "Please install `prism` version #{min_prism_version} or newer:"
|
172
171
|
raise e
|
173
172
|
end
|
174
173
|
end
|
@@ -223,6 +222,14 @@ module Brakeman::Options
|
|
223
222
|
options[:engine_paths].merge paths
|
224
223
|
end
|
225
224
|
|
225
|
+
opts.on '--[no-]follow-symlinks', 'Follow symbolic links for directions' do |follow_symlinks|
|
226
|
+
options[:follow_symlinks] = follow_symlinks
|
227
|
+
end
|
228
|
+
|
229
|
+
opts.on '--gemfile GEMFILE', 'Specify Gemfile to scan' do |gemfile|
|
230
|
+
options[:gemfile] = gemfile
|
231
|
+
end
|
232
|
+
|
226
233
|
opts.on "-E", "--enable Check1,Check2,etc", Array, "Enable the specified checks" do |checks|
|
227
234
|
checks.map! do |check|
|
228
235
|
if check.start_with? "Check"
|
@@ -97,6 +97,7 @@ class Brakeman::AliasProcessor < Brakeman::SexpProcessor
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def process_bracket_call exp
|
100
|
+
# TODO: What is even happening in this method?
|
100
101
|
r = replace(exp)
|
101
102
|
|
102
103
|
if r != exp
|
@@ -127,7 +128,7 @@ class Brakeman::AliasProcessor < Brakeman::SexpProcessor
|
|
127
128
|
return r
|
128
129
|
end
|
129
130
|
else
|
130
|
-
t =
|
131
|
+
t = exp.target # put it back?
|
131
132
|
end
|
132
133
|
|
133
134
|
if hash? t
|
@@ -242,6 +243,7 @@ class Brakeman::AliasProcessor < Brakeman::SexpProcessor
|
|
242
243
|
exp = math_op(method, target, first_arg, exp)
|
243
244
|
end
|
244
245
|
when :[]
|
246
|
+
# TODO: This might never be used because of process_bracket_call above
|
245
247
|
if array? target
|
246
248
|
exp = process_array_access(target, exp.args, exp)
|
247
249
|
elsif hash? target
|
@@ -268,7 +270,7 @@ class Brakeman::AliasProcessor < Brakeman::SexpProcessor
|
|
268
270
|
end
|
269
271
|
when :<<
|
270
272
|
if string? target and string? first_arg
|
271
|
-
target.value
|
273
|
+
target.value += first_arg.value
|
272
274
|
env[target_var] = target
|
273
275
|
return target
|
274
276
|
elsif string? target and string_interp? first_arg
|
@@ -276,8 +278,9 @@ class Brakeman::AliasProcessor < Brakeman::SexpProcessor
|
|
276
278
|
env[target_var] = exp
|
277
279
|
elsif string? first_arg and string_interp? target
|
278
280
|
if string? target.last
|
279
|
-
target.last.value
|
281
|
+
target.last.value += first_arg.value
|
280
282
|
elsif target.last.is_a? String
|
283
|
+
# TODO Use target.last += ?
|
281
284
|
target.last << first_arg.value
|
282
285
|
else
|
283
286
|
target << first_arg
|
@@ -666,7 +669,9 @@ class Brakeman::AliasProcessor < Brakeman::SexpProcessor
|
|
666
669
|
end
|
667
670
|
|
668
671
|
unless array? exp[1] and array? exp[2]
|
669
|
-
|
672
|
+
# Already processed RHS, don't do it again
|
673
|
+
# https://github.com/presidentbeef/brakeman/issues/1877
|
674
|
+
return exp
|
670
675
|
end
|
671
676
|
|
672
677
|
vars = exp[1].dup
|
@@ -13,7 +13,7 @@ module Brakeman
|
|
13
13
|
@file_type = guess_from_path(file.path.relative)
|
14
14
|
end
|
15
15
|
|
16
|
-
@file_type || :
|
16
|
+
@file_type || :lib
|
17
17
|
end
|
18
18
|
|
19
19
|
MODEL_CLASSES = [
|
@@ -26,10 +26,10 @@ module Brakeman
|
|
26
26
|
parent = class_name(exp.parent_name)
|
27
27
|
|
28
28
|
if name.match(/Controller$/)
|
29
|
-
@file_type = :
|
29
|
+
@file_type = :controller
|
30
30
|
return exp
|
31
31
|
elsif MODEL_CLASSES.include? parent
|
32
|
-
@file_type = :
|
32
|
+
@file_type = :model
|
33
33
|
return exp
|
34
34
|
end
|
35
35
|
|
@@ -39,19 +39,21 @@ module Brakeman
|
|
39
39
|
def guess_from_path path
|
40
40
|
case
|
41
41
|
when path.include?('app/models')
|
42
|
-
:
|
42
|
+
:model
|
43
43
|
when path.include?('app/controllers')
|
44
|
-
:
|
44
|
+
:controller
|
45
45
|
when path.include?('config/initializers')
|
46
|
-
:
|
46
|
+
:initializer
|
47
47
|
when path.include?('lib/')
|
48
|
-
:
|
48
|
+
:lib
|
49
49
|
when path.match?(%r{config/environments/(?!production\.rb)$})
|
50
50
|
:skip
|
51
51
|
when path.match?(%r{environments/production\.rb$})
|
52
52
|
:skip
|
53
53
|
when path.match?(%r{application\.rb$})
|
54
54
|
:skip
|
55
|
+
when path.match?(%r{config/routes\.rb$})
|
56
|
+
:skip
|
55
57
|
end
|
56
58
|
end
|
57
59
|
|
@@ -1,8 +1,10 @@
|
|
1
|
+
require 'uri'
|
2
|
+
|
1
3
|
class Brakeman::Report::SARIF < Brakeman::Report::Base
|
2
4
|
def generate_report
|
3
5
|
sarif_log = {
|
4
6
|
:version => '2.1.0',
|
5
|
-
:$schema => 'https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0
|
7
|
+
:$schema => 'https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0.json',
|
6
8
|
:runs => runs,
|
7
9
|
}
|
8
10
|
JSON.pretty_generate sarif_log
|
@@ -20,10 +22,122 @@ class Brakeman::Report::SARIF < Brakeman::Report::Base
|
|
20
22
|
},
|
21
23
|
},
|
22
24
|
:results => results,
|
23
|
-
}
|
25
|
+
}.merge(original_uri_base_ids)
|
24
26
|
]
|
25
27
|
end
|
26
28
|
|
29
|
+
# Output base URIs
|
30
|
+
# based on what the user specified for the application path
|
31
|
+
# and whether or not --absolute-paths was set.
|
32
|
+
def original_uri_base_ids
|
33
|
+
if tracker.options[:app_path] == '.'
|
34
|
+
# Probably no app_path was specified, as that's the default
|
35
|
+
|
36
|
+
if absolute_paths?
|
37
|
+
# Set %SRCROOT% to absolute path
|
38
|
+
{
|
39
|
+
originalUriBaseIds: {
|
40
|
+
'%SRCROOT%' => {
|
41
|
+
uri: file_uri(tracker.app_tree.root),
|
42
|
+
description: {
|
43
|
+
text: 'Base path for application'
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
else
|
49
|
+
# Empty %SRCROOT%
|
50
|
+
# This avoids any paths appearing in the report
|
51
|
+
# that are not part of the application directory.
|
52
|
+
# Seems fine!
|
53
|
+
{
|
54
|
+
originalUriBaseIds: {
|
55
|
+
'%SRCROOT%' => {
|
56
|
+
description: {
|
57
|
+
text: 'Base path for application'
|
58
|
+
}
|
59
|
+
},
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
end
|
64
|
+
elsif tracker.options[:app_path] != tracker.app_tree.root
|
65
|
+
# Path was specified and it was relative
|
66
|
+
|
67
|
+
if absolute_paths?
|
68
|
+
# Include absolute root and relative application path
|
69
|
+
{
|
70
|
+
originalUriBaseIds: {
|
71
|
+
PROJECTROOT: {
|
72
|
+
uri: file_uri(tracker.app_tree.root),
|
73
|
+
description: {
|
74
|
+
text: 'Base path for all project files'
|
75
|
+
}
|
76
|
+
},
|
77
|
+
'%SRCROOT%' => {
|
78
|
+
# Technically should ensure this doesn't have any '..'
|
79
|
+
# but... TODO
|
80
|
+
uri: File.join(tracker.options[:app_path], '/'),
|
81
|
+
uriBaseId: 'PROJECTROOT',
|
82
|
+
description: {
|
83
|
+
text: 'Base path for application'
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
else
|
89
|
+
# Just include relative application path.
|
90
|
+
# Not clear this is 100% valid, but there is one example in the spec like this
|
91
|
+
{
|
92
|
+
originalUriBaseIds: {
|
93
|
+
PROJECTROOT: {
|
94
|
+
description: {
|
95
|
+
text: 'Base path for all project files'
|
96
|
+
}
|
97
|
+
},
|
98
|
+
'%SRCROOT%' => {
|
99
|
+
# Technically should ensure this doesn't have any '..'
|
100
|
+
# but... TODO
|
101
|
+
uri: File.join(tracker.options[:app_path], '/'),
|
102
|
+
uriBaseId: 'PROJECTROOT',
|
103
|
+
description: {
|
104
|
+
text: 'Base path for application'
|
105
|
+
}
|
106
|
+
}
|
107
|
+
}
|
108
|
+
}
|
109
|
+
end
|
110
|
+
else
|
111
|
+
# app_path was absolute
|
112
|
+
|
113
|
+
if absolute_paths?
|
114
|
+
# Set %SRCROOT% to absolute path
|
115
|
+
{
|
116
|
+
originalUriBaseIds: {
|
117
|
+
'%SRCROOT%' => {
|
118
|
+
uri: file_uri(tracker.app_tree.root),
|
119
|
+
description: {
|
120
|
+
text: 'Base path for application'
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
124
|
+
}
|
125
|
+
else
|
126
|
+
# Empty %SRCROOT%
|
127
|
+
# Seems fine!
|
128
|
+
{
|
129
|
+
originalUriBaseIds: {
|
130
|
+
'%SRCROOT%' => {
|
131
|
+
description: {
|
132
|
+
text: 'Base path for application'
|
133
|
+
}
|
134
|
+
},
|
135
|
+
}
|
136
|
+
}
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
27
141
|
def rules
|
28
142
|
@rules ||= unique_warnings_by_warning_code.map do |warning|
|
29
143
|
rule_id = render_id warning
|
@@ -130,4 +244,10 @@ class Brakeman::Report::SARIF < Brakeman::Report::Base
|
|
130
244
|
})
|
131
245
|
@@levels_from_confidence[warning.confidence]
|
132
246
|
end
|
247
|
+
|
248
|
+
# File URI as a string with trailing forward-slash
|
249
|
+
# as required by SARIF standard
|
250
|
+
def file_uri(path)
|
251
|
+
URI::File.build(path: File.join(path, '/')).to_s
|
252
|
+
end
|
133
253
|
end
|