Skip to content

Latest commit

 

History

History
77 lines (56 loc) · 3.99 KB

File metadata and controls

77 lines (56 loc) · 3.99 KB

Security Checklist — AgenticMedicalImagingHelper

Review Date: 2026-02-26 Reviewer: Claude Code (GABBE SDLC S07) Version: 1.0.0


Authentication & Authorization

# Control Status Notes
A1 API key sourced from environment variable (GOOGLE_API_KEY) ✅ PASS Never hardcoded; checked in src/main/index.ts
A2 API key never logged or written to files ✅ PASS Grep confirms no apiKey in log/write paths
A3 .env file in .gitignore ✅ PASS Verified in .gitignore
A4 No default fallback API key in code ✅ PASS Fail-fast with MissingApiKeyError

Input Validation & Path Security

# Control Status Notes
B1 Path traversal protection on input directory ✅ PASS file-scanner.ts: normalizedInput !== resolvedInput check
B2 Path traversal protection on series sub-directories ✅ PASS seriesDir.startsWith(resolvedInput + path.sep)
B3 Image extension whitelist (png/jpg/jpeg) ✅ PASS SUPPORTED_IMAGE_EXTENSIONS set in domain/types.ts
B4 Image files resized to max 1024px before API submission ✅ PASS sharp() in gemini-client.ts prevents oversized payloads
B5 Prompt injection mitigation via XML tags ✅ PASS Context wrapped in <context>...</context> tags
B6 Context length truncation (max 2000 chars) ✅ PASS textContext.slice(0, MAX_CONTEXT_LENGTH)

Data Protection

# Control Status Notes
C1 No patient data stored server-side ✅ PASS Local processing only; no external database
C2 Output files written to user-specified local directory ✅ PASS outputDir path fully controlled by user
C3 Medical disclaimer included in all output files ✅ PASS DISCLAIMER constant in all ImageAnalysis, SeriesSummary, TemporalAnalysis
C4 No PII extracted or logged ✅ PASS Only image analysis content is processed

Dependency Security

# Control Status Notes
D1 npm audit returns 0 vulnerabilities ✅ PASS Verified 2026-02-26
D2 No direct dependency on unmaintained packages ✅ PASS All packages: @google/generative-ai, @langchain/langgraph, commander, sharp, p-limit, zod, dotenv
D3 LangGraph.js from official Langchain org ✅ PASS @langchain/langgraph v1.1.5

Error Handling

# Control Status Notes
E1 API errors caught and returned as status: "error" ✅ PASS Never throws; captured in ImageAnalysis.errorMessage
E2 File system errors wrapped in typed domain errors ✅ PASS FileScanError, ImageAnalysisError
E3 Stack traces not exposed to CLI users ✅ PASS Error messages only; process.exit with code

Medical Liability

# Control Status Notes
F1 AI medical disclaimer on all output ✅ PASS Required by DISCLAIMER constant in domain
F2 Not presented as diagnostic tool ✅ PASS Explicit "educational and informational purposes only"
F3 No treatment prescriptions ✅ PASS Recommendations framed as "consult healthcare professional"

Findings Summary

Total controls checked: 20 Passed: 20 / 20 Failed: 0 Critical findings: None

Risk Residuals

  1. Gemini API data retention: Images/prompts sent to Google Gemini API may be processed per Google's data retention policy. Users should review Google's terms for medical data before use. Mitigation: Document in README; user consent required.

  2. Local output files: Analysis JSON files contain medical findings and may contain sensitive information. Mitigation: Output directory permissions are the user's responsibility; document in README.


This checklist was generated as part of GABBE SDLC Gate S07. Human review of T1 and T2 risk residuals is recommended before clinical evaluation environments.