feat(sec-core): update skill ledger security interactions#529
Open
1570005763 wants to merge 1 commit into
Open
feat(sec-core): update skill ledger security interactions#5291570005763 wants to merge 1 commit into
1570005763 wants to merge 1 commit into
Conversation
cfe191e to
70a9fdb
Compare
edonyzpc
reviewed
May 14, 2026
|
|
||
|
|
||
| def _ask_with_reason(reason: str) -> str: | ||
| """Return an ask decision with a confirmation reason for display.""" |
Collaborator
There was a problem hiding this comment.
行为上有变化,确认一下文档是否需要对应更新,例如copilot-shell 的 quickstart 等
edonyzpc
reviewed
May 14, 2026
| ) | ||
|
|
||
| if status in _ASK_STATUSES: | ||
| return _ask_with_reason(reason) |
Collaborator
There was a problem hiding this comment.
新流程要求走用户确认:
- agent-sec-cli skill-ledger certify --all 经由 agent 驱动时:任何 none 状态的 Skill 都会在 hook 层弹 ask,阻断批量流程;
- 首次安装一个 Skill(状态必为 none)——所有新安装 Skill 首次被读时都会走一次 ask;
建议:
- 明确非交互退化策略:例如"当宿主无法提供确认能力时降级为 allow+reason"。cosh 端看能否读取 settings 里是否启用 interactive prompt;openclaw 端看 requireApproval 合约是否允许宿主无 UI 时默认 deny/allow。
- 至少在文档里写清:none 状态下 agent 驱动的批处理场景必须走 certify --all 前置 + 只对已认证 Skill 读取,否则会触发大量确认。
- 补一条 e2e 或集成用例覆盖"非 pass 状态但宿主不响应 ask"的表现。
edonyzpc
requested changes
May 14, 2026
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.
Description
Update skill-ledger interactions so non-pass hook states use the new confirmation policy and skill-ledger guidance presents a clearer quick-scan / deep-scan workflow. Cosh and OpenClaw now require confirmation for unscanned, drifted, denied, and tampered skills while keeping warn/error/unknown states fail-open with warnings.
The skill-ledger Skill instructions now define a single report format shared by status checks, quick scans, deep scans, and post-install certification. Agent-assisted skill installs automatically run quick certification after a successful install, while explicit deep-scan requests go directly through the deep scan path after environment checks.
Related Issue
no-issue: user-requested skill ledger interaction update
Type of Change
Scope
cosh(copilot-shell)sec-core(agent-sec-core)skill(os-skills)sight(agentsight)tokenless(tokenless)Checklist
cosh: Lint passes, type check passes, and tests passsec-core(Rust):cargo clippy -- -D warningsandcargo fmt --checkpasssec-core(Python): Ruff format and pytest passskill: Skill directory structure is valid and shell scripts pass syntax checksight:cargo clippy -- -D warningsandcargo fmt --checkpasstokenless:cargo clippy -- -D warningsandcargo fmt --checkpasspackage-lock.json/Cargo.lock)Testing
Additional Notes
Rust checks were not run because this change does not touch Rust code.