memorylink 2.1.0 → 2.2.0

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.
Files changed (68) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/README.md +66 -52
  3. package/dist/cli/commands/delete.d.ts +7 -0
  4. package/dist/cli/commands/delete.d.ts.map +1 -0
  5. package/dist/cli/commands/delete.js +106 -0
  6. package/dist/cli/commands/delete.js.map +1 -0
  7. package/dist/cli/commands/gate.d.ts +1 -1
  8. package/dist/cli/commands/gate.d.ts.map +1 -1
  9. package/dist/cli/commands/gate.js +14 -0
  10. package/dist/cli/commands/gate.js.map +1 -1
  11. package/dist/cli/commands/init.d.ts.map +1 -1
  12. package/dist/cli/commands/init.js +17 -75
  13. package/dist/cli/commands/init.js.map +1 -1
  14. package/dist/cli/commands/list.d.ts +7 -0
  15. package/dist/cli/commands/list.d.ts.map +1 -0
  16. package/dist/cli/commands/list.js +129 -0
  17. package/dist/cli/commands/list.js.map +1 -0
  18. package/dist/cli/commands/remember.d.ts +3 -0
  19. package/dist/cli/commands/remember.d.ts.map +1 -0
  20. package/dist/cli/commands/remember.js +61 -0
  21. package/dist/cli/commands/remember.js.map +1 -0
  22. package/dist/cli/commands/retrieve.d.ts +3 -0
  23. package/dist/cli/commands/retrieve.d.ts.map +1 -0
  24. package/dist/cli/commands/retrieve.js +32 -0
  25. package/dist/cli/commands/retrieve.js.map +1 -0
  26. package/dist/cli/commands/scaffold.d.ts +6 -0
  27. package/dist/cli/commands/scaffold.d.ts.map +1 -0
  28. package/dist/cli/commands/scaffold.js +132 -0
  29. package/dist/cli/commands/scaffold.js.map +1 -0
  30. package/dist/cli/index.js +10 -0
  31. package/dist/cli/index.js.map +1 -1
  32. package/dist/core/memory/gates.d.ts +17 -0
  33. package/dist/core/memory/gates.d.ts.map +1 -0
  34. package/dist/core/memory/gates.js +75 -0
  35. package/dist/core/memory/gates.js.map +1 -0
  36. package/dist/core/memory/git.d.ts +9 -0
  37. package/dist/core/memory/git.d.ts.map +1 -0
  38. package/dist/core/memory/git.js +57 -0
  39. package/dist/core/memory/git.js.map +1 -0
  40. package/dist/core/memory/storage.d.ts +11 -0
  41. package/dist/core/memory/storage.d.ts.map +1 -0
  42. package/dist/core/memory/storage.js +63 -0
  43. package/dist/core/memory/storage.js.map +1 -0
  44. package/dist/core/memory/structure.d.ts +10 -0
  45. package/dist/core/memory/structure.d.ts.map +1 -0
  46. package/dist/core/memory/structure.js +51 -0
  47. package/dist/core/memory/structure.js.map +1 -0
  48. package/dist/core/types.d.ts +13 -1
  49. package/dist/core/types.d.ts.map +1 -1
  50. package/dist/gate/rules/valid-syntax.d.ts +16 -0
  51. package/dist/gate/rules/valid-syntax.d.ts.map +1 -0
  52. package/dist/gate/rules/valid-syntax.js +76 -0
  53. package/dist/gate/rules/valid-syntax.js.map +1 -0
  54. package/dist/quarantine/patterns.js +2 -2
  55. package/dist/quarantine/patterns.js.map +1 -1
  56. package/dist/tools/pointer-generator.d.ts.map +1 -1
  57. package/dist/tools/pointer-generator.js +2 -2
  58. package/dist/tools/pointer-generator.js.map +1 -1
  59. package/docs/USER_GUIDE.md +181 -0
  60. package/package.json +3 -3
  61. package/docs/COMPARISONS.md +0 -229
  62. package/docs/FAQ.md +0 -230
  63. package/docs/GETTING_STARTED.md +0 -185
  64. package/docs/PATTERNS.md +0 -206
  65. package/docs/QUICK_REFERENCE.md +0 -209
  66. package/docs/REMEDIATION.md +0 -332
  67. package/docs/THREAT_MODEL.md +0 -279
  68. package/docs/TROUBLESHOOTING.md +0 -280
