lint accepts modelith-ref-type on a GitHub-origin provenance header
还没有人认领这个 Issue。
评估
调研方向
从 internal/provenance/provenance.go 中的 Header.validate 开始,然后阅读 TestADR_0019_RefTypeIsRecordedOnlyWhereItIsNeeded 旁边的测试。针对 GitHub-origin header 使用 modelith lint 进行复现,并添加一个测试,展示 modelith-ref-type 会为 GitHub origins 生成 provenance finding,同时对于文档中说明的 Azure DevOps case 仍然有效。
由索引模型根据 Issue 内容生成。
描述
Follow-up from the review of #52.
ADR-0019 and docs/10-vendoring.md both say the modelith-ref-type provenance key applies only to Azure DevOps and is omitted for GitHub. Lint doesn't enforce that. Header.validate (internal/provenance/provenance.go) checks only that the value is one of branch/tag/commit, not which origin it appears on.
Repro (at 52a5544)
Take a GitHub-origin vendored copy and add the key. Here the recorded type disagrees with the ref:
# modelith-vendored: DO NOT EDIT — this file is a copy. Change it at its origin.
# modelith-fetch: git
# modelith-origin: https://github.com/acme/billing
# modelith-path: docs/payments.modelith.yaml
# modelith-ref: main
# modelith-ref-type: tag
# modelith-commit: 4f2c1e9c8b3ad0e5f71b2c9a6d4e8f30ab5c7d21
# modelith-imported: 2026-09-23
# modelith-digest: sha256:…
modelith lint gh-reftype.modelith.yaml
# 0 error(s), 0 warning(s)
deps update then drops the key without saying so (recordedRefType returns "" for GitHub).
Expected
Pre-release, the header uses closed sets (compare unknown fetch: methods), so this should be a provenance finding along the lines of ref-type is only recorded for dev.azure.com origins. Pin it with a test next to TestADR_0019_RefTypeIsRecordedOnlyWhereItIsNeeded.
- 主要语言
- Go
- 星标
- 34
- 派生
- 5
- 平均合并
- 5 小时 7 分钟
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
stacklok/modelith 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 88/100
-
documentation
难度 2/5 1-3 小时 新手友好度 92/100
-
enhancement
难度 2/5 半天 新手友好度 68/100
-
难度 5/5 一周以上 新手友好度 20/100
-
难度 5/5 一周以上 新手友好度 20/100
查看 stacklok/modelith 的全部 Issue
相似的 Issue
-
agent-butler-finding chore
难度 1/5 1 小时以内 新手友好度 88/100
jordansmall/spindrift#4146 ·
维护者通常 1 天内回复
-
security
难度 2/5 1-3 小时 新手友好度 68/100
IBM/ibmcloud-volume-file-vpc#119 ·
-
security
难度 2/5 1-3 小时 新手友好度 66/100
IBM/networking-go-sdk#339 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
kubernetes-sigs/mcp-lifecycle-operator#439 ·
维护者通常 1 天内回复
-
area: global bug dx priority: low
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复