Token导航 LogoToken导航

Agent Skill · 研究检索

socket-scan(套接字扫描)

socket-scan 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

socket-scan 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 68,490。

总安装 233周安装 10GitHub Stars 5下载 82核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:socket-scan(套接字扫描)
来源仓库:https://github.com/socketdev/skills
仓库路径:skills/socket-scan
安装命令:
npx skills add https://github.com/socketdev/skills --skill socket-scan
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/socketdev/skills --skill socket-scan

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

socket-scan 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。适用于需要根据关键词或任务场景从来源线索中获取信息的场景。通过 npx skills add 命令从 GitHub 仓库安装并使用。

安装前需确认权限范围、维护状态及是否涉及联网或文件操作。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/socket-scan

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/socketdev/skills --skill socket-scan;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

socket-scan 怎么安装?

在终端执行 npx skills add https://github.com/socketdev/skills --skill socket-scan。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

socket-scan 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

socket-scan 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

socket-scan 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

socket-scan 用的人多吗?

公开数据是累计安装 233 次,近一周安装 10 次,下载 82 次,GitHub 5 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

socket-scan 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
socket-scan

套接字扫描 · 本页

2335接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Research Scan

Run a dependency scan using the Socket CLI. For authenticated users, scans run in temporary read-only mode (--tmp) by default — results are returned locally without creating a persistent entry in the Socket dashboard.

For unauthenticated users (no token or demo token only), the skill prompts the user to log in or create a free account. If the user skips login, the scan falls back to cdxgen — but alert accuracy will be greatly reduced and SBOM accuracy will be poor.

When the user is authenticated with a full account (free or enterprise) and explicitly wants results saved, the scan can be promoted to a persistent dashboard scan.

When to Use

  • The user wants to scan their project's dependencies for vulnerabilities or supply-chain risks
  • The user wants to create a scan visible in the Socket dashboard
  • The user wants reachability analysis to determine if vulnerabilities are actually exploitable in their code
  • The user is adding or updating dependencies and wants to verify security posture
  • The user asks for a full security audit of their dependency tree
  • The user wants to check for malware in their dependencies
  • The user needs to construct an SBOM from scan data for compliance
  • The user wants to audit licenses across all dependencies
  • The user needs to check for GPL, SSPL, or other restrictive licenses in a commercial project
  • The user wants a compliance report for a security review or procurement process
  • The user asks about license compatibility across their dependency tree

Prerequisites

Socket CLI Setup

Use npx socket to run the Socket CLI — this always fetches the latest version and requires no global install. Verify it works:

npx socket --version

All commands in this skill use the npx socket prefix (e.g., npx socket scan create...).

Optional global install: If you prefer a global socket command, install with npm install -g socket@latest (must be version 1.0.0 or higher).

Authentication

For users without a Socket account: Configure the public demo token directly:

npx socket config set apiToken sktsec_t_--RAN5U4ivauy4w37-6aoKyYPDt5ZbaT5JBVMqiwKo_api --no-banner --no-spinner
npx socket config set defaultOrg SocketDemo --no-banner --no-spinner

This provides limited access to CLI features like npx socket fix, npx socket package score, sfw, and socket-patch with rate limits. No account creation is needed for basic usage. Note: The public demo token cannot create scans (npx socket scan create requires the full-scans:create permission). For scanning and full-rate access, create a free account at https://socket.dev.

For users with an account: Authenticate with one of:

  • Interactive login: npx socket login (stores credentials in ~/.socket/)
  • Environment variable: Set SOCKET_CLI_API_TOKEN in your shell profile or CI environment

Verify account authentication:

npx socket organization list

If authentication fails or the CLI is not installed, use the /socket-setup skill for detailed guidance including Node.js installation, PATH troubleshooting, and CI/CD token configuration.

For enterprise features (reachability analysis), an enterprise subscription is required in addition to authentication.

If setup fails or this is a first-time scan, use the /socket-scan-setup subskill for guided setup including auto-configuration of the public demo token.

Quick Start

First, check whether the user has a Socket account:

npx socket organization list --json --no-banner --no-spinner

If the user has a real organization (not SocketDemo or empty):

npx socket scan create . --tmp --json --no-banner --no-spinner

If the user has no token, the demo token, or is in the SocketDemo org, prompt them to log in or create an account:

You're not currently logged in to Socket. To scan your project, log in with npx socket login or create a free account at https://socket.dev. Would you like to log in now?

