Skip to main content

A Modular SAST Engine for rapid local security auditing.

Project description

logflash

A modular Static Application Security Testing (SAST) engine for rapid local security auditing.

Installation

pip install logflash

Usage

logflash /path/to/your/project

The tool will:

  1. Traverse the project (ignoring heavy folders like node_modules and venv).
  2. Scan supported files (.py, .js, .java, .cpp, .php, …) for common vulnerabilities.
  3. Output a nicely formatted, severity‑sorted console report.
  4. Export findings to security_audit_report.json.

Mock Sandbox

Run the tool without arguments to see a demo sandbox:

logflash

It creates a temporary sandbox with vulnerable files and scans them.

Extensibility

  • Rule system – rules live in logflash/rules/ as JSON or YAML. They can be overridden or added without touching the source code.
  • Parser plug‑ins – add a new parser under src/logflash/parsers/ and register it in src/logflash/parsers/__init__.py.

Documentation

  • Full rule schema: docs/rules.md
  • Usage guide and contribution instructions are in the docs/ folder.

Build the package locally

# Ensure build tools are up‑to‑date
python -m pip install --upgrade build twine

# Build the source and wheel distributions
python -m build

The resulting files appear in the dist/ directory:

  • logflash‑<version>.tar.gz (source archive)
  • logflash‑<version>-py3-none-any.whl (wheel)

To verify that the rule files are included:

python -m zipfile -l dist/logflash-*.whl | grep "rules/"

You should see entries such as logflash/rules/default_rules.json.

Publish to PyPI (once version is bumped)

# Bump version in pyproject.toml (e.g. 0.2.0)
python -m pip install --upgrade twine
python -m twine upload dist/*

CI workflow (GitHub Actions)

The CI runs on Python 3.9 and 3.11, installs the test extra (pip install -e .[test]), executes pytest -q, and builds the package.

Note: The workflow uses actions/checkout@v3 and actions/setup-python@v4. They will automatically migrate to Node.js 24 in June 2026, so no changes are required now.

Contributing

  1. Fork the repo and create a branch.
  2. Run the test suite locally: pytest -q.
  3. Add or update tests for new parsers/rules.
  4. Open a Pull Request with a clear description.

License

MIT License – feel free to use this in commercial or open‑source projects.


Feel free to ⭐ the repository if you find it useful!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

logflash-0.2.3.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

logflash-0.2.3-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file logflash-0.2.3.tar.gz.

File metadata

  • Download URL: logflash-0.2.3.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for logflash-0.2.3.tar.gz
Algorithm Hash digest
SHA256 15e7aa3c87008ec74df3d38567eadd21579055bdb31697955e715e627fc99952
MD5 51d952e33c6a49b393dd30ab73e8df4f
BLAKE2b-256 1f953113233d06366e447af77531790b06f65a4918f721e0a75830ff88619c49

See more details on using hashes here.

File details

Details for the file logflash-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: logflash-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for logflash-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bbd3d49fbee0a440b4e782789b53decae1fd2cb60b2bd71c92c15f4471640d44
MD5 b2d2b60b7cf64e26d1c4058f1d2f0b61
BLAKE2b-256 94c435c20e3a547e7fdcb5507cc9de754fce462c9a8c8bb7bc60978131737f3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page