Data handling

What Document Intelligence reads, stores and sends, for customers' security and data-protection reviews. It describes the current version. It is a factual basis for a DPIA, not a DPIA or a data processing agreement.

Where it runs

Everything runs in the customer's own Azure subscription, in the managed resource group the Marketplace deployment creates:

ResourcePurpose
Container app ca-scanner-…Reads SharePoint through Microsoft Graph, extracts text, detects findings
Container app ca-web-…The dashboard, behind Microsoft Entra sign-in
Cosmos DB (serverless)Documents, findings, scan state and the chat index. Key access is disabled; the apps use a managed identity
Key VaultThe app registration's client secret and, if AI is on, the model endpoint's API key
Log Analytics workspaceContainer logs, kept for 30 days
Managed identityLets the apps reach Cosmos DB and Key Vault without keys

The container image is pulled from Stealth Labs' registry (stealthlabsdocintel.azurecr.io), signed with Sigstore cosign.

Stealth Labs has no standing access to the managed resource group. Publisher access is just-in-time: it has to be requested, the customer approves it, and it is time-limited and recorded on the managed application.

What it reads

With the app registration the customer creates (Set up the app registration):

  • the SharePoint sites the customer chooses (or every site the app registration can see), their document libraries and files, read-only through Microsoft Graph
  • file metadata: name, path, size, created and modified dates, created by and last modified by, web address

Text is extracted from PDF, Word, PowerPoint, Excel and plain-text files. Files over 100 MB are recorded but not downloaded. Pre-2007 Office files, images and other types are recorded without their content.

What it stores (in the customer's Cosmos DB)

ContainerHolds
DocumentsOne item per file: metadata, the extracted text (up to 400,000 characters per file), the extraction status and, if AI is on, the AI summary and sensitivity rating
FindingsWhat detection found per file: the rule, its category and severity, a count, and up to three redacted samples (for example AB••••••••• C). Full values are never stored in findings
ScanStatePer library: the Graph delta link and the last scan's summary
ChunksOnly when chat is on: redacted passages of document text with their embeddings

The dashboard never displays extracted text. It shows document names, findings with redacted samples, and links that open the file in SharePoint, where SharePoint's own permissions apply.

When a file is deleted from SharePoint, its document item is deleted on the next scan, and its findings are closed. Its chat passages are deleted at once. Data otherwise stays until the customer deletes the deployment. Deleting the managed application deletes the managed resource group and everything in it.

What leaves the subscription

  • To Microsoft Graph and Microsoft Entra ID: sign-in and read requests.
  • To Stealth Labs: nothing from the deployment. When a customer deploys from Marketplace, Microsoft sends Stealth Labs the customer's contact details as a Marketplace lead (name, company, email).
  • To the customer's model endpoint, only if AI features are on: see below.

Optional AI features

Off by default. The customer turns them on in the deployment wizard by giving their own OpenAI-compatible endpoint: Azure OpenAI, Azure AI Foundry, OpenAI or a gateway. The customer chooses the endpoint, model and region. The endpoint's provider is the customer's processor, under the customer's agreement with that provider.

  • Summaries and sensitivity ratings: for each document with text, the first 12,000 characters are sent to the chat model.
  • Chat (Ask), if an embeddings model is also given:
    • Document text (the first 60,000 characters per document) is split into passages and sent to the embeddings model.
    • A question asked in the dashboard is sent to the embeddings model.
    • The question and the closest passages are then sent to the chat model.

Before anything is sent, every item detection recognises is replaced with a placeholder such as [REDACTED:ni_number], so the model never receives those values. That covers personal identifiers, financial data, credentials and classification markings. Questions are redacted the same way. Other text, such as names in running prose or free-text descriptions, is sent as written. Redaction reduces what reaches the model, but it is not a guarantee that no personal data does.

Document text is treated as untrusted input. It is wrapped in delimiters, and the model is told not to follow instructions inside it.

Keeping AI inside your own environment (sovereign)

The endpoint can be a model the customer hosts themselves, such as an open model served by Ollama or vLLM in their own Azure subscription and region. Then the scanner, the dashboard, the database and the model all run in the customer's environment, and no document text, question or answer leaves it. Stealth Labs has no access unless the customer approves just-in-time access.

What the endpoint needs:

  • OpenAI-compatible API over HTTPS, reachable from the deployment, for example https://<your-host>/v1. Ollama and vLLM both provide one.
  • A chat model. Small open models work, but answers improve with larger ones.
  • For chat (Ask), an embeddings model returning 1536 dimensions or fewer, for example nomic-embed-text. Smaller vectors are zero-padded to fit the index, which doesn't change how passages are matched.
  • An API key. The wizard always asks for one and sends it as a bearer token. vLLM can check it (--api-key). Ollama has no keys: enter any value, and restrict who can reach the endpoint (network rules or a gateway in front).

Tested on Ollama 0.40.17 on Azure Container Apps in UK South (4 vCPU, 8 GB, no GPU), with nomic-embed-text for embeddings:

  • qwen2.5:3b wrote accurate summaries and sensitivity ratings (about 20 seconds per document) but gave poor chat answers.
  • qwen2.5:7b answered chat questions correctly with citations, taking one to two minutes per answer on CPU.

Use a 7B-class model or larger for chat, and a GPU for reasonable speed or large estates. Requests to the model time out after three minutes.

Who can see what

  • Signing in to the dashboard uses the customer's Microsoft Entra ID. The customer decides who can sign in (optionally only assigned users).
  • Anyone who can sign in can view findings, document names and scan status.
  • Changing a finding's status and using chat need the Admin app role, which the customer assigns.
  • Chat answers can quote redacted text from any scanned document. They don't check whether the person asking can open that document in SharePoint, which is why chat is limited to Admins.

Security controls

  • Read-only Graph permissions (Sites.Read.All, or Sites.Selected for granted sites only).
  • No keys for Cosmos DB. Secrets are kept in Key Vault and read through the managed identity.
  • The dashboard has a strict Content Security Policy, CSRF protection on every change, and no rendering of model output as HTML.
  • The container image runs as non-root, is scanned for vulnerabilities, and is signed on every release.
  • Every release is deployed into a test subscription and checked against a SharePoint test site before it is published.