GithubHelp home page GithubHelp logo

klaxit / danger-brakeman_scanner Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 0.0 26 KB

A Danger plugin for running Ruby files through Brakeman.

Home Page: https://git.io/danger-brakeman_scanner

License: MIT License

Ruby 93.83% Makefile 5.28% Shell 0.90%
danger-plugin ruby ruby-on-rails security-scanner

danger-brakeman_scanner's People

Contributors

buonomo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

danger-brakeman_scanner's Issues

[Bug] Crash if running brakemen.run without specifying options

Hi, I encountered an error while using your library

Describing the error

It occurs when I try to run brakeman without supplying any options

# In Dangerfile
brakeman.run

It crashes with this error

/Users/goose/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/danger-brakeman_scanner-0.1.1/lib/danger_plugin.rb:18:in `dirname': no implicit conversion of nil into String (TypeError)

  def run(options = File.dirname(Kernel.caller_locations.first.absolute_path))

I had a look and here's what I found:

  1. It crashes in this line, specifically because Kernel.caller_locations.first.absolute_path is nil
  2. According to this and this, absolute_path can return nil in some situations (those links are pretty old so I'm not sure if they're still hold true today). Using eval seems like one of them. and danger uses it

Dependencies version

  • ruby (3.2.2)
  • danger (9.3.1)
  • danger-brakeman_scanner (0.1.1)
  • brakeman (6.0.1)

Please let me know if there's anything missing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.