fusionkit-git

LOW
maintainer zxp19821005 0 votes scanned 2026-09-17 00:27:14.276658
View on AUR
Why flagged

The flagged npm/yarn/pnpm and npx usage are part of the project's legitimate build process, installing declared devDependencies and running build tools (tsc, vite, electron-builder) on the project's own source code, which is checked out from the official Git repository; no untrusted remote code execution or unauthorized package installation is occurring.

Triggered rules

Low AI review downgraded a static finding llm_review

The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-2507) reviewed the full PKGBUILD and judged it LOW (confidence 90%): The flagged npm/yarn/pnpm and npx usage are part of the project's legitimate build process, installing declared devDependencies and running build tools (tsc, vite, electron-builder) on the project's own source code, which is checked out from the official Git repository; no untrusted remote code execution or unauthorized package installation is occurring.

2 higher static findings superseded - not the current verdict (shown for transparency)
Medium npm/yarn/pnpm install of an undeclared external package npm_install_external

Runs `npm/yarn/pnpm install <package>` for a package not in source=(), pulling unpinned, unreviewed code at build time. Severity downgraded: the package declares/looks like a Node.js consumer, where build-time installs are expected.

  • PKGBUILD:112 NODE_ENV=development pnpm add -D node-gyp node-pty node-addon-api
  • PKGBUILD:114 NODE_ENV=development pnpm add -D typescript@latest
Medium npx/bunx/deno executes a remote package remote_code_tool

`npx`/`bunx`/`pnpm dlx`/`deno run <url>` downloads AND runs a remote package at build time — the moral equivalent of piping a download into a shell. Severity downgraded: Node.js consumer context.

  • PKGBUILD:126 NODE_ENV=production npx tsc
  • PKGBUILD:127 NODE_ENV=production npx vite build

PKGBUILD

