feat:pi协议中添加加密字段 - #1463
Open
overflow65537 wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
您好——我发现了 1 个问题
面向 AI Agent 的提示
请处理本次代码审查中的评论:
## 单独评论
### 评论 1
<location path="docs/en_us/3.3-ProjectInterfaceV2.md" line_range="726" />
<code_context>
+ - **Logs and telemetry:** Never write the plaintext to logs, telemetry, crash reports, or any shareable output. When a placeholder is needed, use a mask such as `******`, or omit the field entirely.
+ - **Config storage:** When writing the user configuration file, the value must be stored encrypted. Plaintext must not be persisted. After loading the config, decrypt only in memory for runtime use such as `pipeline_override` substitution and `pretask` arguments.
+ - **Encryption:** The algorithm and ciphertext format are Client-defined; ciphertext need not be interoperable across Clients or machines. Prefer OS-provided credential protection (e.g. Windows DPAPI, macOS Keychain, Linux Secret Service).
+ - **`default` / `preset`:** Do not set `default` on password fields, and do not include password-field plaintext in `preset`. `interface.json` is typically distributed with resources, so plaintext secrets must not appear in it.
+
- **hotkeys** `object[]`
</code_context>
<issue_to_address>
**🚨 issue (security):** 更新后的 `interface.schema.json` 和 `interface_import.schema.json` 接受带有明文 `default` 的密码输入,也接受包含密码字段值的预设,尽管协议明确禁止这两种情况。因此,基于架构的验证和编辑器工具会将不安全的配置报告为有效,从而允许分发或持久化明文机密信息。
**触发条件:** 资源作者在 `default` 或 `preset` 中包含密码字段的明文时。
**建议修复:** 添加条件架构约束,在 `password` 为 `true` 时拒绝 `default`;并限制预设值,使其不能包含密码字段;或者说明这些安全规则需要单独的语义验证器来执行。
</issue_to_address>帮助我变得更有用!请在每条评论上点击 👍 或 👎,我会利用这些反馈来改进审查结果。
Original comment in English
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/en_us/3.3-ProjectInterfaceV2.md" line_range="726" />
<code_context>
+ - **Logs and telemetry:** Never write the plaintext to logs, telemetry, crash reports, or any shareable output. When a placeholder is needed, use a mask such as `******`, or omit the field entirely.
+ - **Config storage:** When writing the user configuration file, the value must be stored encrypted. Plaintext must not be persisted. After loading the config, decrypt only in memory for runtime use such as `pipeline_override` substitution and `pretask` arguments.
+ - **Encryption:** The algorithm and ciphertext format are Client-defined; ciphertext need not be interoperable across Clients or machines. Prefer OS-provided credential protection (e.g. Windows DPAPI, macOS Keychain, Linux Secret Service).
+ - **`default` / `preset`:** Do not set `default` on password fields, and do not include password-field plaintext in `preset`. `interface.json` is typically distributed with resources, so plaintext secrets must not appear in it.
+
- **hotkeys** `object[]`
</code_context>
<issue_to_address>
**🚨 issue (security):** The updated `interface.schema.json` and `interface_import.schema.json` accept a password input with a plaintext `default`, and accept presets containing values for password fields, even though the protocol explicitly forbids both. Schema-based validation and editor tooling therefore report insecure configurations as valid, allowing plaintext secrets to be distributed or persisted.
**Triggers:** When a resource author includes a password field's plaintext in `default` or `preset`.
**Suggested fix:** Add conditional schema constraints that reject `default` when `password` is `true`, and constrain preset values so password fields cannot be included, or document that these security rules require a separate semantic validator.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sourcery 摘要
为 PI 协议添加加密密码字段支持,同时防止密码值出现在面向用户或可共享的数据中。
新功能:
password标志,用于标识敏感值并定义其在各客户端中的处理方式。改进:
文档:
维护工作:
password输入属性。Original summary in English
Sourcery 摘要
为 PI 协议添加安全密码字段支持,并记录其处理要求。
新功能:
password属性,用于标识机密值并定义客户端的安全处理方式。增强功能:
文档:
杂项:
Original summary in English
Sourcery 摘要
为 PI 协议添加安全密码字段支持,并记录其处理要求。
新功能:
password属性,用于标识机密值并定义客户端的安全处理方式。增强功能:
文档:
例行工作:
Original summary in English
Summary by Sourcery
Add secure password-field support to the PI protocol and document its handling requirements.
New Features:
passwordattribute to PI input fields to identify secret values and define secure client handling.Enhancements:
Documentation:
Chores: