Security Python ★ 448

duriantaco/skylos

Dead code detection, security scanning, and code quality analysis for Python, TypeScript, and Go. 98% recall with fewer false positives than Vulture. Includes AI-powered remediation.

Claude Desktop config.json'a ekle

{
  "mcpServers": {
    "duriantaco-skylos": {
      "command": "python",
      "args": [
        "-m",
        "skylos"
      ]
    }
  }
}
<h1>Skylos</h1>
<h3>Open-source, local-first checks for dead code, security issues, secrets, quality regressions, and AI-code mistakes before merge.</h3>

License: Apache 2.0 codecov PyPI - Python Version PyPI version VS Code Marketplace Astronomer Trust Discord

Website | Docs | Repo Map | Quick Start | GitHub Action | VS Code Extension | Real-World Results | Benchmarks | Roadmap | Contributing

English | Deutsch | 简体中文 | Translations

What Is Skylos?

Skylos is an open-source static analysis CLI for Python, TypeScript, JavaScript, Java, Go, PHP, Rust, Dart, C#, Shell, and deployment config. It runs locally by default and can also be used as a CI/CD PR gate.

Use Skylos when you want one command to check a repo or pull request for:

  • dead code and unused files
  • security flaws and dangerous data flows
  • secrets and dependency CVEs
  • CI/CD and edge-device deployment misconfigurations
  • quality regressions such as complexity, duplicate branches, and deep nesting
  • common AI-generated code mistakes, including missing guards, fake helpers, invented package APIs, and impossible dependency versions
  • LLM app risks such as unsafe tool use and missing output validation

Start In 60 Seconds

pip install skylos
skylos .

The default scan focuses on dead code. Add security, secrets, quality, and dependency checks with -a:

skylos . -a

Verify a changed file or range before an agent hands it to review:

skylos verify . --file src/app.py --range 40:75 --project-context

Create a project config with thresholds, ignores, template hooks, and vibe dictionary extensions:

skylos init

Create a starter local rule pack:

skylos rules init
skylos rules validate .skylos/rules/local.yml
skylos rules list --json
skylos rules list cross --json
skylos rules list --packs --json
skylos cache stats

Generate a GitHub Actions PR gate:

skylos cicd init
git add .github/workflows/skylos.yml
git commit -m "Add Skylos CI gate"
git push

Need more commands? Read the CLI Reference.

Common Workflows

GoalCommandWhat You GetMore Detail
First dead-code scanskylos .Finds unused functions, classes, imports, files, and framework entrypoint mistakesDead code docs
Security and quality auditskylos . -aAdds dangerous flow, secrets, dependency, config, and quality checksSecurity docs
PR gateskylos cicd initGenerates a GitHub Actions workflow with annotations and failure thresholdsCI/CD guide
Readable terminal reportskylos . --format prettyGroups findings by file with severity badges, snippets, and copyable file:line locationsCLI output modes
Selectable terminal triageskylos . --tuiOpens a keyboard-driven category list, finding list, and detail paneCLI output modes
IDE/test-script outputskylos --format concise src/test.pyPrints only file:line findings and exits non-zero when findings existCLI Reference
In-loop AI-code verificationskylos verify . --file src/app.py --range 40:75Returns narrow JSON for hallucinated helpers, unfinished code, stale references, disabled controls, and API/dependency hallucinationsAI features
Changed-lines reviewskylos . -a --diff origin/mainKeeps findings focused on active work instead of legacy debtQuality gate docs
Runtime-assisted dead-code checkskylos . --traceUses runtime traces to reduce dynamic-code false positivesSmart tracing
Local rule packskylos rules initScaffolds YAML rules for project-specific security and quality checksCustom rules
Security agent quick scanskylos agent security-quick .One-shot LLM security audit; compatibility alias for skylos agent scan . --securityAI features
Security agent deep scanskylos agent security-deep .Three-stage security workflow with threat-model context, static threat traces, discovery/validation, and remediation handoffAI features
AI-assisted reviewskylos agent scan .Static analysis plus optional LLM review and fix suggestionsAI features
Verification-backed remediationskylos agent scan . --fixRe-scans fixed security findings and records proof-test metadata for supported fixesAI features
MCP agent verificationverify_change MCP toolLets Claude, Cursor, and other MCP clients verify an edited file/range with the same schema as skylos verifyMCP server
LLM app defenseskylos defend .Finds missing AI app guardrails mapped to OWASP LLM risksAI defense
Technical debt triageskylos debt .Ranks hotspots and debt trendsTechnical debt

