Skip to main content

PROTECTSQL

Table of Contents

Installation

Installing the repository for contribution purposes

Please refer to our CONTRIBUTING.md file to setup protectsql locally

Installing the package

Our package is publicly available on PyPi. To install using pip, run the command:

pip install protectsql

Usage

Init command

protectsql init # initialise the pysa configurations

Analyze command

Runs the static analysis.

protectsql analyze # analyze your app

Inspiration

We wanted to make a package to check for SQLi vulnerabilities for generic frameworks/specific to Flask as there are quite a few python applications that don't use ORM and are vulnerable to SQLi vulnerabilities.

What it does

A CLI tool which will help you analyze your python/flask app, using Pysa (a static analysis tool by facebook), In case sqli are found, they're displayed at runtime after running the analyze command.

How we built it

Protectsql is build on top of pysa, a part of the pyre-check project package (see more about pysa here). Additionally, since it's a CLI tool, we also make use of click (see more here).

Tech Stack

  • python
  • pysa
  • click
  • flask

Screenshots

Step 1 Step 2 Step 3 Step 4

Challenges we ran into

  • Understanding pysa documentation
  • Coming up with target frameworks vulnerable to sqli injections and how can we use pysa for them

Accomplishments that we're proud of

  • Using pysa for static analysis
  • Usage of click, the python CLI tool
  • Uploading our own package to PyPi

What's next for Protectsql

We plan to add support to more lightweight framework which does not rely on ORM!

As of now, Protectsql is published on PyPi and is ready for use. Anyone can contribute following our contribution rules and guidelines.

Demo

Metadata

Release files for protectsql 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for protectsql 0.0.7
File Size Uploaded Provenance Actions
protectsql-0.0.7.tar.gz 4.4 kB Without provenance Details for protectsql-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for protectsql 0.0.7
File Interpreter ABI Platform Actions
protectsql-0.0.7-py3-none-any.whl Python 3 none any Details for protectsql-0.0.7-py3-none-any.whl

Total release size: 9.1 kB

Release files / protectsql-0.0.7.tar.gz

Download URL protectsql-0.0.7.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
be71a83696789251b2f2877099a5cd3419ae5a8ea8a5e982036d82d30a4c4e02
BLAKE2b-256 checksum
How to use checksums
e80ef9b38321b9bd2501ba7fb2ce71dadf3f567fbfd43c3b267fc5970adaaeac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / protectsql-0.0.7-py3-none-any.whl

Download URL protectsql-0.0.7-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7a411760b262bcc693f6bb0d27594c3b12f2ad2a5df534560c4f276b29b8d7b
BLAKE2b-256 checksum
How to use checksums
ef27c226066c0e9921986d60b7a966bec2b368823c6392887626c9ef025f6abb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Security for protectsql 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page