hexopress
maintainer zxp19821005
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The npm install runs within the build process on the project's own source from GitHub, using declared dependencies; the external package addition is part of the build workflow and not an undeclared remote execution.
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 95%): The npm install runs within the build process on the project's own source from GitHub, using declared dependencies; the external package addition is part of the build workflow and not an undeclared remote execution.
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:72
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=hexopress
3
_pkgname=HexoPress
4
pkgver=1.4.0
5
_electronversion=41
6
_nodeversion=24
7
pkgrel=1
8
pkgdesc="A client software designed specifically for editing blog articles and managing blog content that supports Hexo!(Use system-wide electron)"
9
arch=('any')
10
url="http://blog.charlestang.org/HexoPress/"
11
_ghurl="https://github.com/charlestang/HexoPress"
12
license=('MIT')
13
conflicts=("${pkgname}")
14
depends=(
15
"electron${_electronversion}"
16
)
17
makedepends=(
18
'gendesk'
19
'curl'
20
'npm'
21
'nvm'
22
'git'
23
'jq'
24
)
25
source=(
26
"${pkgname}-${pkgver}::git+${_ghurl}.git#tag=v${pkgver}"
27
"${pkgname}.sh"
28
)
29
sha256sums=('17912aa4275149b9b8fba1a04b9685345d5747f42c0e26cc344ab32ba8158a0a'
30
'31ad33b633744f5361abd964be306cea53ae1050e760c787115f7eca60045ae6')
31
_ensure_local_nvm() {
32
export NVM_DIR="${srcdir}/.nvm"
33
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
34
nvm install "${_nodeversion}"
35
nvm use "${_nodeversion}"
36
}
37
_get_electron_version() {
38
_elec_ver=$(jq -r '.devDependencies["electron"] // .dependencies["electron"]' "${srcdir}/${pkgname}-${pkgver}/package.json" | tr -d '^')
39
_main_ver=$(echo "${_elec_ver}" | cut -d. -f1)
40
echo -e "The electron version is: \033[1;31m${_main_ver}\033[0m"
41
}
42
prepare() {
43
cd "${srcdir}/${pkgname}-${pkgver}"
44
_get_electron_version
45
sed -i -e "
46
s/@electronversion@/${_electronversion}/g
47
s/@appname@/${pkgname}/g
48
s/@runname@/app.asar/g
49
s/@cfgdirname@/${_pkgname}/g
50
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
51
" "${srcdir}/${pkgname}.sh"
52
gendesk -q -f -n \
53
--pkgname="${pkgname}" \
54
--pkgdesc="${pkgdesc}" \
55
--categories="Utility" \
56
--name="${_pkgname}" \
57
--exec="${pkgname} %U"
58
export SYSTEM_ELECTRON_VERSION="$(electron${_electronversion} -v | sed 's/v//g')"
59
local HOME="${srcdir}/.electron-gyp"
60
export NPM_CONFIG_CACHE="${srcdir}/.npm_cache"
61
export NPM_CONFIG_MAXSOCKETS=32
62
if [[ "$(curl -s ipinfo.io/country)" == *"CN"* ]]; then
63
{
64
export NPM_CONFIG_REGISTRY="https://registry.npmmirror.com"
65
export NPM_CONFIG_ELECTRON_MIRROR="https://registry.npmmirror.com/-/binary/electron/"
66
export NPM_CONFIG_ELECTRON_BUILDER_BINARIES_MIRROR="https://registry.npmmirror.com/-/binary/electron-builder-binaries/"
67
}
68
find ./ -type f -name "package-lock.json" -exec sed -i "s/registry.npmjs.org/registry.npmmirror.com/g" {} +
69
fi
70
_ensure_local_nvm
71
NODE_ENV=development npm install
72
NODE_ENV=development npm add -D @electron-forge/plugin-local-electron
73
}
74
build() {
75
cd "${srcdir}/${pkgname}-${pkgver}"
76
_ensure_local_nvm
77
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
78
local electronDist="/usr/lib/electron${_electronversion}"
79
sed -i -e "/^[[:space:]]*plugins:[[:space:]]*\[.*\$/a\\
80
{\\
81
name: \"@electron-forge/plugin-local-electron\",\\
82
config: {\\
83
electronPath: \"${electronDist}\"\\
84
}\\
85
}," forge.config.*
86
NODE_ENV=production npm run package
87
}
88
package() {
89
install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
90
install -Dm755 -d "${pkgdir}/usr/lib/${pkgname}"
91
find "${srcdir}/${pkgname}-${pkgver}/out/${_pkgname}-linux-"*"/resources" -maxdepth 1 -type f -exec install -Dm644 -t "${pkgdir}/usr/lib/${pkgname}" {} +
92
if find "${srcdir}/${pkgname}-${pkgver}/out/${_pkgname}-linux-"*"/resources" -mindepth 1 -maxdepth 1 -type d | read; then
93
for _subdir in "${srcdir}/${pkgname}-${pkgver}/out/${_pkgname}-linux-"*"/resources/"*; do
94
if [ -d "${_subdir}" ]; then
95
cp -Pr --no-preserve=ownership "${_subdir}" "${pkgdir}/usr/lib/${pkgname}"
96
fi
97
done
98
fi
99
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/src/assets/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
100
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
101
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
102
}
103
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 |