longbridge-bin

LOW
maintainer rzhli 1 votes scanned 2026-09-17 00:27:14.276658
View on AUR
Why flagged

The package downloads a prebuilt .deb from a non-whitelisted but project-plausibly-owned host (assets.lbctrl.com) and extracts it; while the source is not verifiable from upstream source code, it is a standard packaging practice for binary-only applications and does not involve executing untrusted scripts or exfiltration.

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-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package downloads a prebuilt .deb from a non-whitelisted but project-plausibly-owned host (assets.lbctrl.com) and extracts it; while the source is not verifiable from upstream source code, it is a standard packaging practice for binary-only applications and does not involve executing untrusted scripts or exfiltration.

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

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: rzhli
2pkgname=longbridge-bin
3pkgver=0.19.1
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=('863b2e440095a3cda387cee3fbcc79bc0caf08182f855eb1a9609463fcb79f03')
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-09-17 00:27:14 Low 2
2026-09-16 00:03:17 Low 2
2026-09-15 00:25:31 Low 2
2026-09-14 00:27:57 Low 2
2026-09-13 00:19:54 Low 2
2026-09-12 00:25:17 Low 2
2026-09-11 00:19:22 Low 2
2026-09-10 03:20:13 Medium 1
2026-09-10 00:22:44 Low 2
2026-09-09 00:04:09 Low 2
2026-09-08 00:18:08 Low 2
2026-09-07 00:30:15 Low 2
2026-09-06 00:17:06 Low 2
2026-09-05 00:16:27 Low 2
2026-09-04 00:03:13 Low 2
2026-09-03 00:15:47 Low 2
2026-09-02 00:02:31 Low 2
2026-09-01 00:11:19 Low 2
2026-08-31 00:19:57 Low 2
2026-08-30 00:04:14 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