Skip to content

Commit d6d9add

Browse files
committed
Update README and main.go to clarify spool archive path handling
1 parent 6c40456 commit d6d9add

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Santa Spool → Watcher → Decoder → Rules Engine → Signal Generator → Sh
5656
**Spool lifecycle:**
5757
- Spool files with no detections are deleted after processing to keep Santa's spool from filling
5858
- Files that produced detections are archived to `santa.archive_dir` (default: `/var/lib/santamon/spool_hits`)
59-
- Signals include the originating spool file name so you can retrieve the archived protobuf if needed
59+
- Signals include the archived spool path when available so you can retrieve the protobuf if needed
6060

6161
**Process Lineage:**
6262
- In-memory cache of recent process execution history

cmd/santamon/main.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -433,14 +433,11 @@ func runCommand() {
433433
log.Printf("Processing file: %s", filePath)
434434
}
435435

436-
spoolFileName := filepath.Base(filePath)
437436
spoolArchivePath := ""
438437
if cfg.Santa.ArchiveDir != "" {
439-
spoolArchivePath = filepath.Join(cfg.Santa.ArchiveDir, spoolFileName)
440-
}
441-
spoolContext := map[string]any{
442-
"spool_file": spoolFileName,
438+
spoolArchivePath = filepath.Join(cfg.Santa.ArchiveDir, filepath.Base(filePath))
443439
}
440+
spoolContext := map[string]any{}
444441
if spoolArchivePath != "" {
445442
spoolContext["spool_archive_path"] = spoolArchivePath
446443
}

0 commit comments

Comments
 (0)