fence

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package fence wraps attacker-controllable free text (product titles, bullet features, descriptions, and especially review bodies) so an agent treats it as untrusted data, not instructions. ON by default in agent mode (contract §8, spec.md "Prompt-injection surface"). Numeric/ID/URL fields are never fenced.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(s string) string

Wrap fences a single free-text value. Empty strings pass through unchanged so absent fields stay empty rather than becoming a hollow fence.

func WrapAll

func WrapAll(ss []string) []string

WrapAll fences each element of a free-text slice in place and returns it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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