---
title: Tech debt
summary: CRITICAL and HIGH severity findings from analysis.
status: draft
owner: SAIF.Core documentation
last_reviewed: 2026-09-24
---

# Tech debt

None of the six call sites has any failure handling, potentially PII-bearing document content and distribution metadata travel over unauthenticated plain HTTP, and a `NullReferenceException` is reachable before one distribution path even makes its SOAP call.

## CRITICAL

| Finding | Component | Impact | Recommended action |
| --- | --- | --- | --- |
| Document XML, email recipients/body, fax numbers, and deferred-print metadata — potentially PII or claim data — are sent over unauthenticated plain HTTP in every environment, and responses carry rendered PDFs the same way | `DocumentServiceProxy.cs:69-83,150-204`; `environments.xml:22,41,60,79,97,115` | Sensitive document content and distribution metadata are exposed in cleartext to any party able to observe the network path | Not prescribed — see the skill's no-remediation rule |

## HIGH

| Finding | Component | Impact | Recommended action |
| --- | --- | --- | --- |
| No failure handling exists on any of the six call sites — no `try`/`catch`, no `FaultException` handling, no retry, no explicit timeout, and no cancellation | `DocumentServiceProxy.cs:37-146` | Every call is synchronous and blocking; a slow or unreachable remote service blocks the calling thread with no recovery path | Not prescribed |
| `MapFaxMessage` dereferences its `faxInfo` argument without a null check | `DocumentServiceProxy.cs:190-204`; `DocumentService.cs:148` | A `null` `faxInfo` passed to `DistributeDocumentDocCenter` throws `NullReferenceException` before the SOAP call is even attempted* | Not prescribed |
| `Dispose()` calls `Close()` with no `Abort()` fallback on a faulted `ClientBase<T>`, and one client instance is held for the owner's lifetime | `DocumentServiceProxy.cs:217-225`; `DocumentService.cs:35` | `Close()` on a faulted channel throws `CommunicationObjectFaultedException`* and poisons every later call on that instance until it is disposed and recreated* | Not prescribed |
| `DocumentService` instances are constructed without `using` in `ReportsController.cs:30,61,92,110` and `HomeController.cs:24` | `Services/SAIF.Services.WebApi/PrintAPI/Controllers/ReportsController.cs`; `HomeController.cs` | The underlying `DocumentServiceProxy`/`clsGenerateSoapClient` chain is left undisposed for these request paths* | Not prescribed |
| Message-size limits were raised to `int.MaxValue` for large PDFs, but timeouts were not raised alongside them | `DocumentServiceProxy.cs:23-27` | Large document rendering or distribution can still time out under the default one-minute send timeout* | Not prescribed |
| `MapMailMessage` never sets `AttachmentFileName` even though the contract declares it — see [BR-DOC-001](business-rules.md#br-doc-001-attachmentfilename-is-never-populated) | `DocumentServiceProxy.cs:174-187` | Emailed distributions through this proxy carry no attachment file name | Not prescribed |
| The `faxInfo` parameter of `DistributeDocument` is silently ignored — see [BR-DOC-002](business-rules.md#br-doc-002-faxinfo-is-silently-ignored-in-distributedocument) | `DocumentServiceProxy.cs:69-83` | A caller supplying fax details through this overload has them discarded with no fax distribution occurring and no error raised | Not prescribed |
| Several `DependencyMap.cs` registrations and tests pass six constructor arguments (including `IPdfService`) to `DocumentService`, but this repository's `DocumentService` constructor takes five | `DependencyMaps/SAIF.DependencyMaps.Web.Documents/DependencyMap.cs:173-179` (and sibling files) | Those projects likely bind to a different, packaged version of `DocumentService`, which is flagged but not reconciled** | Not prescribed |

## Related documentation
- [Client index](index.md)
- [Overview](overview.md)
- [Architecture](architecture.md)
- [Contract](contract.md)
- [Operation map](operation-map.md)
- [Client reference](reference.md)
- [Consumption](consumption.md)
- [Dependencies](dependencies.md)
- [Business rules](business-rules.md)

## Sources
- `Services/SAIF.Services.Web.Proxies/DocumentServiceProxy.cs`
- `Services/SAIF.Services/Utilities/Documents/DocumentService.cs`
- `Services/SAIF.Services.WebApi/PrintAPI/Controllers/ReportsController.cs`
- `Services/SAIF.Services.WebApi/PrintAPI/Controllers/HomeController.cs`
- `DependencyMaps/SAIF.DependencyMaps.Web.Documents/DependencyMap.cs`
