pathutil

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package pathutil provides path safety helpers for omnibump.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsafePath = errors.New("unsafe path")

ErrUnsafePath is returned when a file path resolves outside the allowed project root boundary (e.g. via path traversal or a symlink escape).

Functions

func ValidatePathWithinRoot

func ValidatePathWithinRoot(root, path string) error

ValidatePathWithinRoot checks that path resolves to a location inside root, following symlinks on both sides so a symlink cannot be used to escape.

Types

This section is empty.

Jump to

Keyboard shortcuts

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