GithubHelp home page GithubHelp logo

Comments (3)

r0rshark avatar r0rshark commented on September 13, 2024 1

Nice work! I'll spend some time tomorrow going through the list and defining what we can do :)

from pyre-check.

abishekvashok avatar abishekvashok commented on September 13, 2024

I can see CodeQL has support for the following:

  1. CVE-2018-1281 (Bind To All Interfaces) (Not detected)
    Possible way to tackle: Annote bind() as a sink for user controlled data (would never happen in almost all situations)

  2. CWE-020-ExternalAPIs (External APIs are marked as sinks and data from them as taint sources) (not detected) (Do we need such verbosity?)

  3. CWE-020 (Regex serialisation, not definitely a vulnerability, but can be) (not detected)
    Possible way to tackle: annote pattern.regexpMatch and other regex functions as taint sinks for user controlled data

  4. CWE-022 (File system read, write, and tar slip) (tar slip not detected)
    Possible way to tackle: Add models for tar slip? Idk how Pysa detects vulnerabilities such as stored xss. If we do, the same model can be used

  5. CWE-078 (Command Line Injection) (Detected)

  6. CWE-079 (plain XSS and XSS for jinja2) (XSS for jinja2 not detected)
    Possible way to tackle: Tricky in sense that it only occurs when user controlled parameter flows to template called via an environment in which environment has auto_escape turned off (default is off).

  7. CWE-089 (SQL Injection) (Detected)
    Possible way to improve: Add coverage for aiopg and cx_oracle (closed because we thought we need stubs, we can have another go by defining them as site packages). Checked, getting typing.any for aiopg and cx_oracle is written in Cpython.

  8. CWE-094 (Code Injection) (Detected)

  9. CWE-209 (Stack Trace or Exception exposure) (Detected)

  10. CWE-215 (Running flask app in debug mode) (Can Pysa detect this? I am not sure..)

  11. CWE-295 (Missing host key validation) (Not detected)
    Possible way to tackle: Solvable for paramiko library by tainting AutoAddPolicy as source and set_missing_host_key_policy as sink. (We have support for paramiko but not coverage for this vulnerability)

  12. CWE-312 (Putting unhashed values in cookies) (Not detected)
    Possible way to tackle: One way would be to prevent user controlled parameters to reach cookies and add popular hashing functions as features. But the question is, is this necessarily great in impact that it should be added?

  13. CWE-326 (Weak encryption keys) (Pysa can't but how can we make this hit as an issue when we use implicit approach is a question)

  14. CWE-327 (Insecure protocols) (Pysa can't but can be made to with implicit sources?)

  15. CWE-377 (Insecure temporary files) (Pysa can't)

  16. CWE-502 (unsafe deserialisations) (detected)

  17. CWE-601 (Url redirection) (Detected for most popular libraries)

  18. CWE-732 (Weak file permissions) (Pysa can't now, but coding implicit sources would fix this)

  19. CWE-798 (Hardcoded credentials) (Pysa can with implicit sinks for common apis)

from pyre-check.

abishekvashok avatar abishekvashok commented on September 13, 2024

@r0rshark this is my preliminary analysis after checking the python security folder of CodeQL. Curious to know what you think and maybe, we can create issue for each issue we can possibly detect with Pysa

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.