Skip to content

Should internal-link validation reject symlinks that resolve outside the skill directory? #86

Description

@yuehua1213

I was reviewing the internal-link boundary in structure/links.go at commit 7480766908955b0ff5b232a7d2e60217732de5cb.

The current check cleans the joined path and verifies that its string prefix remains inside the skill directory, then calls os.Stat. A path such as references/guide.md therefore looks internal syntactically, but could still be a symlink whose target resolves outside the skill directory.

Is that intentionally allowed, or should “internal link” mean the final resolved target also stays inside the skill package?

If it should be rejected, would a focused regression test in the existing structure test suite be the right way to establish the expected behavior? I’m also interested in whether you would be comfortable with the resulting before/after CI evidence being referenced publicly after a fix is accepted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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