oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package claude
2
3import (
4 "os"
5 "path/filepath"
6 "testing"
7)
8
9func TestNativeIsolationPolicy(t *testing.T) {
10 f := fixtureFor(t, "Engineering")
11 if err := os.Symlink("/home/runner", filepath.Join(f.launch.Workspace, "equipo-direct-sentinel-alias")); err != nil {
12 t.Fatal(err)
13 }
14 for _, tool := range []string{"Read", "Glob", "Grep"} {
15 for _, path := range []string{"/home/runner/equipo-read-sentinel", "/proc/self/root/home/runner/equipo-read-sentinel", "/proc/1/root/home/runner/equipo-read-sentinel", "/workspace/equipo-direct-sentinel-alias/equipo-read-sentinel"} {
16 if !ProbeNativeReadPolicy(f.launch.Policy, tool, path) {
17 t.Fatalf("protected %s %s", tool, path)
18 }
19 }
20 if ProbeNativeReadPolicy(f.launch.Policy, tool, "/workspace/normal") {
21 t.Fatal("workspace blocked")
22 }
23 }
24 if ProbeNativeReadPolicy(f.launch.Policy, "Bash", "/home/runner/equipo-read-sentinel") {
25 t.Fatal("native proof used for Bash")
26 }
27}
28