Codeql Security Scanner logo

Codeql Security Scanner

Community
seaworld008
codeql-security-scanner

用于通过 CodeQL 执行语义代码扫描、安全查询、自定义规则、SARIF 报告和 GitHub Code Scanning 集成。

Overview

Publisherseaworld008
RepositoryCommonly-used-high-value-skills
Skill namecodeql-security-scanner
Stars
70
Forks
11
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by seaworld008 on GitHub. Read the source before you install it.

Installation

Install the Codeql Security Scanner AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/seaworld008/Commonly-used-high-value-skills.git /tmp/Commonly-used-high-value-skills
mkdir -p .claude/skills
cp -r /tmp/Commonly-used-high-value-skills/openclaw-skills/codeql-security-scanner .claude/skills/codeql-security-scanner
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Codeql Security Scanner in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Codeql Security Scanner on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Codeql Security Scanner is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

CodeQL Security Scanner

Trigger / When to Use

Use this skill when the user wants deep semantic code scanning, GitHub Advanced Security style analysis, custom CodeQL queries, SARIF output, or vulnerability investigation with CodeQL databases.

Good trigger phrases:

  • "run CodeQL locally"
  • "add CodeQL code scanning"
  • "scan JavaScript for security issues"
  • "write a CodeQL query"
  • "upload SARIF to GitHub"
  • "investigate a CodeQL alert"

Core Capabilities

  • Build CodeQL databases for supported languages.
  • Run default and security-extended query suites.
  • Produce SARIF reports for GitHub code scanning.
  • Investigate dataflow-based vulnerabilities.
  • Author and test custom queries for recurring insecure patterns.
  • Integrate scans in GitHub Actions or local CI.

Workflow

1. Identify Languages

Inspect the repository:

bash
rg --files | sed -n '1,160p'

Determine:

  • Primary language.
  • Build command.
  • Whether generated code should be excluded.
  • Whether dependencies need to be installed before database creation.
  • Whether multiple CodeQL databases are required for a polyglot repo.

2. Verify CodeQL CLI

bash
codeql version

If missing, use official GitHub CodeQL CLI installation guidance. For GitHub-hosted workflows, prefer github/codeql-action.

3. Create a Database

For compiled languages, provide the real build command:

bash
codeql database create codeql-db --language=java --command="mvn -DskipTests package"

For JavaScript or TypeScript:

bash
codeql database create codeql-db --language=javascript-typescript

For Python:

bash
codeql database create codeql-db --language=python

If database creation fails, fix dependency installation or build steps before analyzing.

4. Run Queries

Default query suite:

bash
codeql database analyze codeql-db --format=sarif-latest --output=codeql.sarif

Security extended suite:

bash
codeql database analyze codeql-db codeql/javascript-queries:codeql-suites/javascript-security-extended.qls --format=sarif-latest --output=codeql.sarif

Adapt the query pack path to the detected language and installed CodeQL pack layout.

5. Triage Alerts

For each alert:

  • Query ID and suite.
  • File and line.
  • Source, sink, and path steps when available.
  • User input control evidence.
  • Exploitability in deployed configuration.
  • Fix strategy and regression test.

Prioritize:

  1. Dataflow alerts with realistic user-controlled input.
  2. Authentication, authorization, injection, deserialization, SSRF, and path traversal.
  3. Alerts in deployed services over test-only code.
  4. Alerts recurring across many files.

6. Write or Run Custom Queries

Use custom queries when a project has its own framework wrappers:

ql
/**
 * @name Example dangerous API use
 * @kind problem
 * @problem.severity warning
 * @security-severity 6.0
 * @id custom/dangerous-api
 */
import javascript

from CallExpr call
where call.getCalleeName() = "dangerousEval"
select call, "Avoid dangerousEval with untrusted input."

Keep custom queries versioned with tests where possible.

Common Patterns

GitHub Actions CodeQL

yaml
name: codeql
on:
  pull_request:
  push:
    branches: [main]
jobs:
  analyze:
    runs-on: ubuntu-latest
    permissions:
      security-events: write
      contents: read
    steps:
      - uses: actions/checkout@v4
      - uses: github/codeql-action/init@v3
        with:
          languages: javascript-typescript
          queries: security-extended
      - uses: github/codeql-action/analyze@v3

Local Investigation Checklist

text
1. Reproduce the alert with CodeQL CLI.
2. Open path explanation and inspect each step.
3. Confirm source is user-controllable.
4. Confirm sink is security-sensitive.
5. Fix with framework-native safe API.
6. Add regression test.
7. Re-run the relevant query.

Alert Report Template

markdown
## CodeQL Alert

- Query:
- Severity:
- Location:
- Source:
- Sink:
- Path summary:
- Exploit condition:
- Fix:
- Test:

Interpretation Rules

  • CodeQL is strongest for semantic and dataflow problems, not package CVE inventory.
  • Generated code and vendored code should usually be excluded from first-party triage.
  • Build accuracy directly affects database quality for compiled languages.
  • A path-problem alert deserves manual path validation before remediation.
  • Custom query metadata matters for SARIF interpretation and alert severity.

Boundaries

  • Do not treat CodeQL as a replacement for dependency, container, host, or secret scanning.
  • Do not upload SARIF from private code to an external system without approval.
  • Do not silence alerts with broad query exclusions unless a rule is truly irrelevant.
  • Do not patch code based only on a rule name; inspect the path and framework behavior.
  • Do not ignore database creation warnings for compiled languages.

Reference Sources

Frequently asked questions

What does the Codeql Security Scanner AI skill do?

用于通过 CodeQL 执行语义代码扫描、安全查询、自定义规则、SARIF 报告和 GitHub Code Scanning 集成。

Why use Codeql Security Scanner on TypingMind?

Because you install it once and use it with any model. Codeql Security Scanner is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Codeql Security Scanner in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/seaworld008/Commonly-used-high-value-skills/tree/main/openclaw-skills/codeql-security-scanner. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Codeql Security Scanner?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Codeql Security Scanner?

As many as you like. As long as a model supports skills, you can use Codeql Security Scanner with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Codeql Security Scanner AI skill free?

Yes. It is published on GitHub by seaworld008 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