@@ -1,280 +0,0 @@
1
- # Troubleshooting Guide
2
-
3
- Common issues and solutions for MemoryLink.
4
-
5
- ---
6
-
7
- ## 🔴 "ml: command not found"
8
-
9
- **Cause:** npm global bin directory is not in your PATH.
10
-
11
- **Solutions:**
12
-
13
- ### Option 1: Add npm global bin to PATH
14
- ```bash
15
- # Find npm global bin
16
- npm bin -g
17
-
18
- # Add to PATH (add to ~/.bashrc or ~/.zshrc)
19
- export PATH="$(npm bin -g):$PATH"
20
-
21
- # Reload shell
22
- source ~/.bashrc # or ~/.zshrc
23
- ```
24
-
25
- ### Option 2: Use npx
26
- ```bash
27
- npx memorylink init
28
- npx memorylink scan
29
- ```
30
-
31
- ### Option 3: Reinstall globally
32
- ```bash
33
- npm uninstall -g memorylink
34
- npm install -g memorylink
35
- ```
36
-
37
- ---
38
-
39
- ## 🔴 "Git hooks not running"
40
-
41
- **Cause:** Hooks not installed or Git configured differently.
42
-
43
- **Solutions:**
44
-
45
- ### Check hooks exist
46
- ```bash
47
- ls -la .git/hooks/pre-commit
48
- ls -la .git/hooks/pre-push
49
- ```
50
-
51
- ### Reinstall hooks
52
- ```bash
53
- ml hooks install
54
- ```
55
-
56
- ### Check Git hooks path
57
- ```bash
58
- git config core.hooksPath
59
- # If set to something other than .git/hooks, run:
60
- git config --unset core.hooksPath
61
- ml hooks install
62
- ```
63
-
64
- ### Verify hook permissions
65
- ```bash
66
- chmod +x .git/hooks/pre-commit
67
- chmod +x .git/hooks/pre-push
68
- ```
69
-
70
- ---
71
-
72
- ## 🔴 "Database locked" or file access errors
73
-
74
- **Cause:** Concurrent operations or crashed process left lock file.
75
-
76
- **Solutions:**
77
-
78
- ### Remove stale lock files
79
- ```bash
80
- rm -f .memorylink/*.lock
81
- rm -f ~/.memorylink/*.lock
82
- ```
83
-
84
- ### Retry the command
85
- ```bash
86
- ml scan
87
- ```
88
-
89
- ---
90
-
91
- ## 🔴 False positives
92
-
93
- **Cause:** Pattern matches non-secret content.
94
-
95
- **Solutions:**
96
-
97
- ### Option 1: Inline ignore (single line)
98
- ```javascript
99
- const testKey = "AKIAIOSFODNN7EXAMPLE"; // ml:ignore - test data
100
- ```
101
-
102
- ### Option 2: Ignore specific file
103
- ```bash
104
- ml ignore add --file path/to/file.js
105
- ```
106
-
107
- ### Option 3: Ignore specific pattern
108
- ```bash
109
- ml ignore add --pattern "api-key-2"
110
- ```
111
-
112
- ### Option 4: Interactive ignore
113
- ```bash
114
- ml ignore --interactive
115
- ```
116
-
117
- ---
118
-
119
- ## 🔴 Slow scans (large repositories)
120
-
121
- **Cause:** Scanning too many files.
122
-
123
- **Solutions:**
124
-
125
- ### Check what's being scanned
126
- ```bash
127
- ml scan --verbose
128
- ```
129
-
130
- ### Add excludes to config
131
- ```json
132
- // .memorylink/config.json
133
- {
134
- "scan": {
135
- "exclude": [
136
- "vendor/**",
137
- "*.min.js",
138
- "dist/**"
139
- ]
140
- }
141
- }
142
- ```
143
-
144
- ### Use diff mode for commits
145
- ```bash
146
- ml gate --diff # Only scan changed files
147
- ```
148
-
149
- ---
150
-
151
- ## 🔴 Windows-specific issues
152
-
153
- ### Path issues
154
- ```powershell
155
- # Use forward slashes
156
- ml scan src/config.js
157
-
158
- # Or escape backslashes
159
- ml scan "src\\config.js"
160
- ```
161
-
162
- ### Line ending issues
163
- ```bash
164
- # Configure Git for Windows
165
- git config --global core.autocrlf true
166
- ```
167
-
168
- ### Permission issues
169
- ```powershell
170
- # Run as Administrator if needed
171
- # Or use Git Bash instead of CMD/PowerShell
172
- ```
173
-
174
- ---
175
-
176
- ## 🔴 Encryption/decryption errors
177
-
178
- **Cause:** Key file missing or corrupted.
179
-
180
- **Solutions:**
181
-
182
- ### Check key exists
183
- ```bash
184
- ls -la ~/.memorylink/keys/
185
- ```
186
-
187
- ### Regenerate key (WARNING: loses access to old quarantine)
188
- ```bash
189
- rm ~/.memorylink/keys/*.key
190
- ml init
191
- ```
192
-
193
- ### Check key permissions
194
- ```bash
195
- chmod 600 ~/.memorylink/keys/*.key
196
- ```
197
-
198
- ---
199
-
200
- ## 🔴 CI/CD not blocking secrets
201
-
202
- **Cause:** Mode set to inactive or ml gate not running.
203
-
204
- **Solutions:**
205
-
206
- ### Verify CI detection
207
- ```bash
208
- CI=true ml mode
209
- # Should show: Source: ci
210
- ```
211
-
212
- ### Ensure ml gate is called in CI
213
- ```yaml
214
- # GitHub Actions example
215
- - name: Security Scan
216
- run: ml gate --enforce
217
- ```
218
-
219
- ### Check mode in CI
220
- ```bash
221
- CI=true ml gate --verbose
222
- ```
223
-
224
- ---
225
-
226
- ## 🔴 "No patterns matched" but secrets exist
227
-
228
- **Cause:** File type not scanned or pattern not matching.
229
-
230
- **Solutions:**
231
-
232
- ### Check file is scanned
233
- ```bash
234
- ml scan path/to/file.js --verbose
235
- ```
236
-
237
- ### Test specific pattern
238
- ```bash
239
- echo "AKIAIOSFODNN7EXAMPLE" | ml scan --stdin
240
- ```
241
-
242
- ### Check for binary detection
243
- ```bash
244
- # SVG and .min.js ARE scanned (they're text)
245
- # PNG, PDF, etc. are skipped (binary)
246
- ```
247
-
248
- ---
249
-
250
- ## 🔴 Need more help?
251
-
252
- ### Debug mode
253
- ```bash
254
- DEBUG=memorylink ml scan
255
- ```
256
-
257
- ### Self-check
258
- ```bash
259
- ml self-check
260
- ```
261
-
262
- ### Report an issue
263
- 1. Run `ml self-check`
264
- 2. Include output in your issue
265
- 3. Open issue at: [GitHub Issues](https://github.com/memorylink/memorylink/issues)
266
-
267
- ---
268
-
269
- ## Quick Reference
270
-
271
- | Problem | Quick Fix |
272
- |---------|-----------|
273
- | Command not found | `npx memorylink` or fix PATH |
274
- | Hooks not running | `ml hooks install` |
275
- | Database locked | `rm .memorylink/*.lock` |
276
- | False positive | Add `// ml:ignore` comment |
277
- | Slow scans | Add excludes to config |
278
- | Windows paths | Use forward slashes |
279
- | CI not blocking | Add `--enforce` flag |
280
-