Pulse/internal/cloudcp
rcourtman aae8aef4ab fix(security): bound provider MSP restore writes
restoreProviderMSPArchiveFile copied each tar entry with an unbounded
io.Copy, so the only limit on what a restore wrote to disk was the size
the archive declared for itself. A gzip bomb, a PAX sparse entry claiming
a huge logical size, or a corrupt stream could fill the target volume.

Bound extraction the way readProviderMSPBackupManifestBytes already
bounds the manifest: a per-entry cap and a cumulative cap across the
whole restore, both enforced against the bytes actually copied rather
than the declared header size. That size comes from the archive, so it
is only good for an early reject, never as the bound. An entry that
overruns fails the restore and its partial file is removed, rather than
being silently truncated into a file that looks complete.

A restore that failed partway had already deleted whatever it replaced,
leaving a half-populated control plane that looks bootable and forcing
the retry to use replace. Roll the partial restore back to an empty
target instead, and say so in the error.

Follows the zip-slip fix in the same function (CodeQL alert 314).
2026-08-06 22:39:20 +01:00
..
account Make the provider MSP portal honest and self-sufficient without an email provider 2026-07-10 11:22:57 +01:00
admin Add provider-hosted MSP install path 2026-06-02 12:11:35 +01:00
auditlog Harden provider-hosted MSP isolation 2026-06-02 21:10:13 +01:00
auth Make the provider MSP portal honest and self-sufficient without an email provider 2026-07-10 11:22:57 +01:00
cpmetrics feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
cpsec feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
docker Cover agent policy, alias normalization and agent report helpers 2026-07-23 06:44:33 +01:00
email Add Go branch-coverage tests for pure helpers across six packages 2026-07-19 15:11:02 +01:00
entitlements Self-issue the MSP evaluation licence, and fix two things it exposed 2026-08-03 18:14:05 +01:00
handoff Harden remaining CodeQL security boundaries 2026-07-09 19:46:40 +01:00
portal Add a portal preview scenario fit to be seen in public 2026-08-03 15:34:20 +01:00
proxytrust Add Go branch-coverage tests for canonical trust and recovery helpers 2026-07-19 15:11:01 +01:00
registry Cover cloud tenant registry queries, unified views and slowlog wrappers 2026-07-22 21:41:02 +01:00
stripe Cover replay bundle loading, magic link expiry and subscription mapping 2026-07-23 06:59:05 +01:00
authz.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
cloud_audit.go Make provider-MSP client runtimes verifiably licensed via chained entitlement leases 2026-06-10 13:58:52 +01:00
cloud_audit_branchcov0723am_test.go Cover eval CLI parsers, cloud audit predicates and vmware fixture fetching 2026-07-23 08:07:35 +01:00
cloudcp_pure_branchcov0718_test.go Add Go branch-coverage tests for models, cloudcp and actionlifecycle helpers 2026-07-19 15:10:09 +01:00
commercial_identity.go fix(cloudcp): unify portal magic link identity 2026-03-27 14:52:39 +00:00
config.go Let providers evaluate MSP without asking permission first 2026-08-03 16:31:24 +01:00
config_test.go Let providers evaluate MSP without asking permission first 2026-08-03 16:31:24 +01:00
favicon.svg Refresh portal favicon and preview asset route 2026-03-29 17:24:29 +01:00
health_monitor.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
health_stuck_provisioning.go Add provider MSP status command 2026-06-02 13:33:27 +01:00
health_stuck_provisioning_test.go Add provider MSP status command 2026-06-02 13:33:27 +01:00
hosted_entitlement_handlers.go Retire self-hosted trial signup control plane 2026-04-28 17:02:04 +01:00
monitor_stuck_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
provider_msp_backup.go fix(security): bound provider MSP restore writes 2026-08-06 22:39:20 +01:00
provider_msp_backup_archive_name_test.go fix(security): close the four open CodeQL findings 2026-08-06 18:11:51 +01:00
provider_msp_backup_test.go fix(security): bound provider MSP restore writes 2026-08-06 22:39:20 +01:00
provider_msp_bootstrap.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
provider_msp_bootstrap_test.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
provider_msp_portal_link.go Make the provider MSP portal honest and self-sufficient without an email provider 2026-07-10 11:22:57 +01:00
provider_msp_recovery.go Prepare v6.0.0 release candidate 2026-06-04 14:07:14 +01:00
provider_msp_recovery_test.go Add provider MSP workspace recovery 2026-06-02 14:28:16 +01:00
public_cloud_signup_handlers.go Remove MSP signup trial checkout 2026-06-01 00:24:02 +01:00
public_cloud_signup_handlers_test.go Remove MSP signup trial checkout 2026-06-01 00:24:02 +01:00
public_msp_signup_handlers.go Remove 198 unreachable Go functions 2026-06-03 12:29:37 +01:00
public_msp_signup_handlers_test.go Reconcile provider-hosted MSP copy 2026-06-02 19:14:18 +01:00
ratelimit.go Harden provider-hosted MSP isolation 2026-06-02 21:10:13 +01:00
ratelimit_test.go Harden provider-hosted MSP isolation 2026-06-02 21:10:13 +01:00
routes.go Self-issue the MSP evaluation licence, and fix two things it exposed 2026-08-03 18:14:05 +01:00
routes_auth_test.go Disable public cloud signup by default before v6 GA 2026-03-31 22:51:41 +01:00
routes_favicon_test.go Retire self-hosted trial signup control plane 2026-04-28 17:02:04 +01:00
routes_metrics_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
routes_test.go Self-issue the MSP evaluation licence, and fix two things it exposed 2026-08-03 18:14:05 +01:00
security.go style(portal): self-host roboto account typography 2026-03-28 14:44:55 +00:00
security_test.go style(portal): self-host roboto account typography 2026-03-28 14:44:55 +00:00
server.go Self-issue the MSP evaluation licence, and fix two things it exposed 2026-08-03 18:14:05 +01:00
server_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
static_assets.go Version portal favicon href for cache busting 2026-03-29 17:35:45 +01:00
storage_admission.go Add Pulse Cloud storage guardrails 2026-04-24 11:57:23 +01:00
storage_admission_test.go Tighten Pulse Cloud residue audit 2026-04-24 12:22:13 +01:00
tenant_runtime_rollout.go Make provider-MSP client runtimes verifiably licensed via chained entitlement leases 2026-06-10 13:58:52 +01:00
tenant_runtime_rollout_branchcov0723am_test.go Cover eval CLI parsers, cloud audit predicates and vmware fixture fetching 2026-07-23 08:07:35 +01:00
tenant_runtime_rollout_test.go Add provider MSP tenant rollout upgrade proof 2026-06-02 16:45:03 +01:00
tenant_state_metrics.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
tenant_state_metrics_test.go feat: Pulse v6 release 2026-03-18 16:06:30 +00:00
url_helpers.go Retire self-hosted trial signup control plane 2026-04-28 17:02:04 +01:00