fix(sandbox): trust exact declared private endpoints#1560
Conversation
|
[P1] Advisor provenance can be lost during policy merge, which reopens the private-endpoint SSRF bypass this PR is trying to close. The new trust check relies on Please preserve advisor/user provenance at the endpoint, rule, or merge chunk level, or reject/segregate advisor proposals that target existing user-declared rules. This also needs a regression test where an advisor proposal for an internal exact hostname is merged into a rule that already contains the same binary. |
|
/ok to test 1d37a4c |
|
Follow-up with a more concrete explanation and suggested fix for the provenance issue. The risky path here is a two-step interaction between approval and merge:
For example, suppose active user policy already has a rule like: network_policies:
app-api:
binaries:
- path: /usr/bin/python
endpoints:
- host: api.example.com
port: 443Then the advisor proposes, and the user approves, a chunk with the same rule/binary but a private/internal endpoint: network_policies:
app-api:
binaries:
- path: /usr/bin/python
advisor_proposed: true
endpoints:
- host: internal-admin.local
port: 443
network_policies:
app-api:
binaries:
- path: /usr/bin/python
endpoints:
- host: api.example.com
port: 443
- host: internal-admin.local
port: 443At that point the new I think the durable fix is to make provenance live at the same granularity as the trust decision: the endpoint, not only the binary. Concretely:
An alternate fix would be to prevent advisor proposals from merging into existing user-owned rules for private/internal exact endpoints, but endpoint-level provenance seems less brittle because it keeps the authorization fact attached to the object that is actually trusted. |
1d37a4c to
19844d5
Compare
Summary
Fixes #1555.
Testing