getsentry / getsentry/skills

Symlink containment check breaks on Python 3.8 runtimes

Open
#119 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
993
Forks
51
Avg merge
7h 49m
Merged PRs (30d)
2

Description

**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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.