r/Python • u/AutoModerator • 5h ago
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
8
Upvotes
r/Python • u/AutoModerator • 5h ago
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
1
u/BudgetRead4409 2h ago
LogicGuard v0.1.0 (MIT) — Diff-aware Tree-sitter AST + LLM security scanner for catching business-logic bugs in Python, JS, and TS.
What it does: Traditional linters/SAST handle syntax and taint well, while feeding whole repos to an LLM is slow and noisy. LogicGuard splits PR/diff scanning into two stages:
Stage 1 (Tree-sitter AST, ~3ms): Parses only functions modified in
git diffand filters for structural candidates (e.g., mutating routes without auth decorators, check-then-act balance updates without locks, bareexcept: passswallowing state changes). Clean diffs exit immediately with zero API calls.Stage 2 (Structured LLM verification): Sends only matched candidates through Pydantic v2-validated verification using OpenRouter (works with
openrouter/freeat $0), Anthropic, or local Ollama—plus an--offline-onlypure-AST mode.Try it (no install needed):
uvx logicguard rulesuvx logicguard diff --base main --offline-onlyLinks:
GitHub:- https://github.com/Aviation3006/logicguard
PyPI: https://pypi.org/project/logicguard/
GitHub Action (SARIF 2.1.0 Code Scanning): https://github.com/marketplace/actions/logicguard-security-diff-scan
Docs: https://logicguard.me
Ships with 5 rules (
auth_bypass,idor_ownership,race_toctou,silent_except,ai_hallucinated_guard) and a 2-file rule contract (CONTRIBUTING.md) with 8 opengood first issuerule specs if anyone wants to add one.