@chahuadev/junk-sweeper-app 1.0.0 β†’ 1.0.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.
Files changed (2) hide show
  1. package/README.md +62 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -41,7 +41,7 @@ junk-sweeper
41
41
 
42
42
  While standard linters look for syntax errors, **Chahuadev Junk Sweeper** uses deep AST analysis to understand the *context* and *architecture* of your entire project.
43
43
 
44
- ### πŸ› Silent Bug Catcher
44
+ ### πŸ› Silent Bug Catcher β€” 8 patterns
45
45
  Detects logical flaws that compile fine but silently break business logic:
46
46
 
47
47
  | Pattern | What It Catches |
@@ -50,11 +50,35 @@ Detects logical flaws that compile fine but silently break business logic:
50
50
  | **Zombie Event Listeners** | `.addEventListener()` without `.removeEventListener()` β€” memory leaks |
51
51
  | **Scope Shadowing** | Inner variable re-declaring an outer name β€” wrong value runs silently |
52
52
  | **Floating Promises** | `async` calls without `await` inside `try/catch` β€” rejections go unhandled |
53
+ | **Orphaned Timers** | `setTimeout`/`setInterval` without cleanup reference β€” phantom callbacks |
54
+ | **Uncaught Promise Chains** | `.then()` without `.catch()` β€” unhandled rejections |
55
+ | **Naked JSON.parse** | `JSON.parse()` outside `try/catch` β€” crashes on malformed input |
56
+ | **Await in Loop** | `await` inside `for`/`forEach` β€” accidental serial execution instead of parallel |
57
+
58
+ ### πŸ› οΈ Code Quality Auditor β€” 10 patterns
59
+ Catches patterns that compile and run today, but rot the codebase over time:
60
+
61
+ | Pattern | What It Catches |
62
+ |---|---|
63
+ | **debugger statement** | Debug pause left in production code |
64
+ | **eval() / new Function(string)** | Arbitrary code execution β€” security + performance risk |
65
+ | **NaN comparison** | `x === NaN` always evaluates to `false` β€” use `Number.isNaN()` |
66
+ | **Assignment in condition** | `if (x = foo())` β€” likely a typo of `===` |
67
+ | **parseInt without radix** | Octal parsing surprises in legacy engines |
68
+ | **var declaration** | Function-scoped hoisting footgun β€” use `const`/`let` |
69
+ | **console.\* debug logging** | Debug output left in production build |
70
+ | **Prototype mutation** | `__proto__` / built-in `.prototype` mutation β€” attack vector |
71
+ | **Overly long functions** | Functions >60 lines β€” complexity & maintainability risk |
72
+ | **TODO / FIXME / HACK markers** | Unresolved technical debt accumulating in comments |
73
+
74
+ ### ✨ Live AST Recommendations
75
+ Every finding includes a **live recommendation** generated from your actual code β€” real variable names, the exact problematic source line, and a concrete before/after fix example. No hardcoded template strings.
53
76
 
54
77
  ### πŸ—ΊοΈ Interactive Architecture Map (n8n-style)
55
78
  - **Left-to-Right auto-layout** β€” see cross-file dependency flow instantly
56
79
  - **Drag nodes freely** β€” organise your architecture your way
57
80
  - **Save / Load / Copy Layout** β€” positions persist across sessions
81
+ - **Collapsible Node Status legend** β€” click to collapse/expand; state remembered in localStorage
58
82
  - **Bidirectional issue ↔ map linking** β€” click an issue to fly to its node; click a node to filter issues
59
83
 
60
84
  ### ⚑ One-Click VS Code Integration
@@ -65,6 +89,43 @@ Worker Threads keep the UI responsive while scanning 1,000+ file projects.
65
89
 
66
90
  ---
67
91
 
92
+ ## πŸ”’ Security Guarantee
93
+
94
+ Junk Sweeper is **read-only by design** β€” verified at the code level, not just by policy.
95
+
96
+ | Guarantee | How It Works |
97
+ |---|---|
98
+ | **Never modifies user files** | All detectors use `fs.readFileSync()` only β€” no `writeFileSync()` anywhere near your code |
99
+ | **Never touches the OS** | No registry writes, no admin privilege requests, no system calls outside the app's own data folder |
100
+ | **Path Traversal Protection** | Every scan path is validated against `../` traversal, symlinks, and forbidden OS directories (`System32`, `/etc`, `/sys`, `/proc`) |
101
+ | **Executable Injection Prevention** | Strict file-type whitelist β€” `.exe`, `.dll`, `.bat`, `.sh` and all binary formats are blocked before analysis |
102
+ | **App Integrity on Every Launch** | SHA-256 checksums of `main.js`, `preload.js`, and all detectors are verified before the app starts β€” tampered builds are rejected |
103
+ | **Sandboxed Renderer** | Electron runs with `contextIsolation: true`, `sandbox: true`, `nodeIntegration: false` β€” the UI has zero direct Node.js access |
104
+ | **Audit Log** | Every file access and security event is logged to `~/.chahuadev/logs/` for full traceability |
105
+
106
+ The only files the app ever writes are its **own** layout cache (`%APPDATA%\Junk Sweeper\layouts\`) and its own security audit log β€” nothing inside your project.
107
+
108
+ ---
109
+
110
+ ## πŸ“ Changelog
111
+
112
+ ### v1.0.0 β€” Initial Release
113
+ - Read-only AST analysis β€” JSON/HTML/CSV export
114
+ - Interactive n8n-style Project Map with Layout Memory
115
+ - 5 AST detectors: Unused Variables, Unused Imports, Dead Code, Duplicate Functions, Silent Bugs
116
+ - 7-Layer Security Gateway + SHA-256 checksum integrity verification
117
+ - One-Click VS Code Go-to-Line integration
118
+ - Worker Thread architecture β€” UI stays responsive during large scans
119
+
120
+ ### v1.0.1 β€” AST Recommendations & Code Quality Auditor
121
+ - **6th detector:** `ast-code-quality-detector.js` β€” 10 production-safety patterns (debugger, eval, NaN comparison, assignment-in-condition, parseInt radix, var, console.\*, prototype mutation, long functions, TODO markers)
122
+ - **Silent Bugs expanded to 8 patterns:** Orphaned Timers, Uncaught Promise Chains, Naked `JSON.parse`, Await-in-Loop
123
+ - **Live AST-driven recommendations** across all 6 detectors β€” every finding shows the actual code line from your source, real variable/function names from the AST, and a concrete before/after fix example
124
+ - **Collapsible Node Status legend** in Project Map β€” collapse to save screen space; state persists in localStorage
125
+ - **Terminal boot sequence** shows all 7 security layers and all 6 active detectors on launch
126
+
127
+ ---
128
+
68
129
  ## πŸ“¦ Platform Support
69
130
 
70
131
  | Platform | Architecture | Status |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chahuadev/junk-sweeper-app",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Chahuadev Junk Sweeper β€” AST-based dead code & silent bug detector with interactive architecture map",
5
5
  "main": "index.js",
6
6
  "bin": {