workspace

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package workspace provides bounded, read-only repository traversal.

Index

Constants

View Source
const (
	MaxFiles      = 10_000
	MaxSourceSize = 1 << 20
)

Variables

This section is empty.

Functions

func CanonicalRoot

func CanonicalRoot(root string) (string, error)

CanonicalRoot resolves root and verifies that it names a directory.

func ManifestSHA256

func ManifestSHA256(root string, relativePaths []string) (string, error)

ManifestSHA256 binds a deterministic source-file inventory and content.

func ResolveFile

func ResolveFile(root, relative string) (string, error)

ResolveFile validates a repository-relative regular file and returns its canonical path. It rejects symlinks and root escapes.

func SourceFiles

func SourceFiles(root string) ([]string, error)

SourceFiles returns a deterministic repository-relative list of bounded Go and Python source files. Symlinks are never followed.

func Within

func Within(root, candidate string) bool

Within reports whether candidate is root or a descendant of root.

Types

This section is empty.

Jump to

Keyboard shortcuts

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