analyze-codescan

A workflow for investigating GitHub Code Scanning alerts, including CodeQL warnings, which are automated findings about possible security problems in source code.

In plain words
What is it for?
Use it to retrieve an alert, inspect the affected code, assess how reachable and serious the issue is, write an analysis document, and create a repair task.
Why use it?
It turns an alert into a risk assessment and a tracked analysis instead of leaving the warning unexplained.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/modelengine-group/fit-framework/analyze-codescan
Any agent
npx skills add ModelEngine-Group/fit-framework --skill analyze-codescan
Clone the repo
git clone --depth 1 https://github.com/ModelEngine-Group/fit-framework

Made for: Claude Code, Codex.

Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 321 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00053 $0.00321
Opus 5 $0.00026 $0.00161
Sonnet 5 $0.00011 $0.00064
Haiku 4.5 $0.00005 $0.00032

Measured 2d ago against content hash 154d1c3b8e73, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

analyze-codescan scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/analyze-codescan/SKILL.md · 35 lines

What it actually says

分析 Code Scanning 告警

分析指定的 Code Scanning(CodeQL)告警,评估安全风险并创建修复任务。

执行步骤

  1. 获取告警信息:

    gh api repos/{owner}/{repo}/code-scanning/alerts/<alert-number>
    

    提取: rule (id/severity/description), tool (name), most_recent_instance (location/message)

  2. 创建任务目录和文件,基于 .agents/templates/task.md 模板。

  3. 定位和分析源码:

    • 根据 most_recent_instance.location 定位源码文件和行号
    • 读取告警所在的源码上下文
    • 理解 CodeQL 规则的含义和检测逻辑
    • 检查是否有其他位置也存在相同问题
  4. 评估安全风险(代码路径可达性、可利用性、影响程度)。

  5. 输出分析文档到 analysis.md。

  6. 更新任务状态。

  7. 提示下一步: plan-task 设计修复方案,或 close-codescan 关闭告警。

注意: Critical/High 级别立即处理,Medium 计划处理,Low 可延后。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 35 lines · 53 tokens per session scan A 154d1c3b8e73

Subscribe to this mod's changes

analyze-codescan is a skill published in the GitHub repository ModelEngine-Group/fit-framework (2,117 stars, last pushed 5mo ago), licensed MIT. It adds 53 tokens to every session and 321 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.