Skip to content

Zip-slip-style path join on template item names from GitHub API #25

Description

@Jaro-c

I noticed commands/clone.go:546 does filepath.Join(localPath, item.Name) using the GitHub API JSON item.Name with no traversal check. Low risk today since the source repo is hardcoded and trusted over HTTPS, but worth adding defense-in-depth in case that repo or the API response is ever compromised.

I'd reject item.Name containing /, .., or absolute-path prefixes before joining.

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