delete-guard-agent 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
package/hooks/pretooluse.py
CHANGED
|
@@ -45,7 +45,7 @@ RELEVANT_TOOLS = {"Bash", "PowerShell"}
|
|
|
45
45
|
QUICK_PREDICATE_SRC = (
|
|
46
46
|
r"(?:\b(?:rm|rmdir|del|erase|rd|unlink|shred|trash|remove-item|ri|move-item|"
|
|
47
47
|
r"mv|move|sudo|doas|su)\b)"
|
|
48
|
-
r"|(?:\bgit\s+(?:clean|worktree|rm)\b)"
|
|
48
|
+
r"|(?:\bgit\s+(?:clean|worktree|rm|reset|restore|checkout|stash|gc|reflog)\b)"
|
|
49
49
|
r"|(?:\bfind\b[^|;]*?-delete\b)"
|
|
50
50
|
r"|(?:\b(?:docker|terraform|pulumi|kubectl|prisma|alembic|drizzle|railway|"
|
|
51
51
|
r"gcloud|supabase|neon|kiro|psql|mysql|mariadb|sqlite3|sqlcmd|aws)\b)"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "delete-guard-agent",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Blast-radius judge for destructive commands on Windows, Linux and macOS: blocks filesystem-root and volume-root deletes, quote-chain degradation, NTFS/APFS case collisions, junction and symlink traversal, sudo-escalated deletes, system-prefix wipes and mount-point deletions before the agent executes them.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "xinghe-labs",
|
package/src/extension.ts
CHANGED
|
@@ -31,7 +31,7 @@ const GUARD_TIMEOUT_MS = 5_000;
|
|
|
31
31
|
* 形同虚设,而它们恰好是唯一 block 级的云/数据层保护。
|
|
32
32
|
*/
|
|
33
33
|
const QUICK_PREDICATE =
|
|
34
|
-
/(?:\b(?:rm|rmdir|del|erase|rd|unlink|shred|trash|remove-item|ri|move-item|mv|move|sudo|doas|su)\b)|(?:\bgit\s+(?:clean|worktree|rm)\b)|(?:\bfind\b[^|;]*?-delete\b)|(?:\b(?:docker|terraform|pulumi|kubectl|prisma|alembic|drizzle|railway|gcloud|supabase|neon|kiro|psql|mysql|mariadb|sqlite3|sqlcmd|aws)\b)|>>?/i;
|
|
34
|
+
/(?:\b(?:rm|rmdir|del|erase|rd|unlink|shred|trash|remove-item|ri|move-item|mv|move|sudo|doas|su)\b)|(?:\bgit\s+(?:clean|worktree|rm|reset|restore|checkout|stash|gc|reflog)\b)|(?:\bfind\b[^|;]*?-delete\b)|(?:\b(?:docker|terraform|pulumi|kubectl|prisma|alembic|drizzle|railway|gcloud|supabase|neon|kiro|psql|mysql|mariadb|sqlite3|sqlcmd|aws)\b)|>>?/i;
|
|
35
35
|
|
|
36
36
|
function guardScript(): string | null {
|
|
37
37
|
const here = dirname(fileURLToPath(import.meta.url));
|