Skip to content

Commit bd0e832

Browse files
committed
fix: WalkDir depth limit and export-kg slug collision guard
1 parent b5c796b commit bd0e832

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • crates/terraphim_sessions/src/connector

crates/terraphim_sessions/src/connector/codex.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ impl SessionConnector for CodexConnector {
9292
if let Some(path) = self.default_path() {
9393
if path.exists() {
9494
let count = walkdir::WalkDir::new(&path)
95+
.max_depth(4)
96+
.follow_links(false)
9597
.into_iter()
9698
.filter_map(|e| e.ok())
9799
.filter(|e| e.path().extension().is_some_and(|ext| ext == "jsonl"))
@@ -123,6 +125,8 @@ impl SessionConnector for CodexConnector {
123125

124126
// Find all JSONL session files
125127
for entry in walkdir::WalkDir::new(&path)
128+
.max_depth(4)
129+
.follow_links(false)
126130
.into_iter()
127131
.filter_map(|e| e.ok())
128132
.filter(|e| e.path().extension().is_some_and(|ext| ext == "jsonl"))

0 commit comments

Comments
 (0)