mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-26 08:11:14 +00:00
7ed780b063
Resolve F-AZ1074-1/2 (collection caps, generic gRPC internal errors). Standalone integration compose stack, docs, security audit, perf and retro. Co-authored-by: Cursor <cursoragent@cursor.com>
3.2 KiB
3.2 KiB
Static Analysis (Cycle 9)
Date: 2026-06-25 Mode: Delta scan Scope: AZ-1074 + AZ-1075 gRPC surface. Cycle-8 baseline remains authoritative for REST validators.
Files in scope:
SatelliteProvider.Api/Grpc/RouteTileDeliveryGrpcService.cs(new)SatelliteProvider.Api/Program.cs(AddGrpc,MapGrpcService, message size limits)SatelliteProvider.Services.RouteManagement/TileProvision/RouteTileDeliveryOrchestrator.cs(validation hardening)SatelliteProvider.GrpcContracts/tile_provision.proto+ generated stubsSatelliteProvider.IntegrationTests/RouteTileDeliveryGrpcTests.cs,GrpcTestHelpers.csSatelliteProvider.IntegrationTests/Dockerfile(linux/amd64, aspnet runtime)docker-compose.tests.yml(self-contained test stack)
Method: End-to-end read of new files; grep for hardcoded secrets; trace auth middleware order; compare gRPC validation bounds vs REST CreateRouteRequestValidator.
Findings
F-AZ1074-1 — Unbounded gRPC request collections enable authenticated DoS (Medium / A04) — RESOLVED in cycle 9 (Step-14 follow-up)
- Location:
RouteTileDeliveryOrchestrator.ValidateJob(pre-fix). - Description:
DeliverRouteTilesaccepted unboundedwaypoints,geofences, andclient_tilesprotobuf repeated fields. RESTPOST /api/satellite/routecapspointsat 500 andgeofences.polygonsat 50 (cycle-8 F-AZ809-1 fix); gRPC had no equivalent caps before cycle 9 Step 14. - Impact: Medium. Auth-gated (
[Authorize]onRouteTileDeliveryGrpcService; JWT metadata required). Authenticated operator could force large CPU/memory work inRouteTileExpander.ExpandandClientTileCatalog.IndexByZxy. - Resolution: Added
MaxWaypoints = 500,MaxGeofencePolygons = 50,MaxClientTiles = 5000(inventory cap parity) toValidateJob. Unit testDeliverAsync_TooManyWaypoints_Throwsadded.
F-AZ1074-2 — Internal exception message echoed to gRPC client (Low / A09) — RESOLVED in cycle 9 (Step-14 follow-up)
- Location:
RouteTileDeliveryGrpcService.cs:55-58(pre-fix). - Description: Generic
catch (Exception)wroteex.Messageinto streamDeliveryError.Message— parallel to cycle-7 F-AZ795-1 (REST ProblemDetails path). - Impact: Low. Auth-gated. Could leak internal exception text to authenticated clients.
- Resolution: Client message replaced with generic
"An internal error occurred."; full exception still logged server-side.
Pass areas (cycle-9 delta)
| Area | Result |
|---|---|
| SQL injection | N/A — no new raw SQL |
| Hardcoded secrets | None in new files |
| gRPC auth | [Authorize] + UseAuthentication/UseAuthorization before MapGrpcService |
| JWT on gRPC | Integration tests pass Bearer token via metadata — matches REST contract |
| Message size limits | MaxReceiveMessageSize = 16 MiB, MaxSendMessageSize = 64 MiB configured |
| Protobuf parsing | Bounded by Kestrel/gRPC message limits; collection caps added post-audit |
| Test fixtures | GrpcTestHelpers uses env-resolved JWT via JwtTestHelpers.MintAuthenticated — no embedded secrets |
Verdict
PASS_WITH_WARNINGS at audit time (1 Medium open → resolved in Step-14 follow-up). Post-fix delta: PASS for cycle-9 new code.