Fix export CSV for emails run program artifacts#7964
Fix export CSV for emails run program artifacts#7964markmckinnon wants to merge 6 commits intosleuthkit:developfrom
Conversation
fix export csv erroring out with cannot find has_attachments
Fix csv export erroring out where it could not find bytes_sent/Recvd
Fix error with surrogate pairs exception when exporting a CSV file.
…s-Run-program-artifacts
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCSV export now writes via an explicit UTF-8 OutputStreamWriter; recent activity ingest adds Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 PMD (7.23.0)RecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.java[ERROR] Cannot load ruleset rulesets/java/basic.xml/SimplifiedTernary: Cannot resolve rule/ruleset reference 'rulesets/java/basic.xml/SimplifiedTernary'. Make sure the resource is a valid file or URL and is on the CLASSPATH. Use --debug (or a fine log level) to see the current classpath. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Core/src/org/sleuthkit/autopsy/directorytree/ExportCSVAction.java`:
- Around line 325-326: The code currently uses new FileOutputStream(outputFile)
in the OutputStreamWriter/SequenceWriter block (see OutputStreamWriter and
SequenceWriter seqWriter usage in ExportCSVAction) which can accidentally
overwrite a file created after the earlier existence check; change the creation
to be atomic by opening the output with atomic create semantics (e.g., use
Files.newOutputStream(outputFile.toPath(), StandardOpenOption.CREATE_NEW,
StandardOpenOption.WRITE) or write to a temp file and then Files.move(tempPath,
outputFile.toPath(), StandardCopyOption.ATOMIC_MOVE) after successful write) so
the file is never silently overwritten.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: aa8a0a4a-be3e-44b4-9e77-1fce0766cb07
📒 Files selected for processing (3)
Core/src/org/sleuthkit/autopsy/directorytree/ExportCSVAction.javaRecentActivity/src/org/sleuthkit/autopsy/recentactivity/RAImageIngestModule.javathunderbirdparser/src/org/sleuthkit/autopsy/thunderbirdparser/ThunderbirdMboxFileIngestModule.java
Suggestion based on coderabbit
|
@markmckinnon Can you resolve the merge conflict? I think it came in from another PR from you I just merged? |
…s-Run-program-artifacts
Fix errors with exporting list as a csv for Email and run program artifacts
Summary by CodeRabbit
Bug Fixes
Chores