kdwrite
maintainer xiadoudou
· 0 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The package downloads a prebuilt Windows executable from the project's own domain and a Microsoft official link for WebView2; both are verifiable and expected for a Wine-based wrapper, with no obfuscated or untrusted remote code 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 package downloads a prebuilt Windows executable from the project's own domain and a Microsoft official link for WebView2; both are verifiable and expected for a Wine-based wrapper, with no obfuscated or untrusted remote code execution.
1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM
source=() URL on a non-standard host
source_untrusted_domain
One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).
-
PKGBUILD:11
source=("${pkgname}-${pkgver}.exe::https://oss.kdwrite.cn/0_app/kdwrite_v1.2.4.exe" -
PKGBUILD:13
"MicrosoftEdgeWebView2RuntimeInstallerX64.exe::https://go.microsoft.com/fwlink/p/?LinkId=2124703"
PKGBUILD
2 offending line(s) highlighted
1
# Maintainer: 你的AUR用户名 <你的邮箱>
2
pkgname=kdwrite # 包名,小写、无空格,建议唯一
3
pkgver=1.2.4 # 口袋写作的版本号(和官方一致)
4
pkgrel=1 # 打包版本(首次发布为1)
5
pkgdesc="口袋写作 - 跨平台写作工具(Arch Linux通过Wine运行)"
6
arch=('x86_64') # 架构(口袋写作大概率是64位)
7
url="https://www.kdwrite.cn" # 替换为真实官网
8
license=('custom:Proprietary') # 闭源软件的许可证声明
9
depends=('wine' 'winetricks' 'ttf-dejavu' 'wqy-microhei') # 运行依赖(Wine核心)后两个是字体包
10
optdepends=('zenity: 图形化提示' 'xdg-utils: 打开默认浏览器')
11
source=("${pkgname}-${pkgver}.exe::https://oss.kdwrite.cn/0_app/kdwrite_v1.2.4.exe" # 替换为真实下载链接
12
"${pkgname}.desktop"
13
"MicrosoftEdgeWebView2RuntimeInstallerX64.exe::https://go.microsoft.com/fwlink/p/?LinkId=2124703"
14
"${pkgname}.png"
15
) # 可选:应用图标(需自己准备)
16
noextract=("${pkgname}-${pkgver}.exe") # 不自动解压exe
17
sha256sums=('2e056ae5c47a32f45ba06df1068d55fa5087a7697f1ff3e1e41a488f889a5a2b'
18
'ea89477560caac0a9ddf8a1513e7ad91cb1c430a0beffbc432f8b5e81ce0bbe3'
19
'79859394908084c68804bc6c43b5fd090b1d2d76434645ee2f3a76ced4153594'
20
'63014613fe9a5b3b747b5175fe37787e3ec07d7bb3c9ae4e354e55b34605bc11')
21
22
# 构建阶段(无编译,仅准备文件)
23
build() {
24
export WINEARCH=win64
25
export WINEDEBUG=-all
26
export LANG=zh_CN.UTF-8
27
28
# 1. 安装.NET 4.8和中文字体
29
winetricks -q dotnet48 fontsmooth=rgb cjkfonts
30
31
# 2. 安装VC++ 2015运行库
32
winetricks --force vcrun2015
33
34
# # 3. 用winetricks自动安装WebView2(关键修改)
35
# winetricks -q webview2
36
37
# 4. 禁用Edge更新服务
38
cat > "${srcdir}/disable_edgeupdate.reg" << EOF
39
Windows Registry Editor Version 5.00
40
41
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\edgeupdate]
42
"Start"=dword:00000004
43
44
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\edgeupdatem]
45
"Start"=dword:00000004
46
EOF
47
48
wine regedit "${srcdir}/disable_edgeupdate.reg"
49
}
50
51
# 安装阶段
52
package() {
53
# 1. 创建安装目录
54
install -d "${pkgdir}/opt/${pkgname}"
55
install -d "${pkgdir}/usr/bin"
56
install -d "${pkgdir}/usr/share/applications"
57
install -d "${pkgdir}/usr/share/pixmaps"
58
59
# 2. 复制Windows程序到opt目录(Arch标准第三方软件目录)
60
cp "${srcdir}/${pkgname}-${pkgver}.exe" "${pkgdir}/opt/${pkgname}/"
61
62
# 3. 创建启动脚本(核心:用Wine运行程序)
63
cat > "${pkgdir}/usr/bin/${pkgname}" << EOF
64
#!/bin/bash
65
cd /opt/${pkgname}
66
wine /opt/${pkgname}/${pkgname}-${pkgver}.exe "\$@"
67
EOF
68
chmod +x "${pkgdir}/usr/bin/${pkgname}" # 赋予执行权限
69
70
# 4. 安装桌面文件(让应用出现在系统菜单)
71
install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
72
73
# 5. 安装图标(可选,提升体验)
74
install -Dm644 "${srcdir}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
75
}
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 |