@goodandready/dsh-approval-gate 0.1.3

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.
@@ -0,0 +1,94 @@
1
+ export const LOCALE_NS = "dsh-approval-gate";
2
+
3
+ export const MESSAGES = Object.freeze({
4
+ en: {
5
+ blockedPrefix: "Blocked by dsh-approval-gate rule",
6
+ detectedLabel: "Detected",
7
+ commandLabel: "Command",
8
+ parseReasonLabel: "Parse reason",
9
+ detailProcessSubstitution: "process substitution needs confirmation",
10
+ detailUnclosedProcessSubstitution: "unclosed process substitution",
11
+ detailUnclosedCommandSubstitution: "unclosed command substitution",
12
+ detailUnclosedBacktick: "unclosed backtick substitution",
13
+ detailUnclosedParameterExpansion: "unclosed parameter expansion",
14
+ detailUnclosedSingleQuote: "unclosed single quote",
15
+ detailUnclosedDoubleQuote: "unclosed double quote",
16
+ detailDanglingEscape: "unfinished escape",
17
+ detailInvalidHeredoc: "invalid here-document delimiter",
18
+ detailUnterminatedHeredoc: "here-document terminator was not found",
19
+ detailUnsupportedGrouping: "shell grouping syntax is not supported by the analyzer",
20
+ detailUnsupported: "unsupported shell syntax",
21
+ approvalRequired: "Approval required",
22
+ askUnknown: "The command could not be fully inspected; review it before allowing",
23
+ askUnparseable: "Shell syntax could not be fully inspected; review it before allowing",
24
+ askUnknownFormat: "The tool call format could not be inspected; review it before allowing",
25
+ askUnknownWriteTarget: "The file write target could not be identified; review it before allowing",
26
+ askDynamicCommand: "The expanded command name cannot be verified; review it before allowing",
27
+ askDynamicArguments: "Expanded arguments to a sensitive command cannot be verified; review it before allowing",
28
+ askDynamicRedirect: "The expanded redirect target cannot be verified; review it before allowing",
29
+ askScriptFile: "The script file contents are not available to the guard; review it before allowing",
30
+ askShellStdin: "Shell input is not fully available to the guard; review it before allowing",
31
+ askInterpreterPayload: "Interpreter side effects are not fully analyzed; review it before allowing",
32
+ askCredentialInArgv: "Expanded authorization values become process arguments; use a credential-safe API helper or review before allowing",
33
+ ruleUnknown: "A blocking safety rule matched",
34
+ ruleRecursiveRm: "Recursive file deletion",
35
+ ruleProcessSignal: "Process termination",
36
+ ruleServiceControl: "Service state change",
37
+ ruleGitClean: "Destructive git clean",
38
+ ruleGitResetHard: "Destructive git reset --hard",
39
+ ruleFindDelete: "find -delete",
40
+ ruleDestructiveSql: "Destructive SQL",
41
+ ruleSecretWrite: "Write to a protected secret file",
42
+ ruleDeviceWrite: "Write to a device or protected file",
43
+ ruleMkfsDevice: "Filesystem formatting",
44
+ ruleCurlPipe: "Downloaded content piped to a shell",
45
+ ruleEval: "Dynamic shell evaluation",
46
+ ruleNestedShell: "Nested shell depth limit",
47
+ ruleInterpreterPayload: "Unsafe interpreter payload",
48
+ },
49
+ zh: {
50
+ blockedPrefix: "dsh-approval-gate 规则已阻止",
51
+ detectedLabel: "检测到",
52
+ commandLabel: "命令",
53
+ parseReasonLabel: "解析原因",
54
+ detailProcessSubstitution: "进程替换需要确认",
55
+ detailUnclosedProcessSubstitution: "进程替换未闭合",
56
+ detailUnclosedCommandSubstitution: "命令替换未闭合",
57
+ detailUnclosedBacktick: "反引号命令替换未闭合",
58
+ detailUnclosedParameterExpansion: "参数展开未闭合",
59
+ detailUnclosedSingleQuote: "单引号未闭合",
60
+ detailUnclosedDoubleQuote: "双引号未闭合",
61
+ detailDanglingEscape: "转义符不完整",
62
+ detailInvalidHeredoc: "here-document 定界符无效",
63
+ detailUnterminatedHeredoc: "未找到 here-document 结束标记",
64
+ detailUnsupportedGrouping: "分析器不支持此 shell 分组语法",
65
+ detailUnsupported: "不支持的 shell 语法",
66
+ approvalRequired: "需要审批",
67
+ askUnknown: "无法完整检查此命令;允许前请先检查",
68
+ askUnparseable: "无法完整检查 shell 语法;允许前请先检查",
69
+ askUnknownFormat: "无法检查此工具调用格式;允许前请先检查",
70
+ askUnknownWriteTarget: "无法识别文件写入目标;允许前请先检查",
71
+ askDynamicCommand: "无法验证展开后的命令名称;允许前请先检查",
72
+ askDynamicArguments: "无法验证敏感命令展开后的参数;允许前请先检查",
73
+ askDynamicRedirect: "无法验证展开后的重定向目标;允许前请先检查",
74
+ askScriptFile: "守卫无法读取脚本内容;允许前请先检查",
75
+ askShellStdin: "守卫无法完整检查 shell 输入;允许前请先检查",
76
+ askInterpreterPayload: "未能完整分析解释器的副作用;允许前请先检查",
77
+ askCredentialInArgv: "展开后的授权凭据会成为进程参数;请使用安全的凭据 API 帮助程序或在允许前检查",
78
+ ruleUnknown: "命中安全阻止规则",
79
+ ruleRecursiveRm: "递归删除文件",
80
+ ruleProcessSignal: "终止进程",
81
+ ruleServiceControl: "更改服务状态",
82
+ ruleGitClean: "破坏性 git clean",
83
+ ruleGitResetHard: "破坏性 git reset --hard",
84
+ ruleFindDelete: "find -delete",
85
+ ruleDestructiveSql: "破坏性 SQL",
86
+ ruleSecretWrite: "写入受保护的敏感文件",
87
+ ruleDeviceWrite: "写入设备或受保护文件",
88
+ ruleMkfsDevice: "格式化文件系统",
89
+ ruleCurlPipe: "将下载内容传递给 shell",
90
+ ruleEval: "动态 shell 求值",
91
+ ruleNestedShell: "嵌套 shell 超出检查深度",
92
+ ruleInterpreterPayload: "不安全的解释器代码",
93
+ },
94
+ });
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@goodandready/dsh-approval-gate",
3
+ "version": "0.1.3",
4
+ "description": "Host-only command safety gate for DeepSeek Harness: blocks recognized dangerous operations and requests DSH approval when a command cannot be inspected.",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "exports": {
8
+ ".": "./lib/index.js",
9
+ "./package.json": "./package.json",
10
+ "./cordis.patch.yml": "./cordis.patch.yml"
11
+ },
12
+ "files": [
13
+ "lib",
14
+ "cordis.patch.yml",
15
+ "README.md",
16
+ "README.zh.md",
17
+ "README.ru.md",
18
+ "CHANGELOG.md",
19
+ "LICENSE"
20
+ ],
21
+ "dsh": {
22
+ "bundle": {
23
+ "patch": "./cordis.patch.yml"
24
+ }
25
+ },
26
+ "license": "MIT",
27
+ "peerDependencies": {
28
+ "@deepseek-ai/cordis": "^4.0.1",
29
+ "@deepseek-ai/schemastery": "^3.18.1"
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/GooDAnDReaDY/dsh-approval-gate.git"
34
+ },
35
+ "homepage": "https://github.com/GooDAnDReaDY/dsh-approval-gate#readme",
36
+ "bugs": {
37
+ "url": "https://github.com/GooDAnDReaDY/dsh-approval-gate/issues"
38
+ },
39
+ "scripts": {
40
+ "test": "node --test test/*.test.mjs"
41
+ },
42
+ "publishConfig": {
43
+ "registry": "https://registry.npmjs.org",
44
+ "access": "public"
45
+ }
46
+ }