Oma Deepsec 标志

Oma Deepsec

组织热门
first-fluke
oma-deepsec

Set up and run Deepsec vulnerability scans, triage, and CI gates. Use for Deepsec work or an explicitly requested agent-powered vulnerability scan.

Add to TypingMind

概览

发布者first-fluke
代码仓库oh-my-agent
技能名称oma-deepsec
星标数
1.3K
复刻数
149
附带文件
6
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 6 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 first-fluke 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Oma Deepsec AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/first-fluke/oh-my-agent/tree/main/skills/oma-deepsec
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/first-fluke/oh-my-agent.git /tmp/oh-my-agent
mkdir -p .claude/skills
cp -r /tmp/oh-my-agent/skills/oma-deepsec .claude/skills/oma-deepsec
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Oma Deepsec,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Oma Deepsec。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Oma Deepsec 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

Deepsec: Agent-Powered Vulnerability Scanner Driver

Scheduling

Goal

Operate Vercel's deepsec security scanner inside a target repository safely and cost-consciously: bootstrap the .deepsec/ workspace, write a tight INFO.md, run the right scan/process/triage/revalidate/export sequence, gate PRs in CI via process --diff, and grow project-specific matchers, surfacing real, revalidated findings without runaway spend.

Intent signature

  • User mentions deepsec, "deep security scan", bunx deepsec, pnpm deepsec, npx deepsec.
  • User asks an agent to scan a repository for vulnerabilities, security issues, or CVEs and the project has (or should have) a .deepsec/ directory.
  • User asks how to add a deepsec PR / CI security gate, or about process --diff, --diff-staged, --diff-working, --files-from, --comment-out.
  • User mentions deepsec artefacts: INFO.md, SETUP.md, data/<id>/files/, FileRecord, RunMeta, revalidation, triage, custom matchers, MatcherPlugin, noiseTier, priorityPaths.
  • User asks about deepsec configuration: deepsec.config.ts, defaultAgent, AI_GATEWAY_API_KEY, VERCEL_OIDC_TOKEN, AI Gateway, Vercel Sandbox, --agent codex, --agent claude.
  • User asks how to lower deepsec cost, cut false-positive rate, or interpret severity / triage / revalidation verdicts.

When to use

  • First-time deepsec install in a repo (init, INFO.md write, first calibration scan).
  • Running a full or scoped scan and processing findings.
  • Setting up a per-PR CI gate with process --diff and --comment-out.
  • Writing a project-specific matcher to cover entry points the default set misses.
  • Triaging a backlog of findings (severity bucketing, FP cuts via revalidate, exporting to issue tracker).
  • Diagnosing deepsec failures: missing credentials, AI Gateway quota stops, refusals, sandbox auth.

When NOT to use

  • Generic OWASP / lint-style review without deepsec → use oma-qa.
  • Generic CVE / dependency advisories → use oma-qa or oma-search.
  • Architecting a brand-new SAST pipeline that is not deepsec → use oma-architecture.
  • Writing or auditing application code itself → route to oma-backend / oma-frontend / oma-mobile.
  • Cloud / IAM / Terraform hardening → use oma-tf-infra (deepsec only scans the IaC; remediation lives there).
  • Pure reasoning about a finding's fix in product code → use oma-debug once deepsec has produced the finding.

Expected inputs

  • target_repo_root: absolute path of the codebase to scan (parent of .deepsec/).
  • intent: one of setup | scan | pr-review | matchers | triage | config | troubleshoot.
  • credential_mode: ai-gateway-key | vercel-oidc | direct-anthropic | direct-openai | subscription.
  • agent_choice: codex (upstream default; model gpt-5.5) or claude (model claude-opus-4-8). Asked once before the first paid call if not already provided.
  • severity_floor: lowest severity worth surfacing (typically HIGH).
  • Optional: existing .deepsec/data/<id>/, deepsec.config.ts, custom matchers, CI provider.

Expected outputs

  • A working .deepsec/ workspace registered against the target repo.
  • A populated data/<id>/INFO.md (50-100 lines, project-specific, no line numbers).
  • One or more completed scan → process (→ triage/revalidate) runs with reproducible cost notes.
  • For PR mode: a CI workflow file using process --diff <base> with two-job split (no PR-write in PR-code job).
  • For matchers: new .deepsec/matchers/<slug>.ts files wired through the inline plugin in deepsec.config.ts.
  • A findings export (md-dir and/or json) plus a short summary of top severities and FP-rate notes.
  • Explicit, dollar-and-time-bounded plan before any pass that may cost more than ~$25.

