{"record":{"id":"d2de30445c49a039","repo":"ruvnet/ruflo","slug":"pii-detection-failed","errorCode":null,"errorMessage":"PII detection failed","messagePattern":"PII detection failed","errorType":"exception","errorClass":"QESecurityError","httpStatus":null,"severity":"error","filePath":"v3/plugins/agentic-qe/src/bridges/QESecurityBridge.ts","lineNumber":357,"sourceCode":"        let match: RegExpExecArray | null;\n        while ((match = pattern.exec(content)) !== null) {\n          detections.push({\n            type,\n            location: {\n              start: match.index,\n              end: match.index + match[0].length,\n            },\n            confidence: this.calculatePIIConfidence(type, match[0]),\n            redactedValue: this.redactPII(type, match[0]),\n          });\n        }\n      }\n\n      this.logger.info(`Found ${detections.length} PII instances`);\n      return detections;\n    } catch (error) {\n      this.logger.error('PII detection failed', error);\n      throw new QESecurityError('PII detection failed', error as Error);\n    }\n  }\n\n  /**\n   * Validate input against security schemas\n   */\n  async validateInput<T>(\n    input: unknown,\n    schema: string\n  ): Promise<{ valid: boolean; errors?: string[]; value?: T }> {\n    try {\n      this.logger.debug(`Validating input against schema: ${schema}`);\n\n      const result = this.security.inputValidator.validate<T>(input, schema);\n\n      if (!result.valid) {\n        this.logger.warn(`Input validation failed: ${result.errors?.join(', ')}`);\n      }","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/plugins/agentic-qe/src/bridges/QESecurityBridge.ts#L339-L375","documentation":"detectPII() threw while running its PII regex patterns over the content (invalid pattern, engine error) — not 'PII was found', which is a normal return of detections. The catch logs and re-raises wrapped, so detection failures are distinguishable from positive findings.","triggerScenarios":"Thrown at v3/plugins/agentic-qe/src/bridges/QESecurityBridge.ts:357 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the PII detection model/service health and input encoding; retry after validating the input payload."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}