Skip to content

Commit 6b0a001

Browse files
authored
chore(sync): add missing capability normalization vector (#44)
* chore(ci): add explicit workflow permissions * chore(sync): mirror capability normalization vector from spec
1 parent a372f6d commit 6b0a001

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "capability-normalization-boundary",
3+
"policy": {
4+
"version": 1,
5+
"trusted_signers": ["alice.dev"],
6+
"capability_ceiling": {
7+
"fs": {
8+
"read": ["/tmp"],
9+
"write": ["/tmp"]
10+
},
11+
"net": ["https://api.example.test/v1"],
12+
"exec": false,
13+
"time": false
14+
}
15+
},
16+
"cases": [
17+
{
18+
"capability": {"kind": "fs.read", "value": "/tmp/allowed.txt"},
19+
"expect": "allow",
20+
"note": "regular path under prefix remains allowed"
21+
},
22+
{
23+
"capability": {"kind": "fs.read", "value": "/tmp/./allowed.txt"},
24+
"expect": "deny",
25+
"note": "dot-segment paths are rejected to avoid ambiguity"
26+
},
27+
{
28+
"capability": {"kind": "net.http", "value": "https://api.example.test:443/v1/forecast"},
29+
"expect": "allow",
30+
"note": "explicit default https port matches policy URI without explicit port"
31+
},
32+
{
33+
"capability": {"kind": "net.http", "value": "https://api.example.test:444/v1/forecast"},
34+
"expect": "deny",
35+
"note": "non-default port must not match an implicit default-port policy URI"
36+
},
37+
{
38+
"capability": {"kind": "net.http", "value": "data:text/plain,ok"},
39+
"expect": "deny",
40+
"note": "schemes without authority are denied for net capability checks"
41+
}
42+
]
43+
}

0 commit comments

Comments
 (0)