Skip to content

[BUG] [v0.0.7] SkillPermissionChecker ignores parent permissions for skill load #8943

@sysprime10001

Description

@sysprime10001

Project

cortex

Description

SkillPermissionChecker does not honor parent session inheritance when loading
skills. can_load_skill() only checks the local PermissionManager and returns
Ok(false) when the local response is Ask, even if the parent manager has an
explicit Allow for the same skill. This breaks child session inheritance and
prevents trusted skills from loading in derived sessions.

Error Message

No explicit error message. The call returns Ok(false) and logs "Skill loading
requires confirmation".

Debug Logs

debug!(skill = ..., "Skill loading requires confirmation")

System Information

Bounty Version: 0.1.0
OS: Ubuntu 24.04 LTS
CPU: AMD EPYC-Genoa Processor (8 cores)
RAM: 15 GB

Screenshots

No response

Steps to Reproduce

  1. Create a parent PermissionManager and grant a skill permission for
    trusted-skill with PermissionScope::Session.
  2. Create a child PermissionManager with default config.
  3. Build a SkillPermissionChecker using
    SkillPermissionChecker::with_parent(child, parent).
  4. Call can_load_skill("trusted-skill").
  5. Observe it returns Ok(false) even though the parent explicitly allows the
    skill.

Expected Behavior

When inherit_parent_permissions is enabled, a parent Allow should permit
skill loading in the child session.

Actual Behavior

can_load_skill() ignores the parent manager entirely and denies/asks the
skill, so the skill fails to load in the child session.

Additional Context

can_skill_use_tool() has parent inheritance logic, but can_load_skill() does
not, so inheritance works for tools but not for loading the skill itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cortexIssues related to CortexLM/cortex repositoryvalidValid issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions