Git Product home page Git Product logo

Comments (4)

arthaud avatar arthaud commented on May 27, 2024 1

This is a simple mistake.

my_source() returns a source with kind Test.
engine.execute() has a sink with kind SQL.
There is a rule from source Test to sink Test: https://github.com/cyounkins/pysa-testing/blob/63395fc6b3ba826b1ebb9dec1c55abcadf4c7622/stubs/taint.config#L184-L192
but there is no rule for source Test to sink SQL. There is only one for UserControlled to SQL: https://github.com/cyounkins/pysa-testing/blob/63395fc6b3ba826b1ebb9dec1c55abcadf4c7622/stubs/taint.config#L197-L205
If I change that rule to also accept Test as a source, it does find the flows:

[
  {
    "line": 20,
    "column": 28,
    "stop_line": 20,
    "stop_column": 33,
    "path": "vuln.py",
    "code": 5005,
    "name": "SQL injection.",
    "description": "SQL injection. [5005]: Data from [Test] source(s) may reach [SQL] sink(s)",
    "define": "vuln.vulnerable_func"
  },
  {
    "line": 20,
    "column": 28,
    "stop_line": 20,
    "stop_column": 33,
    "path": "vuln.py",
    "code": 5005,
    "name": "SQL injection.",
    "description": "SQL injection. [5005]: Data from [Test] source(s) may reach [SQL] sink(s)",
    "define": "vuln.vulnerable_func"
  },
  {
    "line": 23,
    "column": 12,
    "stop_line": 23,
    "stop_column": 17,
    "path": "vuln.py",
    "code": 5002,
    "name": "Test flow",
    "description": "Test flow [5002]: Data from [Test] source(s) may reach [Test] sink(s)",
    "define": "vuln.vulnerable_func"
  }
]

from pyre-check.

cyounkins avatar cyounkins commented on May 27, 2024

I did find this commit that maybe breaks SQLAlchemy 1.4? c93e0a1

from pyre-check.

arthaud avatar arthaud commented on May 27, 2024

Hi, thanks for reaching out.
I am able to reproduce, I will need more time to look into this.

from pyre-check.

cyounkins avatar cyounkins commented on May 27, 2024

Ahh thank you! I apologize for the waste of time.

from pyre-check.

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.