feat: initial open marketplace with llm-security, config-audit, ultraplan-local
This commit is contained in:
commit
f93d6abdae
380 changed files with 65935 additions and 0 deletions
18
plugins/config-audit/hooks/scripts/backup-before-change.mjs
Normal file
18
plugins/config-audit/hooks/scripts/backup-before-change.mjs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env node
|
||||
// Backup script for config-audit plugin
|
||||
// Creates timestamped backups of config files before modification
|
||||
// Usage: node backup-before-change.mjs <file1> [file2] ...
|
||||
|
||||
import { createBackup } from '../../scanners/lib/backup.mjs';
|
||||
|
||||
const files = process.argv.slice(2);
|
||||
|
||||
if (files.length === 0) {
|
||||
process.stderr.write('Usage: node backup-before-change.mjs <file1> [file2] ...\n');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const { backupId, backupPath } = createBackup(files);
|
||||
|
||||
console.log(`Backup complete: ${backupPath}`);
|
||||
console.log(backupPath);
|
||||
Loading…
Add table
Add a link
Reference in a new issue