ShipSafe vs CodeQL — Security Scanner Comparison

CodeQL is GitHub's semantic code analysis engine, known for deep interprocedural analysis. ShipSafe is a local-only security scanner built for developers using AI coding assistants. Here is how they compare.

Feature Comparison

FeatureShipSafeCodeQL
Setupnpm install -g @shipsafe/cliGitHub Actions or CodeQL CLI + database creation
Execution environmentLocal machineGitHub Actions (primary) or local CLI
Analysis depthAST + pattern matching + call graph (Pro)Deep interprocedural semantic analysis
Prompt injection detection7 rulesCommunity queries (limited)
Malicious MCP scanning30 patternsNot available
Secret detection174 patternsNot a focus (GitHub has Secret Scanning)
Image metadata strippingBuilt-in (MetaStrip)Not available
MCP server for AI assistants8 toolsCopilot integration
Git pre-commit hooksBuilt-inNot available (CI/CD focus)
SpeedSecondsMinutes to hours (database creation)
Language supportJS, TS, Python10+ languages
Custom queriesNot availablePowerful QL query language
GitHub integrationVia Team planNative (pull request annotations)

ShipSafe Strengths

  • Instant setup — npm install and scan in seconds
  • Runs anywhere without GitHub dependency
  • AI security detection (prompt injection, malicious MCP servers)
  • Image metadata stripping (MetaStrip) — unique capability
  • Git pre-commit hooks block issues before they reach the repo
  • MCP server integrates with Claude, Cursor, Windsurf
  • Fast — scans in seconds vs minutes/hours for CodeQL
  • Accessible for solo developers without enterprise setup

CodeQL Strengths

  • Deep interprocedural semantic analysis — catches complex data flow issues
  • Powerful custom query language (QL) for writing bespoke analyses
  • Native GitHub integration with pull request annotations
  • Free for open-source projects on GitHub
  • Extensive vulnerability research from GitHub Security Lab
  • Strong academic foundation in program analysis

Key Differentiators

Speed

ShipSafe scans in seconds. CodeQL requires building a database (minutes to hours for large codebases) before analysis can begin.

GitHub Independence

ShipSafe runs anywhere. CodeQL is designed around the GitHub ecosystem and is most useful with GitHub Actions.

AI Security

ShipSafe has prompt injection and MCP threat detection. CodeQL has limited community queries for AI security.

Developer Workflow

ShipSafe provides git hooks and MCP server for real-time security during development. CodeQL is a CI/CD tool that runs after code is pushed.

The Verdict

Choose ShipSafe if you want instant, local security scanning with AI-specific rules during development. Choose CodeQL if you need deep semantic analysis, custom query authoring, or are already invested in the GitHub ecosystem for enterprise security.

Frequently Asked Questions

Is CodeQL more accurate than ShipSafe?

CodeQL performs deeper interprocedural semantic analysis, which can catch complex data flow issues that span many functions. ShipSafe uses AST analysis with call graph awareness (in Pro), which is faster but less deep. For common vulnerability patterns (the top 80% of real-world issues), both catch them effectively. CodeQL's advantage appears in complex, multi-step data flow chains.

Can I use ShipSafe without GitHub?

Yes. ShipSafe runs anywhere — it is a standalone npm package with no GitHub dependency. CodeQL is designed around the GitHub ecosystem and is most effective when run through GitHub Actions with native pull request annotations.

Why is ShipSafe faster than CodeQL?

CodeQL must first build a database representation of your entire codebase (which can take minutes to hours for large projects), then execute queries against that database. ShipSafe parses files individually with Tree-sitter, runs pattern matching, and reports results — typically completing in under 5 seconds for projects with 100,000 lines of code.

Does CodeQL have AI security rules?

CodeQL has some community-contributed queries for LLM-related vulnerabilities, but they are limited and not maintained as first-party rules. ShipSafe has 37 dedicated AI security rules (prompt injection, malicious MCP servers) maintained as core product features.

Try ShipSafe Free

Install and scan your project in under 60 seconds.

npm install -g @shipsafe/cli

Other Comparisons