BL

barmplus/locklens

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

72 stars 4 forks 品質 75 トレンド 4MIT

barmplus/locklens は [https://github.com/barmplus/locklens.] からインポートされた MCP サーバーの候補です

概要

barmplus/locklens は [https://github.com/barmplus/locklens.] からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

locklens] 是 于 于 [ [ [ [ [ 于 [ [ 于 于 于 于 于 于 于 于 于 于 于 于 于 于 于 于 于 于 于 于 : 于 于 于 于 于 于 于 于 于 : : : 于 : : : : : : : : : :

  • クリップ/[npx
  • MCP サーバー([[[T3])]
  • スキル

[T4], [T5]], [T6] , [T6] , [T6] , [T6]

お問い合わせ

特性

项 项 项 项 项 Git 仓库审计 私 私 私 [T7] [T8] [T9] 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中 中文 本 本 显 换为 换为 换为

お問い合わせ

境

  • [Node >=18
  • [(Optional) Yarn ^1.12.3 || Yarn >=2.4.0 && =4.3.0
  • [(Optional) Bun

お問い合わせ

例 例

以 直接 直接 内 内

本 本 本

  • 文本報告例:audit-en US.md
  • JSON 出典例:audit.json

お問い合わせ

安装建立

线 上

お問い合わせ

ツイート

お問い合わせ

#CLI の使用方法

常時観例

出典文記本:

出典:

:高危

devDependencies をフォローする:

##CLI 数

| お問い合わせ | | お問い合わせ | | [--source | 必携。本地目通信路径・程式 お問い合わせ | [--threshold | low moderate]] critical] , [T18] , [T19] , [low ] , [low] ] , [[low ] , [[low] , [[low]] ] , [[low ] ] ] , [[[[critical]] ] | [--registry | 自定着 npm レジストリ、一般:[https://registry.npmjs.org/ | | [--skip-dev | [[T22] | [--skip-dev | [[T22] | [[T22] | [[T22] | [[T22] | [--skip-dev | [--skip-dev] | [[T22] | [[[--skip-dev] | [[--skip-dev] | [[--skip-dev]] |[[[--skip-dev]]] |[[[[--skip-dev]]]] |[[[[[[[[[[[[]]]]]]]]]]]]]] [[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ | [--retry-count | 行行重次数 | | [--output-format |json] text]]|[text]|[[text]|[[text]|[text]]|[[text]]|[[[[text]]]]|[[[text]]]]]|[[[[[[text]]]]]]、[[[[[[[[text]]]]]]]]]]]、[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]、[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ | [[T28] | zh``en]], [zh], [[zh], [[zh]], [[zh]]], [[zh]], [[[[zh]]], [[[zh]]]], [[[zh]]]]], [[[en]]]], [[[[[[[[[zh]]]]]]]]], [[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]、[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ | [--help / [[-h]] | 幕末支拝客 | | [--version / [-v] | 画面の本数 |

お問い合わせ

#MCPの使い方

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

locklens

locklens 是一个基于 audit-ci 的 lockfile 审计工具,支持三种运行模式:

  • CLI / npx
  • MCP Server(stdio)
  • Skill

它可以审计本地项目目录或远程 Git 仓库,并支持 npm、yarn、pnpm 的 lockfile。


特性

  • 支持本地项目目录与远程 Git 仓库审计
  • 支持公开仓库与私有仓库审计
  • 支持 package-lock.json、yarn.lock、pnpm-lock.yaml
  • 仅基于仓库中已存在的 lockFile 进行审计,保证结果与真实依赖状态一致
  • 支持中文、英文文本报告
  • 支持显式切换为 JSON 输出

环境要求

  • Node >=18
  • (Optional) Yarn ^1.12.3 || Yarn >=2.4.0 && <4.0.0
  • (Optional) PNPM >=4.3.0
  • (Optional) Bun

结果示例

可以直接查看仓库内的示例输出:


安装与环境

本地仓库、线上仓库审计:

# 本地相对目录审计
npx -y locklens --source ./
# 本地绝对目录审计
npx -y locklens --source /path/to/project 
# Github 远程仓库审计
npx -y locklens --source https://github.com/BARMPlus/micro-app > audit.md
# Gitlab 远程仓库审计
npx -y locklens --output-format json --source https://gitlab.com/gitlab-org/gitlab-vscode-extension.git > audit.json 

私有仓库审计:

# 对于 GitHub、GitLab、Gitee 的 HTTPS 地址,locklens 会先尝试通过 ssh -T 判断本机 SSH Key 是否可用于该 Git 服务器;
# 如果可用,会自动切换为 SSH 方式执行。其他私有 Git 服务器仍建议直接依赖本机已有权限的 SSH Key。
npx -y locklens --source https://git.company.local/group/repo.git
# 适合 CI 场景,仅支持 私有部署的 GitLab 服务器应用审计,设置 Personal access tokens 权限访问该仓库
LOCKLENS_GITLAB_PRIVATE_TOKEN=your-token npx -y locklens --source https://git.company.local/group/repo.git 

CLI 使用方法

常见示例

输出英文文本报告:

npx -y locklens --source /path/to/project --output-format-language en

输出 JSON:

npx -y locklens --source /path/to/project --output-format json

指定阈值为高危:

npx -y locklens --source /path/to/project --threshold high

跳过 devDependencies:

npx -y locklens --source /path/to/project --skip-dev

CLI 参数

参数 说明
--source 必填。本地目录路径或远程 Git 仓库地址
--threshold 漏洞过滤阈值,可选:low、moderate、high、critical,默认:low
--registry 自定义 npm registry,默认:https://registry.npmjs.org/
--skip-dev 跳过 dev dependencies
--retry-count 审计执行重试次数
--output-format 输出格式,可选:json、text,默认:text
--output-format-language 文本报告语言,可选:zh、en,默认:zh
--help / -h 显示帮助
--version / -v 显示版本号

MCP 使用方法

locklens 支持通过 stdio 方式作为 MCP Server 接入,通过将以下配置添加到mcp服务器配置中。

Windows 平台:

{
  "mcpServers": {
    "locklens": {
      "command": "cmd",
      "args": ["/c", "npx", "--yes", "locklens"]
    }
  }
}

其他平台:

{
  "mcpServers": {
    "locklens": {
      "command": "npx",
      "args": ["--yes", "locklens"]
    }
  }
}

Tools

package_audit

审计指定项目目录或远程 Git 仓库的 lockfile,并返回统一格式的漏洞结果。

参数:

  • source
    • 必填。本地目录绝对路径,或远程 Git 仓库地址
  • threshold
    • 漏洞过滤阈值,可选:low、moderate、high、critical;默认:low
  • registry
    • 自定义 npm registry 地址;默认:https://registry.npmjs.org/
  • skipDev
GitHub で README 全文を見る

インストール

npx --yes locklens
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "locklens": { "command": "cmd", "args": ["/c", "npx", "--yes", "locklens"] } } }