If the user logs in, re-run npx socket organization list and proceed with the authenticated scan above.

If the user skips login, fall back to cdxgen. Warn them before proceeding:

I'll run a scan using cdxgen as a fallback. Please note: without a Socket account, alert accuracy will be greatly reduced and SBOM accuracy will be poor. You will not get malware detection, supply-chain risk analysis, or Socket scores.
npx @cyclonedx/cdxgen -o bom.json -p

Scan Workflow

1. Determine Scan Tier

Before scanning, check the auth state to determine the user's tier:

npx socket organization list --json --no-banner --no-spinner

Use the result to decide the scan approach:

  1. No organizations returned, or the only org is SocketDemo — the user has no account or only the demo token. Prompt the user to log in or create an account: You're not currently logged in to Socket. To scan your project, log in with npx socket login or create a free account at https://socket.dev. Would you like to log in now? If the user logs in, re-run npx socket organization list to confirm, then proceed with Step 2a. If the user skips login, proceed to Step 2b (cdxgen fallback). Warn them that alert accuracy will be greatly reduced and SBOM accuracy will be poor.
  2. One or more real organizations returned — the user has a full account. Decide on scan mode:

- Ask whether they want results saved to the dashboard: - If yes (or if they explicitly asked to "create a scan") → persistent mode - If no, or if the scan is for development/exploration purposes → temporary mode (default)

Default to temporary mode. Only use persistent mode when the user has a full account AND wants results saved.

2a. Run the Scan (Authenticated Users)

Skip to Step 2b if the user has no account or only the demo token.

Temporary mode (default)

Run a read-only scan that returns results locally without persisting to the Socket dashboard:

npx socket scan create . --tmp --json --no-banner --no-spinner

This is the default for authenticated users. It does not create a dashboard entry and is safe to run repeatedly during development.

Persistent mode (authenticated users only)

Run a full scan that creates a persistent entry in the Socket dashboard:

npx socket scan create . --json --no-banner --no-spinner

The scan is uploaded to the Socket dashboard where results can be viewed, shared, and tracked over time.

For enterprise customers, specify the organization to associate the scan:

npx socket scan create . --org <org-slug> --json --no-banner --no-spinner

Flags:

FlagPurpose
TARGETPositional arg — path to directory or manifest files to scan (default: .)
--repo <name>Repository name for dashboard metadata (not the scan target)
--tmpTemporary read-only scan — results returned locally, not persisted to dashboard (default)
--org <org-slug>Organization slug for enterprise scans (persistent mode only)
--jsonOutput results as JSON for easier parsing
--no-bannerSuppress CLI banner output
--no-spinnerSuppress spinner animations
--no-interactiveDisable interactive prompts
--branch <name>Associate the scan with a specific branch (persistent mode only)
--commit <sha>Associate the scan with a specific commit (persistent mode only)

2b. cdxgen Fallback (User Skipped Login)

Only use this path if the user was prompted to log in (Step 1) and chose to skip. Before running cdxgen, display this warning:

Warning: Without a Socket account, alert accuracy will be greatly reduced and SBOM accuracy will be poor. You will not get malware detection, supply-chain risk analysis, Socket scores, or reachability analysis. To get accurate results, run npx socket login or create a free account at https://socket.dev.

Generate an SBOM with cdxgen:

npx @cyclonedx/cdxgen -o bom.json -p

cdxgen auto-detects the project type (npm, pip, Go, Maven, etc.) and produces a CycloneDX SBOM with dependency and known-vulnerability data.

cdxgen flags:

FlagPurpose
-o <file>Output file path (default: bom.json)
-pPrint the SBOM to stdout as well as writing to file
-t <type>Force project type (npm, pip, go, maven, gradle, etc.) — auto-detected if omitted
--no-recurseDo not scan subdirectories (useful for monorepos to target a specific package)
--spec-version 1.5Use CycloneDX spec version 1.5 (default)
Interpreting cdxgen output

The bom.json file is a CycloneDX SBOM. Extract dependency and vulnerability information from:

  • components[] — list of all dependencies with name, version, purl, and license info
  • vulnerabilities[] (if present) — known CVEs with severity, description, and affected version ranges
  • dependencies[] — dependency graph (which component depends on which)

