pathsafety

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanRelative

func CleanRelative(raw string) (string, bool)

func IsInsideAny

func IsInsideAny(targetPath string, roots []string) (bool, string, error)

func RelEntersGit added in v0.3.2

func RelEntersGit(rel string) bool

RelEntersGit reports whether any component of the OS-relative path rel is ".git", compared case-insensitively: on case-insensitive filesystems (macOS, Windows) ".GIT/config" reaches the same file as ".git/config". A .git directory holds repository metadata, credentials included (actions/checkout persists its token in .git/config by default), never render input.

func RelEscapes

func RelEscapes(rel string) bool

func ResolveForContainment

func ResolveForContainment(targetPath string) (string, error)

func SlashRelEscapes

func SlashRelEscapes(rel string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL