houdunren-camera

maintainer zxp19821005 · 0 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The flagged pattern is `npm add -D vue-tsc@latest typescript@latest` which installs undeclared external packages from npm during prepare(). This is a common pattern in AUR Electron app PKGBUILDs to fix build compatibility issues with the system electron version. The packages (vue-tsc and typescript) are standard, well-known development tools from the npm registry. The PKGBUILD sources from the official GitHub repo with a pinned tag and checksum. The CN mirror detection uses ipinfo.io to switch to npmmirror.com (a legitimate Chinese npm mirror), which is a known pattern in AUR packages targeting Chinese users. No obfuscation, no exfiltration, no payload execution, no unofficial binary downloads. The use of `npm add` for undeclared packages is sloppy packaging practice but not a security risk.

Triggered rules

LOW AI review downgraded a static finding llm_review

The static rules flagged this HIGH, but an AI model (anthropic/claude-4.6-sonnet-20260217) reviewed the full PKGBUILD and judged it LOW (confidence 85%): The flagged pattern is `npm add -D vue-tsc@latest typescript@latest` which installs undeclared external packages from npm during prepare(). This is a common pattern in AUR Electron app PKGBUILDs to fix build compatibility issues with the system electron version. The packages (vue-tsc and typescript) are standard, well-known development tools from the npm registry. The PKGBUILD sources from the official GitHub repo with a pinned tag and checksum. The CN mirror detection uses ipinfo.io to switch to npmmirror.com (a legitimate Chinese npm mirror), which is a known pattern in AUR packages targeting Chinese users. No obfuscation, no exfiltration, no payload execution, no unofficial binary downloads. The use of `npm add` for undeclared packages is sloppy packaging practice but not a security risk.

1 higher static finding superseded - not the current verdict (shown for transparency)
HIGH 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.

  • PKGBUILD:67 NODE_ENV=development npm add -D vue-tsc@latest typescript@latest

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
2_pkgname=camera
3pkgname="houdunren-${_pkgname}"
4pkgver=1.0.83
5_electronversion=25
6_nodeversion=18
7pkgrel=7
8pkgdesc="Desktop camera software that can be used for online live streaming, distance learning, and video conferencing.(Use system-wide electron)桌面摄像头软件,可用于在线直播、远程教学、视频会议"
9arch=('any')
10url="https://www.houdunren.com/"
11_ghurl="https://github.com/houdunwang/camera"
12license=('MIT')
13conflicts=("${pkgname}")
14depends=(
15 "electron${_electronversion}"
16)
17mkdenpends=(
18 'nvm'
19 'gendesk'
20 'npm'
21 'git'
22 'curl'
23)
24source=(
25 "${pkgname}-${pkgver}::git+${_ghurl}#tag=v${pkgver}"
26 "${pkgname}.sh"
27)
28sha256sums=('129e314ffebc8c5efbd57b93cf2c4c6c8e9d2027b0df93475de1da78897f0cbe'
29 '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
30_ensure_local_nvm() {
31 local NVM_DIR="${srcdir}/.nvm"
32 source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
33 nvm install "${_nodeversion}"
34 nvm use "${_nodeversion}"
35}
36prepare() {
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 _ensure_local_nvm
45 gendesk -f -n -q --pkgname="${pkgname}" --pkgdesc="${pkgdesc}" --categories="Utility" --name="${pkgname}" --exec="${pkgname} %U"
46 cd "${srcdir}/${pkgname}-${pkgver}"
47 export ELECTRON_SKIP_BINARY_DOWNLOAD=1
48 export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
49 HOME="${srcdir}/.electron-gyp"
50 {
51 echo -e '\n'
52 #echo 'build_from_source=true'
53 echo "cache=${srcdir}/.npm_cache"
54 echo "maxsockets=10"
55 } >> .npmrc
56 if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
57 {
58 echo 'registry=https://registry.npmmirror.com'
59 echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
60 echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
61 } >> .npmrc
62 find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
63 fi
64 sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
65 sed -i "/center: false/d" src/renderer/src/axios.ts
66 NODE_ENV=development npm install --legacy-peer-deps
67 NODE_ENV=development npm add -D vue-tsc@latest typescript@latest
68}
69build() {
70 cd "${srcdir}/${pkgname}-${pkgver}"
71 local electronDist="/usr/lib/electron${_electronversion}"
72 NODE_ENV=production npm run build
73 NODE_ENV=production npm exec -c "electron-builder --linux dir -c.electronDist=${electronDist} --config electron-builder.yml"
74}
75package() {
76 install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
77 install -Dm644 "${srcdir}/${pkgname}-${pkgver}/dist/linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname}"
78 install -Dm644 "${srcdir}/${pkgname}-${pkgver}/dist/linux-"*/resources/app.asar.unpacked/resources/* \
79 -t "${pkgdir}/usr/lib/${pkgname}/app.asar.unpacked/resources"
80 install -Dm644 "${srcdir}/${pkgname}-${pkgver}/icons.iconset/icon_512x512.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
81 install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
82 install -Dm644 "${srcdir}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
83}

Scan history

Scanned at (UTC)SeverityRules
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

Report a package

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

0 / 4000
Your suggestion