4 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2pkgname=fusionkit-git
3_pkgname=FusionKit
4pkgver=0.3.0.r0.g6e73d37
5_electronversion=41
6_nodeversion=24
7pkgrel=1
8pkgdesc="Desktop toolbox,integrated with subtitle processing(AI translation,format conversion),batch renaming of files,paid music decryption(to FLAC/MP3) and other practical functions.(Use system-wide electron)"
9arch=('any')
10url="https://github.com/QiuYeDx/FusionKit"
11license=('MIT')
12provides=("${pkgname%-git}=${pkgver%.r*}")
13conflicts=("${pkgname%-git}")
14depends=(
15 "electron${_electronversion}"
16)
17makedepends=(
18 'npm'
19 'nvm'
20 'git'
21 'curl'
22 'gendesk'
23 'icoutils'
24 'jq'
25)
26source=(
27 "${pkgname//-/.}::git+${url}.git"
28 "${pkgname%-git}.sh"
29)
30sha256sums=('SKIP'
31 'a774c2f54fbbeeaac3cefc0f7250796d30c86d27f0fd40b7eaf9c0fdb021623d')
32pkgver() {
33 cd "${srcdir}/${pkgname//-/.}"
34 set -o pipefail
35 git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g;s/public.beta.//g' ||
36 printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
37}
38_ensure_local_nvm() {
39 local NVM_DIR="${srcdir}/.nvm"
40 source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
41 nvm install "${_nodeversion}"
42 nvm use "${_nodeversion}"
43}
44_set_build_env() {
45 export ELECTRON_DIST="/usr/lib/electron${_electronversion}"
46 export ELECTRON_SKIP_BINARY_DOWNLOAD=1
47 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
48 export HOME="${srcdir}/.electron-gyp"
49 {
50 export PNPM_LINK_WORKSPACE_PACKAGES=true
51 export PNPM_FETCH_RETRY_MAXTIMEOUT=10000
52 export PNPM_CACHE_DIR="${srcdir}/.pnpm_cache"
53 export PNPM_STORE_DIR="${srcdir}/.pnpm_store"
54 export PNPM_VIRTUAL_STORE_DIR="${srcdir}/.pnpm_store"
55 export PNPM_SHAMEFULLY_HOIST=true
56 export PNPM_VIRTUAL_STORE_DIR_MAX_LENGTH=80
57 export PNPM_NODE_LINKER=hoisted
58 export PNPM_NETWORK_CONCURRENCY=32
59 }
60 if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
61 {
62 export pnpm_config_registry="https://registry.npmmirror.com"
63 export npm_config_registry="https://registry.npmmirror.com"
64 export NPM_CONFIG_ELECTRON_MIRROR="https://registry.npmmirror.com/-/binary/electron/"
65 export NPM_CONFIG_ELECTRON_BUILDER_BINARIES_MIRROR="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"
66 export NODEJS_ORG_MIRROR="https://npmmirror.com/mirrors/node"
67 }
68 fi
69}
70_get_app_dir() {
71 find "${srcdir}" -type f -name "resources.pak" -exec dirname {} + | head -n 1
72}
73_get_electron_version() {
74 _elec_ver=$(find "${srcdir}" -maxdepth 5 -name "package.json" ! -path "*/node_modules/*" \
75 -exec grep -l '"electron"' {} + | xargs -I{} jq -r '(.devDependencies.electron // .dependencies.electron) // empty' {} 2>/dev/null | head -1)
76 [[ -z "${_elec_ver}" ]] && return 1
77 echo -e "The electron version is: \033[1;31m${_elec_ver%%.*}\033[0m"
78}
79prepare() {
80 cd "${srcdir}/${pkgname//-/.}"
81 _get_electron_version
82 sed -i -e "
83 s/@electronversion@/${_electronversion}/g
84 s/@appname@/${pkgname%-git}/g
85 s/@runname@/app.asar/g
86 s/@cfgdirname@/${pkgname%-git}/g
87 " "${srcdir}/${pkgname%-git}.sh"
88 gendesk -q -f -n \
89 --pkgname="${pkgname%-git}" \
90 --pkgdesc="${pkgdesc}" \
91 --categories="Utility" \
92 --name="${_pkgname}" \
93 --exec="${pkgname%-git} %U"
94 _set_build_env
95 _ensure_local_nvm
96 find src -type f -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-git}\'/g" {} +
97 sed -i "s/\/\${version}//g" electron-builder.json
98 icotool -x "public/${_pkgname}.ico" -o "public/${pkgname%-git}.png"
99 cp "public/${_pkgname}.ico" "public/favicon.ico"
100 sed -i "s/${_pkgname}.ico/${pkgname%-git}.png/g" electron/main/index.ts
101 sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
102 # 移除 Linux 构建不需要的 beforePack 钩子和 extraResources(仅 macOS/Windows 需要)
103 python3 -c "
104import json
105with open('electron-builder.json', 'r') as f:
106 config = json.load(f)
107config.pop('beforePack', None)
108config.pop('extraResources', None)
109with open('electron-builder.json', 'w') as f:
110 json.dump(config, f, indent=2)
111"
112 NODE_ENV=development pnpm add -D node-gyp node-pty node-addon-api
113 # 升级 TypeScript 以支持 gpt-tokenizer 的新语法
114 NODE_ENV=development pnpm add -D typescript@latest
115 # 修复 tsconfig.json 以兼容 TypeScript 7.x
116 sed -i '/"esModuleInterop"/d' tsconfig.json
117 sed -i 's/"moduleResolution": "Node"/"moduleResolution": "bundler"/' tsconfig.json
118 sed -i '/"baseUrl"/d' tsconfig.json
119 sed -i 's|"src/\*"|"./src/*"|' tsconfig.json
120 NODE_ENV=development pnpm install
121}
122build() {
123 cd "${srcdir}/${pkgname//-/.}"
124 _set_build_env
125 _ensure_local_nvm
126 NODE_ENV=production npx tsc
127 NODE_ENV=production npx vite build
128 NODE_ENV=production node scripts/check-preload-bundle.mjs
129 NODE_ENV=production pnpm -c exec "electron-builder --linux dir -c.electronDist=${ELECTRON_DIST} --config electron-builder.json"
130}
131package() {
132 install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/usr/bin/${pkgname%-git}"
133 install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-git}"
134 local _app_dir=$(_get_app_dir)
135 cp -a "${_app_dir}/resources/"* "${pkgdir}/usr/lib/${pkgname%-git}/"
136 install -Dm644 "${srcdir}/${pkgname//-/.}/public/${pkgname%-git}.png" -t "${pkgdir}/usr/share/pixmaps"
137 install -Dm644 "${srcdir}/${pkgname//-/.}/${pkgname%-git}.desktop" -t "${pkgdir}/usr/share/applications"
138 install -Dm644 "${srcdir}/${pkgname//-/.}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
139}

Scan history

Scanned at (UTC)SeverityRules
2026-09-17 00:27:14 Low 3
2026-09-16 00:03:17 Low 3
2026-09-15 00:25:31 Low 3
2026-09-14 00:27:57 Low 3
2026-09-13 00:19:54 Low 3
2026-09-12 00:25:17 Low 3
2026-09-11 00:19:22 Low 3
2026-09-10 00:22:44 Low 3
2026-09-09 00:04:09 Low 3
2026-09-08 00:18:08 Low 3
2026-09-07 00:30:15 Low 3
2026-09-06 00:17:06 Low 3
2026-09-05 00:16:27 Low 3
2026-09-04 00:03:13 Low 3
2026-09-03 00:15:47 Low 3
2026-09-02 00:02:31 Low 3
2026-09-01 00:11:19 Low 3
2026-08-31 00:19:57 Low 3
2026-08-30 00:04:14 Low 3
2026-08-29 00:29:17 Low 3

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion