Commit 8036a9d
committed
fix(egress): close two IPv6 fail-opens, and separate a carve-out from an allowlist
An audit sweep over the whole diff turned up four things worth fixing in the
policy core and two in the profile layer.
Fail-opens, both IPv6 translation prefixes the address folding missed:
- `::ffff:0:a9fe:a9fe` (RFC 6145 IPv4-translated) was not folded, so a vouched
destination whose resolver answered with it reached cloud metadata — the
guarantee that metadata is never liftable did not hold for that spelling.
- `64:ff9b:1::/48` (RFC 8215 local-use NAT64) carries its IPv4 destination at an
offset the network operator chooses, so it cannot be read off the address at
all. `ipaddr.js` calls it plain unicast, which made it a route to metadata or
loopback under even the strict hosted policy. An address whose real
destination cannot be determined is now refused rather than judged on its
wrapper.
Policy corrections:
- The loopback carve-out no longer lifts the blocked-port list. It is granted
without anyone asking for it, and loopback is exactly where Sim's own Postgres
and Redis listen, so `http://localhost:5432` was reachable from an HTTP block
on any self-hosted deployment. Only an operator naming a destination lifts
ports now — a vouch carries the kind that earned it.
- A hostname that says it is loopback is refused before DNS when the policy does
not permit loopback, so the synchronous validator stops accepting
`https://localhost/x` on the hosted platform.
- `insecureHttp: 'always'` is capped at `whenVouched` on the hosted platform,
where nothing is vouched. Software served without TLS is a self-hosted
arrangement; a hosted deployment should not send a credential in the clear to
a user-supplied MCP or vLLM host.
- Wildcard allowlist entries are validated like every other entry. `*.foo.com/x`
and `*..com` were accepted silently and then matched nothing.
Transport:
- An IP-literal redirect target is judged as the literal even when the caller
supplied a resolved address, because `net.connect` dials a numeric host
directly and the literal is what the socket reaches.
- The connect-time lookup classifies against the request's own policy instead of
a hand-rolled private-address filter, so an allowlisted private destination
the redirect check permitted is no longer stranded at connect.
- 300, 305 and 306 are no longer followed. 305 redirects a request into a
server-named proxy, which is the one hop a guard must never take.
Provenance corrections: a Vision image resolved from an internal file URL and
Buffer's media probe are presigned URLs against Sim's own storage, so they take
`configuredEndpoint` the way STT and Textract already do — on a self-hosted
deployment with private object storage they were unreachable. Microsoft Word's
upload URL comes out of a Graph response rather than configuration, so it takes
`contentFetch`, matching SharePoint and Windchill.
Also: `policyCanVouch` is gone, since the synchronous callers both need the
narrow predicate; `validateDatabaseHost` classifies each address once instead of
twice; the dead `|| !validation.resolvedIP` conjuncts the discriminated union
made unreachable are removed across ~32 call sites; the boundary check scans
`background/` and `blocks/`; and the docs correct the MCP row, the in-cluster
naming claim, the refusal-message description, and add the upgrade notes.1 parent e3f91eb commit 8036a9d
57 files changed
Lines changed: 663 additions & 313 deletions
File tree
- apps
- docs/content/docs
- agents
- platform/self-hosting
- sim
- app/api/auth/sso/register
- lib
- a2a
- core/security
- egress
- internal
- agiloft
- brex
- buffer
- cursor
- extend
- github
- google-slides
- google-vault
- grafana
- image
- jupyter
- linq
- microsoft-word
- mistral
- onedrive
- onepassword
- pipedrive
- pulse
- reducto
- twilio-voice
- typeform
- vision
- zoom
- mcp
- media
- uploads/contexts/workspace
- providers
- azure-anthropic
- azure-openai
- vllm
- tools
- bitbucket
- github
- helm/sim
- packages/security/src
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
| |||
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
| 141 | + | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
160 | 162 | | |
161 | 163 | | |
162 | 164 | | |
| |||
167 | 169 | | |
168 | 170 | | |
169 | 171 | | |
170 | | - | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
173 | 185 | | |
174 | 186 | | |
175 | 187 | | |
| |||
216 | 228 | | |
217 | 229 | | |
218 | 230 | | |
219 | | - | |
| 231 | + | |
220 | 232 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | | - | |
60 | | - | |
| 60 | + | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| 84 | + | |
83 | 85 | | |
84 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
| |||
97 | 101 | | |
98 | 102 | | |
99 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
100 | 110 | | |
0 commit comments