dialogcraft
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npm install runs in a controlled build environment using the project's own source code and dependencies; the external package installation is part of normal build process, not malicious activity.
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 runs in a controlled build environment using the project's own source code and dependencies; the external package installation is part of normal build process, not malicious activity.
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:69
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=dialogcraft
3
_pkgname=DialogCraft
4
pkgver=1.0.8
5
_electronversion=25
6
_nodeversion=20
7
pkgrel=9
8
pkgdesc="Desktop client for OpenAI GPT API.(Use system-wide electron)"
9
arch=('any')
10
url="https://github.com/Hayden2018/dialogcraft"
11
license=('MIT')
12
conflicts=("${pkgname}")
13
depends=(
14
"electron${_electronversion}"
15
)
16
makedepends=(
17
'gendesk'
18
'npm'
19
'nvm'
20
'curl'
21
'git'
22
)
23
source=(
24
"${pkgname}-${pkgver}::git+${url}#tag=v${pkgver}"
25
"${pkgname}.sh"
26
)
27
sha256sums=('185c56456a60f2687d11bdcb28633de1b595ef3697313b67fab4eb2e29a9a01d'
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
" -i "${srcdir}/${pkgname}.sh"
44
_ensure_local_nvm
45
gendesk -q -f -n \
46
--pkgname="${pkgname}" \
47
--pkgdesc="${pkgdesc}" \
48
--categories="Utility" \
49
--name="${_pkgname}" \
50
--exec="${pkgname} %U"
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
} >> .npmrc
59
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
60
{
61
echo 'registry=https://registry.npmmirror.com'
62
echo 'electron_mirror=https://registry.npmmirror.com/-/binary/electron/'
63
echo 'electron_builder_binaries_mirror=https://registry.npmmirror.com/-/binary/electron-builder-binaries/'
64
} >> .npmrc
65
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
66
fi
67
sed -i "s/\"electron\": \"[^\"]*\"/\"electron\": \"${SYSTEM_ELECTRON_VERSION}\"/g" package.json
68
NODE_ENV=development npm install
69
NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
70
}
71
build() {
72
cd "${srcdir}/${pkgname}-${pkgver}"
73
local electronDist="/usr/lib/electron${_electronversion}"
74
sed -i -e "/^[[:space:]]*plugins:[[:space:]]*\[.*\$/a\\
75
{\\
76
name: \"@electron-forge/plugin-local-electron\",\\
77
config: {\\
78
electronPath: \"${electronDist}\"\\
79
}\\
80
}," forge.config.*
81
NODE_ENV=production npm run build
82
NODE_ENV=production npm run package
83
}
84
package() {
85
install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
86
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/out/${_pkgname}-linux-"*/resources/app.asar -t "${pkgdir}/usr/lib/${pkgname}"
87
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/public/logo.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg"
88
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
89
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
90
}
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 |