oh-my-adhd 0.2.27 → 0.2.28
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.
- package/dist/mcp/lib/brain.js +6 -4
- package/package.json +1 -1
package/dist/mcp/lib/brain.js
CHANGED
|
@@ -16,8 +16,9 @@ export const SENSITIVE_DIRS = [".ssh", ".aws", ".gnupg", ".kube", ".docker",
|
|
|
16
16
|
path.join(".config", "git"), path.join(".config", "gh")];
|
|
17
17
|
// Absolute system paths that are sensitive regardless of home dir location
|
|
18
18
|
const SYSTEM_SENSITIVE_DIRS = [
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
"/root/.ssh", "/root/.aws", "/root/.gnupg", "/root/.kube", "/root/.docker",
|
|
20
|
+
"/etc/ssh", "/etc/ssl", "/etc/shadow", "/etc/sudoers",
|
|
21
|
+
"/private/etc/ssh", "/private/etc/ssl", // macOS canonical paths
|
|
21
22
|
];
|
|
22
23
|
export async function isSensitivePath(filePath) {
|
|
23
24
|
const homeDir = os.homedir();
|
|
@@ -31,8 +32,9 @@ export async function isSensitivePath(filePath) {
|
|
|
31
32
|
// Home-relative denylist
|
|
32
33
|
if (SENSITIVE_DIRS.some(d => rel === d.toLowerCase() || rel.startsWith(d.toLowerCase() + path.sep)))
|
|
33
34
|
return true;
|
|
34
|
-
// Absolute denylist for paths outside home
|
|
35
|
-
|
|
35
|
+
// Absolute denylist for paths outside home — case-folded for macOS APFS compatibility
|
|
36
|
+
const realDirLower = realDir.toLowerCase();
|
|
37
|
+
if (SYSTEM_SENSITIVE_DIRS.some(d => realDirLower === d || realDirLower.startsWith(d + "/")))
|
|
36
38
|
return true;
|
|
37
39
|
return false;
|
|
38
40
|
}
|
package/package.json
CHANGED