Skip to content

Commit 4fc7e22

Browse files
nullvariantclaude
andauthored
security: remove unused lodash and minimist dependencies (#169)
- Remove lodash@4.17.21 from devDependencies (no import/require found) - Remove minimist@1.2.6 from devDependencies (no import/require found) - Bump git-id-switcher version to 0.13.0 - Update CHANGELOG with v0.13.0 security hardening release This reduces attack surface and supply chain risk by removing unused dependencies that could potentially introduce vulnerabilities. 🖥️ IDE: [Cursor](https://cursor.sh) 🔌 Extension: [Claude Code](https://claude.ai/download) Model-Raw: claude-opus-4-5-20251101 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent cf8f6fe commit 4fc7e22

4 files changed

Lines changed: 31 additions & 22 deletions

File tree

extensions/git-id-switcher/CHANGELOG.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.13.0] - 2026-01-17
11+
12+
### Security
13+
14+
- **Security Hardening**: Comprehensive security improvements
15+
- **Log Path Validation** (Breaking Change)
16+
- Added `isSecureLogPath()` function with symlink detection via `lstat`
17+
- Log files now restricted to `globalStorageUri` directory only
18+
- `filePath` workspace setting is now ignored for security
19+
- **Binary Path Resolution**
20+
- Added `binaryResolver.ts` for secure PATH resolution
21+
- Commands now execute using absolute paths instead of relying on PATH
22+
- Prevents PATH pollution attacks with fake git/ssh binaries
23+
- **Audit Logging**
24+
- Added `securityLogger.logCommandBlocked()` for allowlist violations
25+
- Improved error handling in `gitExec` (no longer silently fails)
26+
- **Dependency Cleanup**
27+
- Removed unused `lodash` and `minimist` from devDependencies
28+
- Reduces attack surface and supply chain risk
29+
30+
### Breaking Changes
31+
32+
- `gitIdSwitcher.logging.filePath` workspace setting is now ignored
33+
- Log files are always written to VS Code's `globalStorageUri` for security
34+
- This prevents malicious repositories from writing to arbitrary paths via `.vscode/settings.json`
35+
1036
## [0.12.3] - 2026-01-14
1137

1238
### Changed
@@ -1193,7 +1219,8 @@ This release includes comprehensive security hardening across multiple areas.
11931219
- `gitIdentitySwitcher.autoSwitchSshKey`: Auto SSH key switching
11941220
- `gitIdentitySwitcher.showNotifications`: Show switch notifications
11951221

1196-
[Unreleased]: https://github.com/nullvariant/nullvariant-vscode-extensions/compare/git-id-switcher-v0.12.3...HEAD
1222+
[Unreleased]: https://github.com/nullvariant/nullvariant-vscode-extensions/compare/git-id-switcher-v0.13.0...HEAD
1223+
[0.13.0]: https://github.com/nullvariant/nullvariant-vscode-extensions/compare/git-id-switcher-v0.12.3...git-id-switcher-v0.13.0
11971224
[0.12.3]: https://github.com/nullvariant/nullvariant-vscode-extensions/compare/git-id-switcher-v0.12.2...git-id-switcher-v0.12.3
11981225
[0.12.2]: https://github.com/nullvariant/nullvariant-vscode-extensions/compare/git-id-switcher-v0.12.1...git-id-switcher-v0.12.2
11991226
[0.12.1]: https://github.com/nullvariant/nullvariant-vscode-extensions/compare/git-id-switcher-v0.12.0...git-id-switcher-v0.12.1

extensions/git-id-switcher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "git-id-switcher",
33
"displayName": "%extension.displayName%",
44
"description": "%extension.description%",
5-
"version": "0.12.3",
5+
"version": "0.13.0",
66
"publisher": "nullvariant",
77
"icon": "images/icon.png",
88
"engines": {

package-lock.json

Lines changed: 1 addition & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"prepare": "husky"
1010
},
1111
"devDependencies": {
12-
"husky": "^9.1.7",
13-
"lodash": "4.17.21",
14-
"minimist": "1.2.6"
12+
"husky": "^9.1.7"
1513
}
1614
}

0 commit comments

Comments
 (0)