Modernize C File Monitor Sensor to Rust
Enhancement proposal
Release notes
Modernize the C file monitor sensor to Rust for improved memory safety, security, and maintainability.
Problem to solve
The current C file monitor sensor contains intentional security vulnerabilities and lacks modern memory safety guarantees. Migrating to Rust will eliminate entire classes of vulnerabilities while maintaining performance.
Environment information
- OS (Linux/Unix, macOS, Windows) and version: Cross-platform
- Metrics type (Prometheus, file, Arduino, other hardware sensors): File system metrics
- Building from source: Compiler and version (
g++ --version,clang++ --version): Rust toolchain
Proposal
Rewrite the C file monitor sensor in Rust with the following tasks:
-
Set up Rust project structure -
Implement configuration loading -
Implement directory scanning -
Implement file metrics collection -
Implement JSON output -
Implement security event logging -
Add comprehensive error handling -
Create build and usage documentation -
Add unit tests -
Add integration tests -
Update CI/CD pipeline