Dependencies

  • Node.js 22+, plus a package manager: bun / bunx (preferred in this monorepo), pnpm, npm, or yarn.
  • A working AI credential: AI_GATEWAY_API_KEY=vck_…, or VERCEL_OIDC_TOKEN, or direct ANTHROPIC_AUTH_TOKEN + ANTHROPIC_BASE_URL, or a logged-in claude / codex CLI subscription.
  • Git (history is consulted by revalidate and --diff modes).
  • Optional: Vercel Sandbox auth for deepsec sandbox … distributed runs.
  • Reference resources under resources/ (loaded only when the scenario requires them).

Control-flow features

  • Branches by intent (setup vs scan vs pr-review vs matchers vs triage vs config vs troubleshoot).
  • Branches by repo size (calibrate with --limit 50 before any large pass).
  • Branches by credential source (gateway key, OIDC, direct, subscription).
  • Stops on quota / credit exhaustion and resumes the same command after top-up.
  • Refuses to launch an unbounded process when no calibration has been done and the repo is large.
  • Reads codebase, writes .deepsec/ files and CI configs, runs long-lived AI processes.

Structural Flow

Entry

  1. Confirm whether .deepsec/ already exists; if yes, treat the run as incremental, never re-init.
  2. Resolve intent from the user prompt; if ambiguous (e.g. "scan this repo"), default to setup then scan (calibration mode).
  3. Estimate scale: count source files (rough rg --files | wc -l excluding node_modules, .git, dist) to forecast cost before any AI pass.
  4. Check for an AI credential in .env.local or shell env; if none, route to credential setup before any process / revalidate / triage call.
  5. Confirm agent choice with the user before the first paid call. If agent_choice is not already in the prompt and deepsec.config.ts does not pin a defaultAgent, ask whether to run codex (gpt-5.5, the upstream default; runs in a strict sandbox, cheaper, grep-heavy) or claude (claude-opus-4-8; strongest reasoning, most expensive). The two backends can be mixed via --reinvestigate and findings dedupe across agents. Skip the question if the user has already named an agent or has explicitly delegated the decision ("just pick reasonable defaults").

Transitions

  • If .deepsec/ is missing and intent involves scanning → run bunx deepsec init (or npx deepsec init) and follow the printed prompt to populate INFO.md before any AI pass.
  • If INFO.md is empty or template-shaped → write it (50-100 lines, project-specific, 3-5 examples per section, no line numbers, no generic CWE enumeration).
  • If repo is > 500 files and no calibration has run → run a calibration pass first (deepsec docs recommend --limit 50 --concurrency 5) and report cost extrapolation before the full pass.
  • If a process / revalidate run halts on quota → leave file locks intact, surface the exact remediation URL, re-run the same command after top-up.
  • If the agent reports a refusal (refused: true) → never silently drop; document the affected files and either retry with the other backend or add the path to config.json:ignorePaths only if reproducible.
  • If the user wants a CI gate → emit the two-job pattern (PR-code job has no pull-requests: write, comment job has no PR code).
  • If the user wants more matcher coverage → run the matcher-authoring workflow against data/<id>/files/ and the parent repo's entry points.

Failure and recovery

FailureRecovery
Missing AI credentials for --agent claude / codexPick a credential mode (gateway key / OIDC / direct / subscription) per resources/config.md and write .env.local.
401 Unauthorized from gatewayOIDC: re-run vercel env pull (12 h expiry). API key: regenerate. Confirm .env.local is in the cwd deepsec runs from.
Stopped: AI Gateway credits exhaustedTop up via the printed URL; re-run the same command, files already done are skipped.
Stopped: Claude Pro/Max subscription exhaustedSwitch to AI Gateway; subscriptions don't carry full scans.
Persistent refusal on a single file (>5% of batches)Add the path to data/<id>/config.json:ignorePaths, or run that file alone with --batch-size 1.
FP rate too high on HIGH+Run revalidate --min-severity HIGH; tighten INFO.md's threat model and FP notes; bias matchers to precise.
noisy matcher wedges scanner on a 100k-file repoTighten filePatterns to language- or directory-anchored globs.
Sandbox auth failsOIDC: re-run vercel env pull. Access-token mode: verify VERCEL_TOKEN + VERCEL_TEAM_ID + VERCEL_PROJECT_ID.
User asks for full scan with no budget contextHalt; report file count and forecast cost band; require explicit go-ahead before the full pass.

Exit

  • Success: planned passes ran, findings exist with verdicts (or no findings produced), files written are listed, residual cost / followups are explicit.
  • Partial success: some passes blocked on credentials/quota/refusal; the blocker, the safe-resume command, and the recommended next step are reported.
  • Failure: nothing destructive happened, the user has the exact next command to unblock the work.

Logical Operations

