pymodsecurity

Python Bindings for ModSecurity v3

Github星跟蹤圖

Build Status
PyPI version
conda-forge version
PyPI - Python Version
modsecurity version

ModSecurity Python

Python binding for ModSecurity

  • Note: This is an alpha version. Crashes are expected. Comments and suggestions are welcome

Developer Guide

Dependencies

libmodsecurity, python-dev or python3-dev as well as cmake

Bindings and ModSecurity Version Reference, pymodsecurity, ModSecurity, ---------------, -------------, v0.0.1, v3.0.2, v0.0.2, v3.0.2, v0.0.3, v3.0.2, v0.0.4, v3.0.3, Please refer to ModSecurity Releases and ModSecurity Installation Guide

Packages

Pymodsecurity is available as an python package, to install it simply run:

$ pip install pymodsecurity

Building from source

There are multiple ways to build pymodsecurity from source, you can either compile the module manually with CMake, install using setup.py or build a conda package using the recipe. Below are steps for each way.

Installing via setup.py

1 - Clone this repo and update the pybind11 submodule:

$ git clone --recurse-submodules https://github.com/actions-security/pymodsecurity.git

2 - Compile and install the module:

$ python setup.py install

Compiling with CMake

1 - Clone this repo and update the pybind11 submodule:

$ git clone --recurse-submodules https://github.com/actions-security/pymodsecurity.git

2 - Create a build directory:

$ mkdir build && cd build

3 - Run CMake and make:

$ cmake .. && make

4 - Add the shared library to python's path

Building and installing with conda

If you're using conda, you can build the package locally using conda-build (you will need to install conda-build).

1 - Clone this repo and update the pybind11 submodule:

$ git clone --recurse-submodules https://github.com/actions-security/pymodsecurity.git

2 - Run conda-build:

$ conda-build recipe

3 - Install the package:

$ conda install --use-local pymodsecurity

Examples

Some examples are provided in the examples/ directory. More are coming soon.

Real world examples

django middleware

主要指標

概覽
名稱與所有者pymodsecurity/pymodsecurity
主編程語言C++
編程語言Shell (語言數: 5)
平台
許可證Apache License 2.0
所有者活动
創建於2018-09-16 20:59:41
推送於2023-11-11 13:36:55
最后一次提交2020-05-02 18:04:37
發布數5
最新版本名稱v0.0.5 (發布於 )
第一版名稱v0.0.1 (發布於 )
用户参与
星數87
關注者數6
派生數18
提交數98
已啟用問題?
問題數12
打開的問題數4
拉請求數4
打開的拉請求數1
關閉的拉請求數2
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?