package internal

import "github.com/cyphar/filepath-securejoin/pathrs-lite/internal"

Package internal contains unexported common code for filepath-securejoin.

Index

Variables

var (
	// ErrPossibleAttack indicates that some attack was detected.
	ErrPossibleAttack error = xdevErrorish{"possible attack detected"}

	// ErrPossibleBreakout indicates that during an operation we ended up in a
	// state that could be a breakout but we detected it.
	ErrPossibleBreakout error = xdevErrorish{"possible breakout detected"}

	// ErrInvalidDirectory indicates an unlinked directory.
	ErrInvalidDirectory = errors.New("wandered into deleted directory")

	// ErrDeletedInode indicates an unlinked file (non-directory).
	ErrDeletedInode = errors.New("cannot verify path of deleted inode")
)

Source Files

errors_linux.go

Directories

PathSynopsis
pathrs-lite/internal/assertPackage assert provides some basic assertion helpers for Go.
pathrs-lite/internal/fdPackage fd provides a drop-in interface-based replacement of *os.File that allows for things like noop-Close wrappers to be used.
pathrs-lite/internal/gocompatPackage gocompat includes compatibility shims (backported from future Go stdlib versions) to permit filepath-securejoin to be used with older Go versions (often filepath-securejoin is added in security patches for old releases, so avoiding the need to bump Go compiler requirements is a huge plus to downstreams).
pathrs-lite/internal/gopathrsPackage gopathrs is a less complete pure Go implementation of some of the APIs provided by [libpathrs].
pathrs-lite/internal/kernelversionPackage kernelversion provides a simple mechanism for checking whether the running kernel is at least as new as some baseline kernel version.
pathrs-lite/internal/linuxPackage linux returns information about what features are supported on the running kernel.
pathrs-lite/internal/procfsPackage procfs provides a safe API for operating on /proc on Linux.
pathrs-lite/internal/testutilsPackage testutils provides some internal helpers for tests.
Version
v0.6.1 (latest)
Published
Nov 19, 2025
Platform
linux/amd64
Imports
2 packages
Last checked
2 hours ago

Tools for package owners.