dotnet-file-io
Pass
Audited by Gen Agent Trust Hub on Feb 24, 2026
Risk Level: SAFE
Full Analysis
- [SAFE]: The skill provides documentation and code snippets for .NET file I/O that align with official security best practices.
- [SAFE]: Explicitly warns against the use of
Path.Combinewith untrusted input due to potential path traversal vulnerabilities and provides a secure alternative (SafeResolvePath) usingPath.Joinand path validation. - [SAFE]: Recommends secure temporary file creation using
Path.GetRandomFileName()andFileMode.CreateNewto avoid predictable filename collisions and potential TOCTOU (Time-of-check to time-of-use) issues associated withPath.GetTempFileName(). - [SAFE]: Provides guidance on cross-platform file permissions using
UnixFileModeand explains the limitations of file locking on Unix-like systems.
Audit Metadata