Limitations of cdxgen fallback (alert accuracy greatly reduced, SBOM accuracy poor):

  • No malware detection, typosquatting detection, or install script analysis
  • No Socket scores (security, quality, maintenance, license)
  • No reachability analysis
  • Vulnerability data comes from public advisory databases (OSV, NVD) — significantly less complete than Socket's curated data, expect many false negatives
  • SBOM component resolution is less accurate — transitive dependencies and version pinning may be incomplete or incorrect
  • No dashboard integration or historical tracking

For license auditing from cdxgen output, parse the components[].licenses[] field in bom.json instead of relying on Socket's license analysis.

3. Interpret Results

When using --json, the raw output may include non-JSON prefix lines (banners, spinners, ANSI escape codes). Always use --no-banner --no-spinner flags, or use the helper script which strips noise automatically. If parsing manually, filter for lines starting with { or [.

The JSON output is an object with an issues[] array:

{
  "id": "scan-id-string",
  "url": "https://socket.dev/dashboard/org/.../scan/...",
  "issues": [
    {
      "type": "criticalCVE",
      "value": {
        "severity": "critical",
        "title": "...",
        "description": "...",
        "package": "lodash",
        "version": "4.17.20"
      }
    }
  ]
}

Note: The exact schema may vary by CLI version. Always inspect actual --json output for the complete structure.

Issue Type Taxonomy
TypeSeverityMeaning
criticalCVEcriticalCritical-severity CVE
cvehighHigh-severity CVE
mediumCVEmediumMedium-severity CVE
mildCVElowLow-severity CVE
licenseSpdxDisjvariesLicense mismatch or non-standard SPDX
mixedLicensevariesMultiple conflicting licenses
malwarecriticalKnown malware detected

Use the type field and value.severity to programmatically filter and prioritize findings.

Triage issues by severity:

  • Critical / High severity (criticalCVE, cve): Stop and report these to the user immediately. These represent known vulnerabilities with available exploits or severe supply-chain risks that require urgent attention.
  • Malware (malware): If any issue has type malware, display a prominent warning. Malware findings should be treated as the highest priority — advise the user to remove the package immediately.
  • Medium / Low severity (mediumCVE, mildCVE): Summarize these for the user. Group by type and provide a brief overview rather than listing each one individually.
  • License issues (licenseSpdxDisj, mixedLicense): Flag for the license audit step (Section 6).

Additional Native Audit Tools

In addition to cdxgen (Step 2b), native package manager audit tools can supplement findings:

  • npm: npm audit --json
  • pnpm: pnpm audit --json
  • yarn v1: yarn audit --json
  • yarn v2+: yarn npm audit --json
  • bun: bun has no built-in audit; run npm install --package-lock-only then npm audit --json

These are narrower than cdxgen (single ecosystem, no SBOM) but can catch advisories cdxgen misses. Use both when thoroughness matters.

4. Reachability Analysis (Enterprise Only)

For enterprise customers, run Tier 1 reachability analysis to determine whether vulnerabilities are actually reachable in the project's code:

npx socket scan reach --org <org-slug> .

This analyzes the project's dependency graph and source code to classify each vulnerability by reachability:

ReachabilityMeaningEffective Priority
reachableVulnerable code path is exercised by the projectCritical — fix immediately
unreachableVulnerable code path is not usedLow — deprioritize
unknownReachability could not be determinedHigh — treat as potentially reachable
not_applicableVulnerability does not apply to this contextFilter out

Reachability analysis generates a .socket.facts.json file in the project root with detailed findings. This helps prioritize which vulnerabilities to fix first — focus effort on reachable issues rather than wasting time on unreachable ones.

Skip this step entirely for non-enterprise users — reachability analysis requires an enterprise subscription with an authenticated organization.

5. Act on Findings

Based on scan results, cross-reference other skills to resolve issues:

  • Vulnerabilities with available fixes — use the /socket-dep-upgrade skill to apply safe upgrades
  • Packages needing deeper investigation — use the /socket-inspect skill to research specific packages
  • Packages with Socket patches available — use the /socket-dep-patch skill to apply security patches
  • Unused dependencies — use the /socket-dep-cleanup skill to remove packages that are no longer needed

6. License & Compliance Audit

Scan results already include license issues. Filter the issues[] array for types licenseSpdxDisj and mixedLicense to identify packages with license problems.

Categorize all discovered licenses into risk tiers:

TierLicensesRisk Level
PermissiveMIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, 0BSD, UnlicenseLow — safe for commercial use
Weak CopyleftLGPL-2.1, LGPL-3.0, MPL-2.0, EPL-2.0Medium — may require disclosure of modifications to the library itself
Strong CopyleftGPL-2.0, GPL-3.0, AGPL-3.0High — may require releasing your entire project under the same license
Non-Commercial / RestrictiveSSPL, BSL, CC-BY-NC, Elastic LicenseHigh — restricts commercial use
No License / UnknownNo license file, custom license, NOASSERTIONHigh — no explicit permission to use

Flag the following issues for user attention:

  • Strong copyleft in commercial projects: GPL/AGPL dependencies in projects not licensed under GPL/AGPL
  • SSPL or non-commercial licenses: Dependencies that restrict commercial use
  • No license detected: Dependencies with no license file or an unrecognized license
  • License conflicts: Dependencies whose licenses are incompatible with each other or with the project's own license
  • Dual-licensed packages: Note when packages offer multiple license options (e.g., MIT OR Apache-2.0)

7. Generate SBOM

The Socket CLI does not natively generate SBOMs. To produce one, use scan results to build a CycloneDX 1.5 (bom.json) or SPDX 2.3 (sbom.spdx.json) document manually. Ask the user which format they prefer; default to CycloneDX.

8. Compliance Summary

Produce a human-readable compliance summary:

License Summary

LicenseCountRisk
MIT120Low
Apache-2.030Low
ISC15Low
GPL-3.02High
Unknown1High

Issues Found

  • List each flagged issue from Step 5 with the package name, version, and recommended action

SBOM (if generated)

  • Note the filename and format of the generated SBOM

Recommendation

  • Overall compliance status: Clean / Issues Found / Action Required
  • Specific actions for each flagged issue

Error Handling

  • socket: command not found: Use npx socket as a prefix for all commands. If you prefer a global install, run npm install -g socket@latest. If you need a permanent installation, use the /socket-setup skill.
  • npx socket scan create fails with 403 / authentication error: The public demo token cannot create scans. Prompt the user to log in with npx socket login or create a free account at https://socket.dev. If they skip login, fall back to cdxgen (npx @cyclonedx/cdxgen -o bom.json -p) — see Step 2b — but warn them that alert accuracy will be greatly reduced and SBOM accuracy will be poor. Use the /socket-setup skill for guided configuration.
  • npx socket scan reach returns "not available": Reachability analysis requires an enterprise subscription. Skip this step for free-tier users.
  • No manifest/lock files found: The scan relies on manifest files (package.json, requirements.txt, go.mod, etc.). Ensure the target path points to a directory containing these files. For bun projects, if only bun.lock exists, run npm install --package-lock-only to generate a package-lock.json that Socket can parse.
  • Scan times out: Large monorepos with many manifest files may take longer. Try limiting the scan to a specific subdirectory (e.g., npx socket scan create./path/to/subdir --tmp --json).
  • License not recognized: If Socket returns an unknown or custom license, note it as "Unknown" and flag for manual review. Include the package's repository URL so the user can check the license file directly.

Tips

  • Default to --tmp (temporary mode) for all scans — it's safe, fast, and works with the public token
  • Only omit --tmp when the user has a full account and explicitly wants results saved to the dashboard
  • Always run a scan after adding, updating, or removing dependencies to verify the project's security posture
  • Use --json for machine-readable output that is easier to parse and summarize
  • Combine with the /socket-inspect skill for deep-dives into specific flagged packages
  • Combine with the /socket-dep-upgrade skill to fix vulnerabilities discovered during the scan
  • Enterprise customers should use reachability analysis to prioritize fixes — focus on reachable vulnerabilities first
  • Persistent scan results are available in the Socket dashboard for team visibility and historical tracking
  • Use npx socket for all commands — it always uses the latest CLI version
  • Run a compliance audit before releasing a new version to catch license issues early
  • Re-audit after adding or updating dependencies — license information can change between versions
  • When flagging GPL dependencies, check if they are dev-only — GPL in devDependencies is generally lower risk for commercial projects
  • Use the /socket-inspect skill to deep-dive into specific packages flagged during the audit
  • If the user is not logged in, always prompt them to log in (npx socket login) or create a free account at https://socket.dev before falling back to cdxgen. cdxgen has greatly reduced alert accuracy and poor SBOM accuracy
  • For bun projects without a package-lock.json, generate one with npm install --package-lock-only before scanning or auditing

平台分布

Codex

35.76%
按下载量换算29

Claude

29.04%
按下载量换算24

Cursor

17.87%
按下载量换算15

Gemini CLI

9.29%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills