Giter Site home page Giter Site logo

Comments (4)

presidentbeef avatar presidentbeef commented on June 11, 2024 1

That works and would probably be how I'd do it, too.

from brakeman.

gavingmiller avatar gavingmiller commented on June 11, 2024

I've managed to put together what's potentially a patch for this. Code below:

def renderable? exp
  return false unless call?(exp)

  if exp.method == :with_content
    exp = exp.target
  end

  return false unless constant?(exp.target)   
  target_class_name = class_name(exp.target)
  known_renderable_class?(target_class_name) or tracker.find_method(:render_in, target_class_name)
end

This looks to handle the cases of with_content in our codebase, and I'm curious if this would be more broadly applicable?

from brakeman.

presidentbeef avatar presidentbeef commented on June 11, 2024

And maybe one day make this check optional.

from brakeman.

gavingmiller avatar gavingmiller commented on June 11, 2024

@presidentbeef awesome, I'll PR it in.

from brakeman.

Related Issues (20)

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.