Enhancement: use `mix.lock` as an SBOM lockfile and emit `pkg:hex/` PURLs
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- elixir, typescript
调研方向
Start with src/engine/lockfile.ts (fullDependencyGraph), src/reporting/commands/sbom.ts (PROJECT_ECOSYSTEM), and src/core-open/utils/lockfile-parse.ts (KIND_BY_BASENAME); read the Elixir rows in docs/sbom-dependency-scope.md and compare the composer lockfile path and its tests. Add mix.lock coverage for Hex packages while excluding git, path, and in-umbrella entries, then update the scope documentation. Done when CycloneDX and SPDX produce the expected Hex PURL, invalid lockfiles fail clearly, and --no-transitive keeps only declared packages.
由索引模型根据 Issue 内容生成。
描述
- Difficulty: medium
- Area: SBOM / Elixir
Problem
docs/sbom-dependency-scope.md states that the export list has no mix.lock, so a package that appears only there is absent, and CycloneDX dependencies / SPDX DEPENDS_ON are omitted. fullDependencyGraph in src/engine/lockfile.ts (around lines 396–410) walks npm, pnpm, yarn, Cargo.lock, go.sum, poetry, uv, Pipfile.lock, Gemfile.lock, composer.lock, and packages.lock.json — not mix.lock. PROJECT_ECOSYSTEM in src/reporting/commands/sbom.ts (around lines 70–84) has no elixir entry, so an Elixir project is treated as an unknown type and projectEcosystem falls back to 'npm' (with a guessed-ecosystem warning). That is adjacent to open #167 (do not guess npm PURLs), but this issue is specifically: expand mix.lock and map Elixir to Hex.
The scan already parses mix.lock in src/core-open/scanners/elixir-scanner.ts (around lines 649–659), and src/core-open/utils/version-timeline.ts already has parseMixLock. Fail-closed syntax checking in src/core-open/utils/lockfile-parse.ts (KIND_BY_BASENAME) also omits mix.lock.
Expected behaviour
- Map
elixir→ Hex inPROJECT_ECOSYSTEMand emitpkg:hex/<name>@<version>(no npm fallback). - Expand
mix.lockinfullDependencyGraph: hex entries (:hex) become components; git / path / in-umbrella entries are not registry components. - A lockfile package also declared in
mix.exsat that version staysdirect; a package only in the lockfile istransitive. - Development / optional marks from the manifest still apply when the name matches; follow the existing Elixir rows in
docs/sbom-dependency-scope.md. - A truncated or invalid
mix.lockfails the export the same waycomposer.lockdoes (LockfileParseError). --no-transitiveomits lockfile-only rows and keeps declaredmix.exsrows.- Update
docs/sbom-dependency-scope.md.
Acceptance
- Tests modelled on
test/sbom-composer-lock.test.ts/test/sbom-php-require-dev.test.ts. - CycloneDX and SPDX both emit
pkg:hex/[email protected](example) and neverpkg:npm/jason. - A lockfile-only transitive hex package appears only when transitives are on.
- Git / path lock entries are absent from the component list.
- An invalid
mix.lockexits non-zero with an actionable, content-free error.
- 主要语言
- TypeScript
- 星标
- 4
- 派生
- 3
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 76
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
vibgrate/cli 的其他 Issue
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
相似的 Issue
-
area: documentation status: in progress type: documentation
难度 1/5 1 小时以内 新手友好度 76/100
Oddmash/oddmash-ui#222 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
appium/appium-wincore-driver#169 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
india-ultimate/hub#715 ·
维护者通常 1 天内回复
-
documentation Entwickler
难度 1/5 1 小时以内 新手友好度 89/100
维护者通常 1 天内回复