any-sync-gui
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npm install is part of building the project from its own source code, which is fetched from the official GitHub repository; the packages are not undeclared external dependencies but required for building the frontend and Electron app, and the source is verifiable via git tag.
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-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 90%): The npm install is part of building the project from its own source code, which is fetched from the official GitHub repository; the packages are not undeclared external dependencies but required for building the frontend and Electron app, and the source is verifiable via git tag.
1 higher static finding 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:76
NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2
pkgname=any-sync-gui
3
_pkgname='Lan同步'
4
pkgver=1.6.0
5
_electronversion=25
6
_nodeversion=18
7
pkgrel=10
8
pkgdesc="Cross-platform local area network synchronization tool.(Use system-wide electron)一款支持在pc与pc或移动设备之间同步文本信息或文件的应用"
9
arch=('any')
10
url="https://github.com/easyhutu/any-sync-gui"
11
license=('ISC')
12
conflicts=("${pkgname}")
13
depends=(
14
"electron${_electronversion}"
15
)
16
makedepends=(
17
'npm'
18
'nvm'
19
'gendesk'
20
'curl'
21
'git'
22
)
23
source=(
24
"${pkgname}-${pkgver}::git+${url}#tag=v${pkgver}"
25
"${pkgname}.sh"
26
)
27
sha256sums=('e2a3d2cd7e299d90edcd2ea10b83aa86bbed89c39dad0a8491ca3cbe4953e18d'
28
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
29
_ensure_local_nvm() {
30
local NVM_DIR="${srcdir}/.nvm"
31
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
32
nvm install "${_nodeversion}"
33
nvm use "${_nodeversion}"
34
}
35
prepare() {
36
cd "${srcdir}/${pkgname}-${pkgver}"
37
sed -i -e "
38
s/@electronversion@/${_electronversion}/g
39
s/@appname@/${pkgname}/g
40
s/@runname@/app.asar/g
41
s/@cfgdirname@/${pkgname}/g
42
s/@options@//g
43
" "${srcdir}/${pkgname}.sh"
44
gendesk -f -n -q \
45
--pkgname="${pkgname}" \
46
--pkgdesc="${pkgdesc}" \
47
--categories="Utility" \
48
--name="${_pkgname}" \
49
--exec="${pkgname} %U"
50
_ensure_local_nvm
51
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
52
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
53
HOME="${srcdir}/.electron-gyp"
54
{
55
echo -e '\n'
56
#echo 'build_from_source=true'
57
echo "cache=${srcdir}/.npm_cache"
58
echo "maxsockets=10"
59
} >> .npmrc
60
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
61
{
62
echo 'registry=https://registry.npmmirror.com'
63
echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
64
echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
65
} >> .npmrc
66
echo fe electron_gui | xargs -n 1 cp .npmrc
67
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
68
fi
69
cd "${srcdir}/${pkgname}-${pkgver}/fe"
70
NODE_ENV=development npm install --legacy-peer-deps
71
NODE_ENV=production npm run build
72
cd "${srcdir}/${pkgname}-${pkgver}/electron_gui"
73
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g;s/${_pkgname}/${pkgname%-bin}/g" package.json
74
find ./ -type f -name "*.js" -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-git}\'/g" {} +
75
NODE_ENV=development npm install --legacy-peer-deps
76
NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
77
}
78
build() {
79
cd "${srcdir}/${pkgname}-${pkgver}/electron_gui"
80
local electronDist="/usr/lib/electron${_electronversion}"
81
sed -i -e "/^[[:space:]]*plugins:[[:space:]]*\[.*\$/a\\
82
{\\
83
name: \"@electron-forge/plugin-local-electron\",\\
84
config: {\\
85
electronPath: \"${electronDist}\"\\
86
}\\
87
}," forge.config.js
88
NODE_ENV=production npm run package
89
}
90
package() {
91
install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
92
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/electron_gui/out/${pkgname}-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname}"
93
cp -Pr --no-preserve=ownership "${srcdir}/${pkgname}-${pkgver}/electron_gui/out/${pkgname}-"*/resources/{dist,public} "${pkgdir}/usr/lib/${pkgname}"
94
#install -Dm755 -d "${pkgdir}/usr/lib/${pkgname}/resources"
95
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
96
_icon_sizes=(16x16 32x32 128x128 256x256 512x512)
97
for _icons in "${_icon_sizes[@]}";do
98
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/electron_gui/public/icons.iconset/icon_${_icons}.png" \
99
"${pkgdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname}.png"
100
done
101
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/package.json" -t "${pkgdir}/usr/share/licenses/${pkgname}"
102
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | LOW | 2 |
| 2026-08-02 00:16:08 | LOW | 2 |
| 2026-08-01 00:11:18 | LOW | 2 |
| 2026-07-31 00:14:10 | LOW | 2 |
| 2026-07-30 00:17:23 | LOW | 2 |
| 2026-07-29 00:25:53 | LOW | 2 |
| 2026-07-28 00:07:28 | LOW | 2 |
| 2026-07-27 00:24:32 | LOW | 2 |
| 2026-07-26 00:07:32 | LOW | 2 |
| 2026-07-25 00:13:44 | LOW | 2 |
| 2026-07-24 00:02:28 | LOW | 2 |
| 2026-07-23 00:14:47 | LOW | 2 |
| 2026-07-22 00:29:32 | LOW | 2 |
| 2026-07-21 00:24:15 | LOW | 2 |
| 2026-07-20 00:19:49 | LOW | 2 |
| 2026-07-19 00:17:08 | LOW | 2 |
| 2026-07-18 00:14:48 | LOW | 2 |
| 2026-07-17 00:06:16 | LOW | 2 |
| 2026-07-16 00:05:41 | LOW | 2 |
| 2026-07-15 00:09:25 | LOW | 2 |