1 个不稳定版本
| 0.1.0 | 2023年9月5日 | 
|---|
#13 在 #bug-bounty
590KB
932 行
goblin_prospector
一个小工具,用于读取项目中的锁文件并从每个依赖项的仓库中获取信息,以及获取项目未使用的新更改(希望包含最近在主分支上更改/修复但仍然可以在该项目中利用的漏洞或行为)。

当前支持
锁文件
- yarn (yarn.lock)
- npm (package-lock.json)
- ruby (Gemfile.lock)
仓库发布
- GitHub
- GitLab
安装
您可以使用 cargo 从 crates.io 进行安装
cargo install goblin_prospector
或者从 发布中下载预构建的二进制文件。
您还可以直接克隆仓库,并使用 cargo 构建工具。
git clone https://gitlab.com/bea_stung/goblin_prospector.git
cd goblin_prospector
cargo install --path=.
使用方法
基本用法
goblin_prospector -d ~/repos/gitlab --github-token GITHUB_TOKEN_HERE -c 40
示例输出
 [[ GitHub KaTeX/KaTeX ]]:
    katex (Yarn) [0.13.2]:
      GitHub (KaTeX/KaTeX): git+https://github.com/KaTeX/KaTeX.git
      More recent releases:
        [v0.16.8]:
          0.16.8 (2023-06-24)
          Features
          expose error length and raw error message on ParseError (#3820) (710774a)
        [v0.16.7]:
          0.16.7 (2023-04-28)
          Bug Fixes
          docs/support_table.md: delete redundant "varPsi" (#3814) (33a1b98)
.....
帮助信息
goblin_prospector --help
示例输出
Goblin goes and gets information about new dependancy features introduced after the versions used by a project.
Point me at a project directory and watch me go boss, yeehaw!
Supports:
Lockfiles:
  - yarn (yarn.lock)
  - npm (package-lock.json)
  - ruby (Gemfile.lock)
Releases from repositories:
  - GitHub
  - GitLab
Usage: goblin_prospector [OPTIONS] --dir <DIR>
Options:
  -d, --dir <DIR>                                  Directory of project to check
      --github-token <GITHUB_TOKEN>                GitHub token for API
      --gitlab-token <GITLAB_TOKEN>                GitLab token for API
  -c, --concurrent-requests <CONCURRENT_REQUESTS>  Number of concurrent requests
  -o, --output <OUTPUT>                            Output file name
  -h, --help                                       Print help
  -V, --version                                    Print version
依赖
~14–30MB
~511K SLoC