Tools and instruments

  • Package manager: bun / bunx (preferred), pnpm, npm, yarn are interchangeable.
  • CLI commands: deepsec init, init-project, scan, process, process --diff, triage, revalidate, enrich, report, export, metrics, status, sandbox <cmd>.
  • Diff sources for PR mode: --diff <ref|range>, --diff-staged, --diff-working, --files <csv>, --files-from <path> (or - for stdin).
  • Inspection: jq over data/<id>/files/**/*.json for ad-hoc severity / TP queries.
  • Credentials: AI_GATEWAY_API_KEY, VERCEL_OIDC_TOKEN, ANTHROPIC_AUTH_TOKEN / ANTHROPIC_BASE_URL, OPENAI_API_KEY / OPENAI_BASE_URL, claude login, codex login.
  • Resource files under resources/ for setup, scanning, PR review, matchers, triage, config, load on demand.

Canonical workflow path

  1. Bootstrap (one time per repo):
    bash
    cd <target-repo>
    bunx deepsec init
    cd .deepsec
    bun install
    # Edit .env.local: set AI_GATEWAY_API_KEY=vck_… (or VERCEL_OIDC_TOKEN via `vercel env pull`)
    Then prompt the coding agent (this skill) to read .deepsec/node_modules/deepsec/SKILL.md and .deepsec/data/<id>/SETUP.md, skim README / AGENTS.md / CLAUDE.md and a handful of representative files, and replace each section of data/<id>/INFO.md (50-100 lines, 3-5 examples per section, no line numbers, no generic CWE rehash).
  2. Calibrate before any full pass. The deepsec docs (getting-started.md, vercel-setup.md, faq.md) recommend --limit 50 --concurrency 5 as the calibration starting point.
    bash
    bunx deepsec scan
    bunx deepsec status
    bunx deepsec process --limit 50 --concurrency 5
    Read the per-batch cost. Extrapolate to full repo. Get the user's explicit go-ahead before the full process. If the user names different --limit / --concurrency values, use theirs.
  3. Full investigation, triage, revalidate, export:
    bash
    bunx deepsec process --concurrency 5
    bunx deepsec triage --severity HIGH
    bunx deepsec revalidate --min-severity HIGH
    bunx deepsec export --format md-dir --out ./findings
    bunx deepsec metrics
  4. PR mode (CI gate, scoped to changed files, exit code = 0/1):
    bash
    bunx deepsec process \
      --diff origin/${BASE_REF} \
      --comment-out comment.md
    Wire the two-job CI pattern from resources/pr-review.md. Never grant pull-requests: write to the job that runs PR-controlled code.
  5. Custom matchers (close entry-point gaps surfaced in step 3):
    • Read the contract in .deepsec/node_modules/deepsec/dist/config.d.ts and the samples/webapp/matchers/* examples.
    • Write .deepsec/matchers/<slug>.ts, wire it through the inline plugin in .deepsec/deepsec.config.ts.
    • Verify hit rate: bunx deepsec scan --matchers <slug> should land in 1-20 hits / 1k files (precise), 5-100 (normal), or roughly the framework entry-point count (noisy).
  6. Resume after any quota stop, network blip, or Ctrl-C: re-run the same command. State is on disk under .deepsec/data/<id>/.

Resource scope

ScopeResource target
CODEBASETarget repo source files, framework configs, route directories, README / AGENTS.md / CLAUDE.md.
LOCAL_FS.deepsec/deepsec.config.ts, .deepsec/.env.local, .deepsec/matchers/, .deepsec/data/<id>/{project.json,INFO.md,config.json,files/,runs/,reports/}, generated findings/, comment.md, CI workflow files.
PROCESS`bunx deepsec scan
NETWORKAnthropic / OpenAI via Vercel AI Gateway (default) or direct provider endpoints; optional Vercel Sandbox microVM control plane.
CREDENTIALSAI_GATEWAY_API_KEY, VERCEL_OIDC_TOKEN, ANTHROPIC_AUTH_TOKEN, OPENAI_API_KEY, VERCEL_TOKEN / VERCEL_TEAM_ID / VERCEL_PROJECT_ID, claude / codex subscription tokens. Consume read-only; never echo secrets back to the user or commit them.
MEMORYUser-stated budget cap, severity floor, and stop conditions for the current session.

Preconditions

  • Node.js 22+ is available.
  • Repo is a git checkout (deepsec uses git history for revalidate and --diff).
  • For any AI command: at least one credential mode is configured before the call, or the call is held until one is.
  • For sandbox mode: Vercel auth is wired; otherwise stay local.
  • For unbounded process runs on > 500-file repos: a --limit calibration pass has produced a cost number the user has acknowledged.

Effects and side effects

  • Creates .deepsec/ (config, lockfile, scaffolding) and .deepsec/data/<id>/ (gitignored) inside the target repo.
  • Writes .env.local (never commit) and may run vercel link / vercel env pull (writes .vercel/project.json + token).
  • Spawns long-running AI processes that cost real money. Single full scans range from $25 to over $1,200 per the official cost guide and can climb to tens of thousands on very large repos.
  • Reads source code; sends snippets to the configured LLM (gateway = zero retention; direct provider = subject to that provider's policy). Never exfiltrates secrets; the gateway key stays outside the worker sandbox in sandbox mode.
  • May write .github/workflows/deepsec.yml (or analogue) when the user asks for a CI gate.
  • Edits deepsec.config.ts and adds .deepsec/matchers/*.ts when authoring matchers.
  • Does not commit, push, or open PRs unless the user explicitly authorizes a separate commit step (route via oma-scm).

Guardrails

  1. Never launch an unbounded process on a repo whose size you have not measured. Always run a calibration pass first when file count is unknown or > 500 (deepsec docs recommend --limit 50 --concurrency 5; defer to a user-named value if given).
  2. State cost and stopping condition before any AI pass. Use the published bands (100 files ≈ $25-60, 500 ≈ $130-300, 2,000 ≈ $500-1,200; ×2-3 swing).
  3. Resume, do not reset. After any network / quota / Ctrl-C interruption, re-run the same command. Never delete data/<id>/ to "start clean" without explicit user instruction.
  4. INFO.md stays short and project-specific. 50-100 lines, 3-5 examples per section. Name primitives but no line numbers. Skip generic CWE categories; built-in matchers cover those.
  5. For PR/CI gates, keep PR-controlled code in a no-write job. Never grant pull-requests: write to a job that executes PR-controlled pnpm install / config-loading. Use the two-job pattern in resources/pr-review.md.
  6. Pin actions to full SHAs in production CI; major-version tags are for examples only.
  7. Never silently drop refusals. If the agent reports refused: true, log it, retry with the other backend, or add the file to ignorePaths only when reproducible.
  8. Bias matchers toward precise when the bug shape is exact. Reserve noisy for entry-point coverage and tight globs.
  9. Never echo or commit credentials (vck_…, sk-ant-…, sk-…, OIDC tokens). Treat .env.local as secret. Treat data/ as gitignored by default.
  10. Treat deepsec like an agent with shell access. Recommend sandbox for prompt-injection-prone repos (vendored code, untrusted deps).
  11. Findings need verdicts. For any HIGH+ surfaced to the user, prefer revalidate-tagged verdicts (true-positive / false-positive / fixed / uncertain) over raw process output.
  12. Do not invent CLI flags, and trust the CLI over these notes. Anything beyond resources/scanning.md's flag list must be checked against --help first. Likewise, when the CLI's printed model names, defaults, or per-batch costs disagree with the values written in this skill, the CLI is right — upstream moves faster than these resources.
  13. Ask agent choice before the first paid call. If the user has not named an agent (claude vs codex) and deepsec.config.ts does not pin defaultAgent, ask once with the trade-off clearly stated. Do not also bargain over budget or severity; those are handled via the upstream calibration recommendation (--limit 50 --concurrency 5 per deepsec docs) and the user-stated severity_floor.

References

  • Workspace install + INFO.md bootstrap: resources/setup.md
  • Full scan/process/triage/revalidate/export workflow + cost guide: resources/scanning.md
  • PR / CI gate via process --diff (two-job pattern, exit-code semantics): resources/pr-review.md
  • Authoring custom matchers (slugs, noise tiers, file globs, plugin wiring): resources/matchers.md
  • Reading findings, severities, triage / revalidation verdicts, FP cuts: resources/triage.md
  • deepsec.config.ts reference, env vars, plugin order, AI Gateway / Vercel Sandbox auth: resources/config.md
  • Upstream docs (load only when a resource file points at one):
  • Shared context loading: ../_shared/core/context-loading.md
  • Shared quality principles: ../_shared/core/quality-principles.md

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Oma Deepsec AI 技能有什么作用?

Set up and run Deepsec vulnerability scans, triage, and CI gates. Use for Deepsec work or an explicitly requested agent-powered vulnerability scan.

为什么在 TypingMind 中使用 Oma Deepsec?

因为您只需安装一次,就能搭配任何模型使用。Oma Deepsec 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Oma Deepsec?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/first-fluke/oh-my-agent/tree/main/skills/oma-deepsec。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Oma Deepsec?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Oma Deepsec 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Oma Deepsec 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Oma Deepsec AI 技能免费吗?

是的。first-fluke 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