mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 14:22:02 +00:00
- Introduced a restricted file system wrapper to ensure all file operations are confined to the script's directory, enhancing security. - Updated various modules to utilize the new secure file system methods, replacing direct fs calls with validated operations. - Enhanced path validation in the server routes and context loaders to prevent unauthorized access to the file system. - Adjusted environment variable handling to use centralized methods for reading and writing API keys, ensuring consistent security practices. This change improves the overall security posture of the application by enforcing strict file access controls and validating paths before any operations are performed.
40 lines
674 B
TypeScript
40 lines
674 B
TypeScript
/**
|
|
* Re-export secure file system utilities from @automaker/platform
|
|
* This file exists for backward compatibility with existing imports
|
|
*/
|
|
|
|
import { secureFs } from '@automaker/platform';
|
|
|
|
export const {
|
|
// Async methods
|
|
access,
|
|
readFile,
|
|
writeFile,
|
|
mkdir,
|
|
readdir,
|
|
stat,
|
|
rm,
|
|
unlink,
|
|
copyFile,
|
|
appendFile,
|
|
rename,
|
|
lstat,
|
|
joinPath,
|
|
resolvePath,
|
|
// Sync methods
|
|
existsSync,
|
|
readFileSync,
|
|
writeFileSync,
|
|
mkdirSync,
|
|
readdirSync,
|
|
statSync,
|
|
accessSync,
|
|
unlinkSync,
|
|
rmSync,
|
|
// Throttling configuration and monitoring
|
|
configureThrottling,
|
|
getThrottlingConfig,
|
|
getPendingOperations,
|
|
getActiveOperations,
|
|
} = secureFs;
|