feat: Sandbox implementation with seatbelt

This commit is contained in:
Abhisek Datta
2026-01-08 13:40:22 +05:30
parent 6e830c4c3d
commit ed59693f88
20 changed files with 1235 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
package sandbox
import "github.com/safedep/pmg/sandbox/util"
// ExpandVariables expands known variables in a path or pattern.
// This is a convenience wrapper around util.ExpandVariables.
//
// Supported variables:
// - ${HOME}: User home directory
// - ${CWD}: Current working directory
// - ${TMPDIR}: Temporary directory
func ExpandVariables(pattern string) (string, error) {
return util.ExpandVariables(pattern)
}
// ExpandPathList expands variables in a list of paths/patterns.
// This is a convenience wrapper around util.ExpandPathList.
func ExpandPathList(patterns []string) ([]string, error) {
return util.ExpandPathList(patterns)
}
// ContainsGlob returns true if the pattern contains glob wildcards.
// This is a convenience wrapper around util.ContainsGlob.
func ContainsGlob(pattern string) bool {
return util.ContainsGlob(pattern)
}