longbridge-bin

MEDIUM
maintainer rzhli 1 votes scanned 2026-11-01 00:21:48.120785
View on AUR
Why flagged

The package downloads a prebuilt .deb from a non-standard host (assets.lbctrl.com) which is not a common code hosting platform, and the binary is directly installed without rebuilding from source, creating a supply-chain risk if the host is compromised.

Triggered rules

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:23 source=("https://assets.lbctrl.com/github/release/longbridge-desktop/stable/longbridge-v${pkgver}-linux-x86_64.deb")
Medium AI review llm_review

An AI model (qwen/qwen3-235b-a22b-2507) reviewed this and agrees it is MEDIUM (confidence 95%): The package downloads a prebuilt .deb from a non-standard host (assets.lbctrl.com) which is not a common code hosting platform, and the binary is directly installed without rebuilding from source, creating a supply-chain risk if the host is compromised.

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: rzhli
2pkgname=longbridge-bin
3pkgver=1.0.0
4pkgrel=1
5pkgdesc="Longbridge Desktop trading platform"
6arch=("x86_64")
7url="https://longbridge.com/desktop/"
8license=("custom")
9depends=(
10 "glibc"
11 "gtk3"
12 "nss"
13 "alsa-lib"
14 "libxss"
15 "libxtst"
16 "xdg-utils"
17 "libxcrypt-compat"
18 "webkit2gtk-4.1"
19)
20provides=("longbridge")
21conflicts=("longbridge")
22options=('!strip')
23source=("https://assets.lbctrl.com/github/release/longbridge-desktop/stable/longbridge-v${pkgver}-linux-x86_64.deb")
24sha256sums=('d7bc2794eef49b5f1f17fa6fec9055bf9f114e847f1923814856a819cab6f811')
25
26prepare() {
27 cd "$srcdir"
28
29 # 清理并创建解压目录
30 rm -rf ext
31 mkdir -p ext
32
33 # 提取 deb 中的 data.tar.*
34 bsdtar -xf data.tar.* -C ext
35
36 # 调试:查看实际文件结构
37 echo "=== 检查 DEB 包结构 ==="
38 find ext -type f | head -20
39}
40
41package() {
42 cd "$srcdir/ext"
43
44 # ========================================
45 # 1. 复制所有文件到标准位置
46 # ========================================
47
48 # 主要文件在 usr/ 下,直接复制整个目录
49 if [[ -d "usr" ]]; then
50 cp -a usr "$pkgdir/"
51 fi
52
53 # 如果还有 usr/local,也迁移到 usr
54 if [[ -d "usr/local" ]]; then
55 mkdir -p "$pkgdir/usr"
56 cp -a usr/local/* "$pkgdir/usr/"
57 fi
58
59 # ========================================
60 # 2. 修复桌面文件
61 # ========================================
62
63 local _desktop="$pkgdir/usr/share/applications/longbridge-desktop.desktop"
64
65 if [[ -f "$_desktop" ]]; then
66 # 修复 TryExec 为绝对路径
67 sed -i "s|^TryExec=.*|TryExec=/usr/bin/longbridge|g" "$_desktop"
68
69 # 修复 Exec - 不添加任何参数,让程序自己处理
70 sed -i "s|^Exec=.*|Exec=/usr/bin/longbridge %U|g" "$_desktop"
71
72 # 确保图标正确 (与 hicolor 中的 longbridge-desktop.png 对应)
73 sed -i "s|^Icon=.*|Icon=longbridge-desktop|g" "$_desktop"
74
75 # 修复类别 - 改为网络/互联网类别
76 if grep -q "^Categories=" "$_desktop"; then
77 sed -i "s|^Categories=.*|Categories=Network;Finance;|g" "$_desktop"
78 else
79 echo "Categories=Network;Finance;" >> "$_desktop"
80 fi
81
82 # 确保其他必需字段存在
83 if ! grep -q "^Terminal=" "$_desktop"; then
84 echo "Terminal=false" >> "$_desktop"
85 fi
86
87 if ! grep -q "^Type=" "$_desktop"; then
88 echo "Type=Application" >> "$_desktop"
89 fi
90
91 if ! grep -q "^StartupNotify=" "$_desktop"; then
92 sed -i "s|^StartupNotify=.*|StartupNotify=true|g" "$_desktop"
93 fi
94 else
95 error "桌面文件不存在: $_desktop"
96 return 1
97 fi
98
99 # ========================================
100 # 3. 主程序在 /usr/lib/longbridge-desktop/ 下,
101 # 创建 /usr/bin/longbridge 符号链接
102 # ========================================
103
104 local _bin="$pkgdir/usr/lib/longbridge-desktop/longbridge"
105
106 if [[ -f "$_bin" ]]; then
107 chmod +x "$_bin"
108 mkdir -p "$pkgdir/usr/bin"
109 ln -s /usr/lib/longbridge-desktop/longbridge "$pkgdir/usr/bin/longbridge"
110 else
111 error "未找到主程序 /usr/lib/longbridge-desktop/longbridge"
112 return 1
113 fi
114
115 # ========================================
116 # 4. 许可证文件
117 # ========================================
118
119 find . -name "copyright" -exec install -Dm644 {} "$pkgdir/usr/share/licenses/$pkgname/LICENSE" \; || true
120}
121
122post_install() {
123 echo "正在更新桌面数据库..."
124 update-desktop-database -q
125
126 echo "正在更新图标缓存..."
127 gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true
128
129 echo ""
130 echo "Longbridge 安装完成!"
131 echo "如果图标未显示,请尝试:"
132 echo " 1. 注销并重新登录"
133 echo " 2. 运行: gtk-update-icon-cache -f /usr/share/icons/hicolor"
134 echo ""
135}
136
137post_upgrade() {
138 post_install
139}
140
141post_remove() {
142 update-desktop-database -q
143 gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true
144}
145

Scan history

Scanned at (UTC)SeverityRules
2026-11-01 00:21:48 Medium 2
2026-10-31 00:07:41 Medium 2
2026-10-30 00:29:30 Medium 2
2026-10-29 00:13:55 Medium 2
2026-10-28 00:06:54 Medium 2
2026-10-27 00:23:28 Medium 2
2026-10-26 00:12:40 Medium 2
2026-10-25 00:20:48 Medium 2
2026-10-24 00:14:55 Medium 2
2026-10-23 00:02:19 Medium 2
2026-10-22 00:13:10 Medium 2
2026-10-21 00:12:50 Medium 2
2026-10-20 00:10:31 Medium 2
2026-10-19 00:03:55 Medium 2
2026-10-18 00:06:55 Medium 2
2026-10-17 00:21:55 Medium 2
2026-10-16 00:12:47 Medium 2
2026-10-15 00:28:05 Medium 2
2026-10-14 00:06:47 Medium 2
2026-10-13 07:16:10 Medium 2

Report a package

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

0 / 4000
Your suggestion