What Skylos Catches

CategoryExamplesWhy It Matters
Dead codeunused functions, classes, imports, package entrypoints, route handlersreduces maintenance cost without breaking dynamic frameworks
Security flawsSQL injection, XSS, SSRF, path traversal, command injection, unsafe deserializationcatches exploitable flows before code reaches main
SecretsAPI keys, tokens, private credentials, high-entropy stringsprevents credentials from leaking through commits and PRs
CI/CD workflowsGitHub Actions and GitLab CI dangerous triggers, unpinned actions/includes, broad tokens, OIDC misuse, cache poisoning, mutable imagesreduces CI/CD supply-chain risk before release jobs run
Edge deployment configDocker Compose privileged device access, host networking, systemd root services, broad capabilities, missing sandboxingcatches repo-controlled settings that turn app bugs into device compromise
Quality regressionscomplexity, deep nesting, duplicate branches, long functions, inconsistent returnskeeps AI-assisted refactors from adding brittle code
AI code mistakesphantom security calls, missing decorators, unfinished stubs, disabled controls, real packages called with invented APIs, impossible npm/Go versionscatches common hallucinated or incomplete code paths before they reach review
LLM app risksunsafe tool use, prompt injection exposure, missing output validation, missing rate limitshelps teams ship AI features with guardrails

See the full Rules Reference.

How Skylos Fits

Skylos is not a replacement for every specialized scanner. It is a local-first repo and PR checker that puts several common review checks behind one CLI.

  • Framework-aware dead code detection: FastAPI, Django, Flask, pytest, SQLAlchemy, Next.js, React, package entrypoints, and common plugin patterns.
  • PR-focused output: diff scanning, CI thresholds, GitHub annotations, and baselines for existing findings.
  • Local-first operation: core static analysis does not require cloud upload or LLM calls.
  • AI-assisted change review: checks for removed validation, auth, logging, CSRF, rate limiting, timeouts, real-package API hallucinations, and other guardrails in generated or edited code.
  • Agent-loop verification: skylos verify and MCP verify_change return versioned JSON for only AI-code trust findings, so coding agents can self-correct before a human sees the change.
  • Verification-backed remediation: security fixes are checked by re-running analysis, and supported findings can include targeted regression-test proof metadata.
  • Project-specific rules: add local YAML rules and extend prompt, credential, sensitive-file, and timeout dictionaries from config.
  • One command surface: dead code, security, secrets, dependency, quality, technical debt, agent review, and AI defense commands share the same CLI.

Install Options

# Core static analysis
pip install skylos

# LLM-powered agent workflows
pip install "skylos[llm]"

# All published optional extras
pip install "skylos[all]"

Container image:

docker pull ghcr.io/duriantaco/skylos:latest
docker run --rm -v "$PWD":/work -w /work ghcr.io/duriantaco/skylos:latest . --json --no-provenance

See Installation for source installs, container usage, and optional dependencies.

Configure Templates And Vibe Checks

Run skylos init to add these sections to pyproject.toml:

[tool.skylos.templates]
# security = ".skylos/templates/security.md"
# quality = ".skylos/templates/quality.md"
# security_audit = ".skylos/templates/security_audit.md"
# review = ".skylos/templates/review.md"

[tool.skylos.vibe]
extra_phantom_names = ["verify_enterprise_auth"]
extra_phantom_decorators = ["tenant_admin_required"]
extra_credential_names = ["tenant_signing_secret"]
extra_network_timeout_calls = ["vendor_sdk.fetch"]

[tool.skylos.contribution]
collect_local_signals = false
contribute_public_corpus = false
structural_signatures_only = true
include_source = false

Template files extend Skylos’ built-in prompts; they do not replace the JSON-only output contract or untrusted-code safety rules. Vibe dictionary extensions let teams teach Skylos about local fake-auth helpers, project credential names, sensitive files, and network calls that must set timeouts. Contribution signals are off by default; when enabled, Skylos records local structural accept/dismiss/learn events under .skylos/contribution/ without raw source.

