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.1.tar.gz (10.6 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.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: logflash-0.2.1.tar.gz
  • Upload date:
  • Size: 10.6 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.1.tar.gz
Algorithm Hash digest
SHA256 37c3b37e2519bb8890b205ced12bf86898dc6eed73edafcc5cb66e48ae85686b
MD5 bd21cb196976ea83f35dfef57454c868
BLAKE2b-256 2d9352e7cc55ae170917e572e3ce27680ea24eda2fa9eba963ac31dfda1f9d0e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: logflash-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 30f55db955d342b755024e733d6f871e032fb19345783594f405dec20cb8c960
MD5 5b65ebdc00839119927e4b6ae92c0205
BLAKE2b-256 c8ef22bff47842cd5de68d30667ddb9ecad9c53659d7db337d6537f8df1287ac

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