Skip to content

catalog static checks walk a skill's files with os.walk and no onerror: a script or document in a directory they cannot list is not checked #1209

Todo

Description

@antonwolfy

external/command_checks._bundled_texts, external/content_checks._text_files and external/script_checks._bundled_files walk the skill directory with os.walk(skill_dir) and no onerror, so a directory that cannot be listed (mode 0o111, non-root) is skipped and its files are not checked.

Repro (a skill holding SKILL.md and refs/a.md, then chmod 111 refs): _bundled_texts(skill) returns [('refs/a.md', 'a')] and then []; _text_files(skill) returns ['SKILL.md', 'refs/a.md'] and then ['SKILL.md']; _bundled_files(skill, base) returns the same two and then ['SKILL.md']. A command, link or script finding in the dropped file is not reported, and the row carries no note. (catalog check already has a bundle-file-unchecked note for a hidden folder it cannot list, which is the model for a finding instead of an exception here; since #1168 a non-hidden folder it cannot list already makes load_skill fail, so the walks above are reached only for a hidden or vendored folder, or by a caller that does not load the skill.)

Fix: an onerror that records the directory and turns it into a bundle-file-unchecked note or re-raises, decided per check.

Found while fixing #1168. The fix's PR is #1211.

Activity

  1. self-assigned this
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions