Add zizmor pre-commit configuration
还没有人认领这个 Issue。
评估
调研方向
检查 .github 下现有的 GitHub Actions 配置,然后查看所引用的更改 beeware/.github#378 和示例 .github/zizmor.yml。将 zizmor 添加到 pre-commit 流程中,针对 Actions 配置运行它,并解决所有报告的问题,同时保持 beeware/.github 引用指向 @main,并与 core team 记录任何必要的排除项。
由索引模型根据 Issue 内容生成。
描述
What is the problem or limitation you are having?
zizmor is a useful tool for performing a static analysis of GitHub actions configurations, auditing for common security issues and related problems. It can be run standalone, but it can also be integrated into pre-commit.
Describe the solution you'd like
We should add zizmor to this project's pre-commit pipeline.
This will require fixing any issues that zizmor identifies with the existing Github actions configuration. Zizmor is able to automatically fix many problem, and it is able to make suggestions about other fixes. However, there are some problems where investigation and a manual fix will be required.
Zimor was recently added to the .github repository (see beeware/.github#378). That pull request may be instructive for how to add a zizmor configuration, the types of problems that Zizmor reports, and the fixes for those problems. The most invasive fixes are:
unpinned-uses- this requires providing a full hash for a reference to a GitHub Action, rather than just a version number. These hashes must be manually determined. This must be done for all action reference, except for references tobeeware/.githubactions; see details below.template-injection- Use of${{ }}syntax is a possible vector for security issues because the content isn't escaped; instead of using direct variable substitution, it is necessary to proxy GitHub variables through environment variables.
However, zizmor may find other problems; they should all be resolved.
References to beeware/.github
References to beeware/.github actions are the only actions that are allowed to remain unpinned. As these actions are in the BeeWare repository, the security exposure is different - someone who already has enough access to tamper with those actions likely has access to tamper with other repositories directly.
Any reference to a beeware/.github action should be retained as a reference to @main. A zizmor configuration like this one can be used to silence the zizmor error about unpinned uses.
Describe alternatives you've considered
No real alternative.
Additional context
Skipping rules, excluding files, or raising the minimum report level should not be considered unless absolutely necessary. A member of the core team can advise if you believe you have found a situation that requires an exclusion of this kind; post a comment on this ticket, or ask on Discord if you believe a rule cannot be satisfied.
- 主要语言
- Python
- 星标
- 7
- 派生
- 8
- 平均合并
- 9 小时 41 分钟
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
beeware/Python-support-testbed 的其他 Issue
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 76/100
-
enhancement good first issue
难度 3/5 1-2 天 新手友好度 42/100
beeware/Python-support-testbed#123 · 1 条评论 ·
查看 beeware/Python-support-testbed 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
syfoud/Simulated_Scepter#172 ·
-
A cancelled tests run makes the coverage comment workflow fail and reports it as a red check on main 未关闭area: ci bug perceived difficulty: 3
难度 2/5 1-3 小时 新手友好度 78/100
Nitjsefnie-Harness-Commons/daedalus#921 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
EleutherAI/lm-evaluation-harness#4207 ·
-
难度 1/5 1 小时以内 新手友好度 92/100
-
难度 2/5 1-3 小时 新手友好度 78/100
ClickHouse/clickhouse-connect#1057 ·