Replace Secvisogram with `csaf-validator-lib`
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 42/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- node.js, typescript
- 领域
- build-system, security
调研方向
首先跟踪当前的 Secvisogram 子模块、package.json 依赖设置、构建流水线以及从 dist/shared/Core 导入的内容。将该集成替换为 csaf-validator-lib 子模块及其生产依赖,然后验证 CSAF 验证和现有构建仍然正常工作,包括 issue 中描述的较新验证覆盖范围。
由索引模型根据 Issue 内容生成。
描述
Overview
Secvisogram is a project for a React-powered, web-based Common Security Advisory Framework Version 2.0 (CSAF 2.0) validator.
https://github.com/loopbackio/security/pull/5 / https://github.com/loopbackio/security/commit/17f860ad6f885177033f809bc4fefb14782e0c53 added CSAF 2.0 validation with Secvisogram. When that change was merged, Secvisogram was bundled as a single solution, and the validation code was not distributed separately. Hence, we implemented a hacky solution to import the entire project and then to call only the validation logic. Notably, this includes:
- Installing all of Secvisogram's depenencies
- Re-constructing and executing relevant parts of Secvisogram's custom build pipeline
Since then, this validation code has been decoupled and Secvisogram has been updated to use the csaf-validator-lib Node.js module (https://github.com/BSI-Bund/secvisogram/pull/39 / https://github.com/BSI-Bund/secvisogram/commit/4487b6b0032348b487fe05e881da8f654b2f78ec).
Benefits of making the switch include:
- A more stable interface for us to bootstrap and use the dependency.
- Reduced build pipeline complexity
- Removed need for frontend build pipeline knowledge
- Reduced attack surface from unneeded web frontend packages.
Implementation remarks
The current approach involves:
git submodule-ing https://github.com/BSI-Bund/secvisogram.git- Installing Secvisogram's dependencies and calling Babel as part of the build pipeline
- Manually copying some non-JavaScript resources to the
distibution directory - Importing validation logic from
dist/shared/Core
In contrast, the new approach would involve:
git submodule-ing https://github.com/secvisogram/csaf-validator-lib.git
Although thecsaf-validator-libREADME indicates to usegit subtree,git submoduleis better for explicitly linking two Git repositories together. In contrast,git subtreecopies the Git history without any coupling to the source Git repository.- Installing
csaf-validator-lib's production dependencies
This switch would also bring in the latest features and validation tests such Test 6.3.8 ("Spell check", powered by the Hunspell spell checking library), of which the BSI-Bund Git repository is currently lacking.
Mitigating against NPM dependency confusion attacks
At time of writing, csaf-validator-lib is not published as an NPM package, hence the need to install this as a "local dependency". To mitigate against NPM dependency confusion attacks, it is important that the package.json dependency entry explicitly points to the local copy.
We can achieve this "explicit pointer" requirement by leveraging package aliases, which was introduced in
This issue is to track switching over to csaf-validator-lib
- 主要语言
- TypeScript
- 星标
- 4
- 派生
- 1
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
loopbackio/security 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 45/100
loopbackio/security#42 ·
-
难度 5/5 一周以上 新手友好度 25/100
loopbackio/security#41 ·
-
难度 5/5 一周以上 新手友好度 25/100
loopbackio/security#40 ·
-
openjsf
难度 5/5 一周以上 新手友好度 25/100
loopbackio/security#39 ·
-
难度 5/5 一周以上 新手友好度 25/100
loopbackio/security#38 ·
查看 loopbackio/security 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
copse-dev/agent-pane#2953 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
难度 2/5 1-3 小时 新手友好度 78/100
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
-
calcite-components needs triage refactor
难度 2/5 1-3 小时 新手友好度 75/100
Esri/calcite-design-system#15203 ·