@fffangchenghao/dsh-web-search 0.13.9 → 0.13.10

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.10
4
+
5
+ ### Security
6
+ - The macOS system-proxy probe now spawns `/usr/sbin/scutil` by absolute path
7
+ instead of resolving `scutil` through `PATH`, so a hijacked `PATH` entry cannot
8
+ receive that spawn. This also makes the process list in `SECURITY.md` exact.
9
+
3
10
  ## 0.13.9
4
11
 
5
12
  ### Fixed
package/lib/proxy.js CHANGED
@@ -197,7 +197,9 @@ export async function proxyFromSystem() {
197
197
  clearTimeout(timer);
198
198
  resolve(value);
199
199
  };
200
- const child = spawn('scutil', ['--proxy'], { stdio: ['ignore', 'pipe', 'ignore'] });
200
+ // Absolute path: a hijacked PATH entry must not be able to receive this
201
+ // spawn. macOS ships scutil at /usr/sbin/scutil.
202
+ const child = spawn('/usr/sbin/scutil', ['--proxy'], { stdio: ['ignore', 'pipe', 'ignore'] });
201
203
  // `scutil` answers in milliseconds; a wedged system call must not hold a
202
204
  // search open, so the probe is capped and the child is killed on expiry.
203
205
  const timer = setTimeout(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fffangchenghao/dsh-web-search",
3
- "version": "0.13.9",
3
+ "version": "0.13.10",
4
4
  "description": "DSH bundle: a key-free web search provider. Leads with the anonymous AnySearch API and falls back to public result pages (DuckDuckGo, Bing, 360), merged by reciprocal-rank fusion with a bilingual region policy, an engine cooldown and a TTL cache.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",