Discover and explore top open-source AI tools and projects—updated daily.
duriantacoPython code watchdog for dead logic, security, and quality
Top 94.4% on SourcePulse
Skylos is a static analysis tool designed to enhance code quality and security for Python projects by identifying dead code, detecting vulnerabilities, and auditing code structure. It acts as a "watchdog" for repositories, helping developers prune unreachable functions, eliminate security risks like tainted data and hardcoded secrets, and maintain architectural integrity. Its benefits include automated code cleanup, improved security posture, and proactive identification of potential issues before they impact production.
How It Works
Skylos constructs a comprehensive reference graph of the entire codebase, mapping definitions to their references across all files. It parses code using AST for Python and Tree-sitter for TypeScript, then builds a definition map to track references and identify unused code. For enhanced accuracy, it integrates framework-specific rules (Django, Flask, FastAPI) and supports runtime verification via sys.settrace (--trace) to confirm code execution, significantly reducing false positives from dynamic language features. Additionally, it offers AI-powered auditing and autonomous repair capabilities.
Quick Start & Requirements
pip install skylosHighlighted Details
eval/exec and weak cryptography.pyproject.toml, capable of blocking PRs in CI/CD pipelines.--audit) to find hallucinations and flaws, and autonomous repair (--fix) to automatically correct identified issues.--trace option uses sys.settrace to record executed code paths, verifying dead code claims against actual runtime behavior.Maintenance & Community
The project has a public roadmap indicating ongoing development, including further optimizations, new rules, expanded language support, and integration improvements. Contribution guidelines are available.
Licensing & Compatibility
Limitations & Caveats
Static analysis inherently struggles with highly dynamic Python features like getattr, globals, and runtime imports, potentially leading to false positives or missed dead code. Framework route detection requires specific confidence levels or runtime tracing. Secrets detection is currently limited to .py files. Runtime verification (--trace) requires tests or application execution to be effective.
1 day ago
Inactive