fix(openshell): sandboxes install scoped npm packages; egress endpoints allow encoded slashes (#1864)
This commit is contained in:
1 file changed
+7
-1
@@ -279,7 +279,13 @@ func (r *Runtime) spec(l Launch) (*v1.SandboxSpec, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
endpoints = append(endpoints, v1.PolicyNetworkEndpoint{Host: host, Port: uint32(port)}) //nolint:gosec // G115: a parsed port is 1 to 65535.
|
||||
// Package registries name scoped packages with an encoded slash
|
||||
// (@scope%2Fname), which the gateway's HTTP filter refuses unless
|
||||
// the endpoint allows it, and it allows it only on a REST endpoint.
|
||||
endpoints = append(endpoints, v1.PolicyNetworkEndpoint{
|
||||
Host: host, Port: uint32(port), //nolint:gosec // G115: a parsed port is 1 to 65535.
|
||||
Protocol: "rest", Access: v1.NetworkAccessPresetFull, AllowEncodedSlash: true,
|
||||
})
|
||||
}
|
||||
rules["egress"] = v1.NetworkPolicyRule{Name: "egress", Endpoints: endpoints, Binaries: []v1.PolicyNetworkBinary{{Path: anyBinary}}}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user