Code Monkey home page Code Monkey logo

Comments (5)

ejohn20 avatar ejohn20 commented on July 21, 2024

Confirmed bug. Add the IsLocalUrl to the acceptable cleanse methods for SEC0109.

from puma-scan.

ejohn20 avatar ejohn20 commented on July 21, 2024

This will be addressed using a new code block analyzer for taint analysis within a block of code.

from puma-scan.

serbentraut avatar serbentraut commented on July 21, 2024

Same bug appears to apply to SEC110, which is a Web Forms redirect.

from puma-scan.

ejohn20 avatar ejohn20 commented on July 21, 2024

Perfect, we'll make sure both rules are fixable using the code suggestions. For now, you can suppress them by right clicking the warning and adding them to the suppression file.

from puma-scan.

ejohn20 avatar ejohn20 commented on July 21, 2024

In VS2017 SEC0109 is being raised with the following example code, which pretty much mirrors what the documentation says to do to fix it.

Confirmed this is fixed in 2.0 using the new code block analyzer. The method must be invoked on the tainted variable inside the same code block. The analyzers are not smart enough to traces this through multiple method calls.

Same bug appears to apply to SEC110, which is a Web Forms redirect.

The issues was also corrected by the code block analyzer. This code does not get flagged in the 2.0+ version of the analyzers:

Uri uri;
string url = Request.QueryString["returnUrl"];
if (Uri.TryCreate(url, UriKind.Relative, out uri))
{
      Response.Redirect(url);
}

from puma-scan.

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.