-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
mediumCould be disruptive, but might not happenCould be disruptive, but might not happen
Description
Problem
The current implementation in tests/steps/process_steps.rs uses NamedTempFile::persist() which overwrites existing files without explicit control. This poses a potential safety risk and doesn't align with best practices for file handling.
Location
- File:
tests/steps/process_steps.rs - Lines: 73-74 (in the
run()function)
Suggested Solutions
-
Use
fs::writefor explicit file writing:drop(file); std::fs::write(&manifest_path, &manifest_content) .expect("Failed to write manifest file");
-
Use
persist_noclobberto avoid overwriting:file.persist_noclobber(&manifest_path) .expect("Failed to persist manifest file");
Context
This issue was identified during code review of PR #56, where the focus was on improving manifest path handling in process tests.
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
mediumCould be disruptive, but might not happenCould be disruptive, but might not happen