By default Skylos discovers [tool.skylos] in pyproject.toml by walking up from the scan path. To use a dedicated TOML config, pass --config-file PATH or set SKYLOS_CONFIG_FILE; standalone files may use either [tool.skylos] or top-level [skylos]. Synced Skylos Cloud policy keeps its protected precedence over repository-controlled config.

Language Support

LanguageDead CodeSecurityQualityNotes
PythonYesYesYesstrongest coverage; framework-aware static analysis and optional tracing
TypeScript / JavaScriptYesYesYesTree-sitter parsing, package graph reachability, framework conventions
JavaYesYesYesTree-sitter parsing and structured security-flow analysis
GoYesPartialPartialdead-code and selected security benchmark coverage
PHPYesYesPartialPHP parser coverage plus taint-style security sinks and sources
RustYesYesPartialRust parser coverage plus security sink/source checks
DartYesYesPartialDart parser coverage plus selected security sinks and sources
C#YesYesPartialC# symbol coverage plus selected ASP.NET, process, SQL, HTTP, and file sinks
ShellNoYesPartialshell-script security checks for command injection, SSRF, and path traversal

See Rules Reference for rule families and scanner scope.

Config And Deployment Support

SurfaceFilesSecurity Scope
GitHub Actions.github/workflows/*.yml, .github/workflows/*.yaml, action.yml, action.yamldangerous triggers, token permissions, unpinned actions, template injection, secrets, OIDC, cache, and artifact policy
GitLab CI.gitlab-ci.ymlmutable images, unpinned includes, literal secrets, untrusted eval, Docker-in-Docker, OIDC, cache, timeout, and runner-tag policy
DockerfileDockerfile, Dockerfile.*, *.dockerfiledangerous RUN commands, remote ADD without checksum, and literal build ARG / ENV secrets
Edge Docker Composecompose*.yml, compose*.yaml, docker-compose*.yml, docker-compose*.yamlprivileged containers, broad host device/control mounts, GPU/device runtime, and host networking
Edge systemd*.serviceroot edge services, mutable ExecStart paths, missing sandboxing, broad capabilities, and broad device access

Benchmark Snapshot

Skylos has checked-in regression benchmarks for dead code, security, quality, and agent review. These are strict regression gates, not broad proof that any tool is universally state of the art.

SuiteCurrent Skylos ResultBaseline
Dead code regression16 cases, TP=36 FP=0 FN=0 TN=59, score 100.0Ruff score 62.67; Vulture not installed in latest local rerun
Security regression56 cases, TP=35 FP=0 FN=0 TN=23, score 100.0Bandit score 47.14 on Python-applicable cases
Quality regression13 cases, score 100.0regression gate only
Agent review25 cases, score 100.0regression gate only
AI-code defect regressioncurated verifier cases for hallucinated references, package APIs, and dependency versionsrun python scripts/ai_code_defect_benchmark.py

Frozen golden-v0.2 highlights:

Frozen SuiteSkylos ResultCaveat
Dead code seeded devoverall score 96.28; TS/JS/Go/Java score 100.0; Python score 93.33Python residuals are label-review items
Security seeded devoverall score 96.52; full recall with one Python urljoin false positivelabel should be reviewed
OWASP Java security devTP=105 FP=0 FN=15 TN=120, score 94.37request-wrapper, LDAP, XPath, and property weak-hash gaps remain
Quality seeded devTP=1 FP=0 FN=0 TN=1, score 100.0one seeded case only

For methodology, commands, competitor rows, and caveats, see BENCHMARK.md.

Project Evidence

Skylos-assisted dead-code cleanup PRs have been merged in Black, NetworkX, Optuna, mitmproxy, pypdf, beets, and Flagsmith. These are accepted cleanup PRs, not project endorsements. See Real-World Results.

A local Astronomer scan on April 26, 2026 computed 420 stargazers and returned overall trust: A. StarGuard also reported low fake-star risk.

Integrations

IntegrationLinkPurpose
GitHub ActionGitHub ActionPR gates, annotations, and CI enforcement
VS Code extensionVS Code extensionin-editor findings and AI-assisted fixes
MCP serverMCP setupexpose Skylos scans to AI agents and coding assistants
Docker imageInstallationrun Skylos without a local Python install
Skylos CloudCloud workflowoptional upload and dashboard workflows

Generate a GitHub Actions workflow from the CLI:

skylos cicd init --upload
skylos cicd init --upload --scan-path apps/api

The generated upload workflow uses GitHub OIDC, sends PR head commit/branch metadata, and supports monorepo subprojects through --scan-path.

Documentation Map

NeedRead This
Install options, source install, and DockerInstallation
First scan and core workflowsQuick Start
CLI commands, flags, and examplesCLI Reference
CLI output modes, pretty reports, and TUI controlsCLI Output Modes
CI setup, PR gates, annotations, and branch protectionCI/CD
Dead-code behavior and framework awarenessDead Code Detection
Security scanning and taint analysisSecurity Analysis
Rule ID prefixes and product terminologyRule Dictionary
Agent scan, verification, remediation, and model setupAI Features
AI defense checks and LLM guardrailsAI Defense
MCP server setupMCP Server
Real-world merged cleanup PRsReal-World Results
Baselines, filtering, suppressions, and whitelistsConfiguration
Smart tracingSmart Tracing
Rule families and language supportRules Reference
Cloud uploads and dashboard flowCLI to Dashboard
VS Code extensionVS Code Extension
Benchmarks and methodologyBENCHMARK.md
Security policySECURITY.md
Release processRELEASE_WORKFLOW.md
Contribution prioritiesROADMAP.md
ContributingCONTRIBUTING.md

Common Questions

Does Skylos replace Bandit, Semgrep, CodeQL, or Vulture?

No. Skylos can run alongside them. It focuses on framework-aware dead-code signal, PR gating, AI-era regression checks, and a combined workflow across dead code, security, secrets, and quality.

Does Skylos require an LLM?

No. Core static analysis runs locally without API keys. LLM features are optional through skylos[llm] and agent commands.

Can I use it only on changed code?

Yes. Use skylos . -a --diff origin/main locally or configure CI gates to focus on new findings.

How should I handle intentional dynamic code?

Use baselines, whitelists, inline suppressions, or runtime tracing. See the configuration docs and smart tracing docs.

Contributing And Support

  • Report security issues through SECURITY.md.
  • Open bugs and false-positive reports with minimal repros.
  • Check ROADMAP.md for useful contribution areas.
  • Read CONTRIBUTING.md before sending a pull request.
  • See QUALITY.md for project quality and gate expectations.
  • Join the Discord for community support.

License

Skylos is licensed under the Apache License 2.0.

Benzer MCP sunucuları

LaurieWired/GhidraMCP Security

A Model Context Protocol server for Ghidra that enables LLMs to autonomously reverse engineer applications. Provides tools for decompiling binaries, renaming methods and data, and listing methods, classes, imports, and exports.

LaurieWired/GhidraMCP ★ 9,126
mrexodia/ida-pro-mcp Security

MCP server for IDA Pro, allowing you to perform binary analysis with AI assistants. This plugin implement decompilation, disassembly and allows you to generate malware analysis reports automatically.

mrexodia/ida-pro-mcp ★ 9,115
zinja-coder/jadx-ai-mcp Security

JADX-AI-MCP is a plugin and MCP Server for the JADX decompiler that integrates directly with Model Context Protocol (MCP) to provide live reverse engineering support with LLMs like Claude.

zinja-coder/jadx-ai-mcp ★ 2,251
beelzebub-labs/beelzebub Security

Beelzebub is a honeypot framework that lets you build honeypot tools using MCP. Its purpose is to detect prompt injection or malicious agent behavior. The underlying idea is to provide the agent with tools it would never use in its normal work.

beelzebub-labs/beelzebub ★ 2,033
safedep/vet Security

vet-mcp checks open source packages—like those suggested by AI coding tools—for vulnerabilities and malicious code. It supports npm and PyPI, and runs locally via Docker or as a standalone binary for fast, automated vetting.

safedep/vet ★ 1,066
semgrep/mcp Security

Allow AI agents to scan code for security vulnerabilites using Semgrep.

semgrep/mcp ★ 668
Daha fazla: Security →