feat: add guarded document workbench foundations
CI (SIAX Cloud) / integration (push) Skipped
CI (SIAX Cloud) / sonar (push) Skipped
masterplan-lock / check (push) Successful in 5s
Security Scan (SIAX Cloud) / security (push) Successful in 15s
CI (SIAX Cloud) / security (push) Successful in 16s
CI (SIAX Cloud) / sonar (pull_request) Skipped
masterplan-lock / check (pull_request) Successful in 7s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 21s
CI (SIAX Cloud) / security (pull_request) Successful in 25s
CI (SIAX Cloud) / quality (push) Successful in 1m17s
CI (SIAX Cloud) / integration (pull_request) Successful in 54s
CI (SIAX Cloud) / quality (pull_request) Successful in 1m7s

This commit is contained in:
2026-11-02 01:26:36 +01:00
parent cb01f948eb
commit bd1c20edb2
34 changed files with 1992 additions and 19 deletions
+1 -1
View File
@@ -163,7 +163,7 @@ export class DocumentCaptureService {
content_type: attachment.contentType || "application/pdf",
size_bytes: written.sizeBytes,
checksum_sha256: checksum,
pii_level: "medium",
pii_level: "high",
retention_policy: "document_capture_standard",
data_residency: "eu",
risk_level: "L3",
+9 -1
View File
@@ -97,7 +97,15 @@ export class DocumentExtractionService {
if (!ctx.model_id) {
throw new Error("extractDocument: missing model_id");
}
if (!ctx.tenant_id || !ctx.project_id || !ctx.actor_id) {
throw new Error("extractDocument: missing tenant_id/project_id/actor_id");
}
const document = await this.captureService.getDocument(documentId);
// The caller's verified tenant alone is insufficient: the document being
// read must belong to the same tenant AND project before policy or bytes.
if (document.tenant_id !== ctx.tenant_id || document.project_id !== ctx.project_id) {
throw new Error(`Document ${documentId} not found`);
}
const policy = await this.cl0ud.evaluatePolicy({
tenant_id: ctx.tenant_id,
@@ -168,7 +176,7 @@ export class DocumentExtractionService {
content_type: "application/json",
size_bytes: written.sizeBytes,
checksum_sha256: crypto.createHash("sha256").update(payloadJson).digest("hex"),
pii_level: "medium",
pii_level: "high",
retention_policy: "document_extraction_standard",
data_residency: "eu",
risk_level: "L3",