fix(sec-core): resolve Skill Ledger FUSE and unmanaged roots#1141
Open
1570005763 wants to merge 4 commits into
Open
fix(sec-core): resolve Skill Ledger FUSE and unmanaged roots#11411570005763 wants to merge 4 commits into
1570005763 wants to merge 4 commits into
Conversation
edonyzpc
reviewed
Jun 25, 2026
| @@ -0,0 +1,219 @@ | |||
| """Resolve Skill Ledger operations away from SkillFS runtime views.""" | |||
edonyzpc
reviewed
Jun 25, 2026
| policy: str | None = None, | ||
| ) -> dict[str, Any]: | ||
| """Export a signed snapshot plus manifest and findings for user review.""" | ||
| validate_skill_dir(skill_dir) |
Collaborator
There was a problem hiding this comment.
decide_skill/clear_decision/rollback_skill/show_skill 均在入口添加了路径解析,但 export_skill 没有调用 require_live_skill_dir,需要确认
edonyzpc
reviewed
Jun 25, 2026
| "target": None, | ||
| "userDecision": None, | ||
| "reasonCode": "unmanaged_skill_root", | ||
| "message": None, |
Collaborator
There was a problem hiding this comment.
show_skill 对 unmanaged root 返回 message=null,所有 hook(即使 policy=block)都静默放行,hook 层的 _resolve_skill_dir 仅在固定 base 路径下查找,不会触达 unmanaged 路径,需要在代码中文档化
edonyzpc
requested changes
Jun 25, 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
Fix Skill Ledger runtime exposure for SkillFS/FUSE-visible skill paths and unmanaged skill roots.
skill-ledger showreturn an unmanaged diagnostic with exit 0 for roots the current daemon cannot managemessageis null, while preserving normal risk prompts for managed rootsRelated Issue
closes #1115
Type of Change
Scope
cosh(copilot-shell)sec-core(agent-sec-core)skill(os-skills)sight(agentsight)tokenless(tokenless)ckpt(ws-ckpt)memory(agent-memory)anolisa(anolisa-cli)skillfs(SkillFS)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 --checkpassmemory(Linux only):cargo clippy --all-targets -- -D warnings,cargo fmt --check, andcargo testpassanolisa:cargo clippy --all-targets --locked -- -D warnings,cargo fmt --all --check, andcargo test --lockedpassskillfs:cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings, andcargo test --workspacepasspackage-lock.json/Cargo.lock)Testing
uv run --project src/agent-sec-core/agent-sec-cli pytest src/agent-sec-core/tests/unit-test/skill_ledger src/agent-sec-core/tests/integration-test/skill-ledger/test_skill_ledger_integration.py src/agent-sec-core/tests/unit-test/security_middleware/backends/test_skill_ledger_backend.py src/agent-sec-core/tests/unit-test/cosh_hooks/test_skill_ledger_hook.py src/agent-sec-core/tests/unit-test/hermes-plugin/test_skill_ledger.py src/agent-sec-core/tests/unit-test/daemon/test_skill_ledger_activation.py -qmake python-code-prettyfromsrc/agent-sec-coreuv run --project src/agent-sec-core/agent-sec-cli ruff check --config src/agent-sec-core/agent-sec-cli/pyproject.toml src/agent-sec-core/agent-sec-cli/src/agent_sec_cli/skill_ledger/core/live_root.py src/agent-sec-core/agent-sec-cli/src/agent_sec_cli/skill_ledger/core/decision.py src/agent-sec-core/agent-sec-cli/src/agent_sec_cli/skill_ledger/config.pygit diff --checkAdditional Notes
This PR intentionally leaves SkillFS activation schema unchanged and keeps SkillFS unaware of scan status or user decisions.