Skip to content

Symlink containment check breaks on Python 3.8 runtimes #119

@erensunerr

Description

@erensunerr

Affected file: sk/agents-md/skills/skill-scanner/scripts/scan_skill.py

What I hit

I ran the scanner in a Python 3.8 setup and it crashed before producing scan results.

I’m thinking this is due to:

is_internal = target.is_relative_to(skill_dir.resolve())

which is not available on older interpreter versions.

Repro

  1. Execute the script under Python 3.8.
  2. Scan a workspace containing a symlink case.
  3. The script exits with AttributeError.

Expected

The scanner should run on legacy supported versions without crashing on path checks.

Actual

One API call can fail and abort the scan flow.

Suggested fix

Use .resolve() + relative_to with exception handling for Python compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions