abinazebinoy commited on
Commit
7a6c1ee
·
1 Parent(s): d83f35d

fix(CodeQL#23): log exception type only in investigation.py -- full exception message may expose Neo4j URI

Browse files
Files changed (1) hide show
  1. api/routes/investigation.py +2 -1
api/routes/investigation.py CHANGED
@@ -35,7 +35,8 @@ def deep_investigate(entity_id: str, driver=Depends(get_db)):
35
  except HTTPException:
36
  raise
37
  except Exception as e:
38
- logger.error(f"[Investigation] Error for {entity_id}: {type(e).__name__}: {e}")
 
39
  return {
40
  "entity_id": entity_id,
41
  "entity_name": entity_id,
 
35
  except HTTPException:
36
  raise
37
  except Exception as e:
38
+ # CodeQL #23 FIX: log type only -- full exception may contain Neo4j URI/credentials
39
+ logger.error(f"[Investigation] Error for {entity_id[:8]}...: {type(e).__name__}")
40
  return {
41
  "entity_id": entity_id,
42
  "entity_name": entity_id,