longbridge-bin
maintainer rzhli
· 1 votes
· scanned 2026-08-03 00:08:14.047287
MEDIUM
View on AUR ↗
Why flagged
The package downloads a prebuilt .deb binary from a non-standard, non-whitelisted host (assets.lbctrl.com), which is not the project's primary domain or a well-known release platform, creating a supply-chain risk if the host is compromised or misconfigured.
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 binary from a non-standard, non-whitelisted host (assets.lbctrl.com), which is not the project's primary domain or a well-known release platform, creating a supply-chain risk if the host is compromised or misconfigured.
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: rzhli
2
pkgname=longbridge-bin
3
pkgver=0.18.3
4
pkgrel=1
5
pkgdesc="Longbridge Desktop trading platform"
6
arch=("x86_64")
7
url="https://longbridge.com/desktop/"
8
license=("custom")
9
depends=(
10
"glibc"
11
"gtk3"
12
"nss"
13
"alsa-lib"
14
"libxss"
15
"libxtst"
16
"xdg-utils"
17
"libxcrypt-compat"
18
"webkit2gtk-4.1"
19
)
20
provides=("longbridge")
21
conflicts=("longbridge")
22
options=('!strip')
23
source=("https://assets.lbctrl.com/github/release/longbridge-desktop/stable/longbridge-v${pkgver}-linux-x86_64.deb")
24
sha256sums=('c03bbc0994db46b184ad41e65590bba92c681a35a1c3fd9fa5e5d76a4dcfcea9')
25
26
prepare() {
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
41
package() {
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"
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
# 确保图标正确
73
sed -i "s|^Icon=.*|Icon=longbridge|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. 确保主程序可执行
101
# ========================================
102
103
if [[ -f "$pkgdir/usr/bin/longbridge" ]]; then
104
chmod +x "$pkgdir/usr/bin/longbridge"
105
else
106
error "未找到主程序 /usr/bin/longbridge"
107
return 1
108
fi
109
110
# ========================================
111
# 4. 许可证文件
112
# ========================================
113
114
find . -name "copyright" -exec install -Dm644 {} "$pkgdir/usr/share/licenses/$pkgname/LICENSE" \; || true
115
}
116
117
post_install() {
118
echo "正在更新桌面数据库..."
119
update-desktop-database -q
120
121
echo "正在更新图标缓存..."
122
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true
123
124
echo ""
125
echo "Longbridge 安装完成!"
126
echo "如果图标未显示,请尝试:"
127
echo " 1. 注销并重新登录"
128
echo " 2. 运行: gtk-update-icon-cache -f /usr/share/icons/hicolor"
129
echo ""
130
}
131
132
post_upgrade() {
133
post_install
134
}
135
136
post_remove() {
137
update-desktop-database -q
138
gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor || true
139
}
140
Changes since previous scan
--- PKGBUILD @ 2026-07-29 00:25+++ PKGBUILD @ 2026-08-03 00:08@@ -1,6 +1,6 @@ # Maintainer: rzhli pkgname=longbridge-bin-pkgver=0.18.1+pkgver=0.18.3 pkgrel=1 pkgdesc="Longbridge Desktop trading platform" arch=("x86_64")@@ -21,7 +21,7 @@ conflicts=("longbridge") options=('!strip') source=("https://assets.lbctrl.com/github/release/longbridge-desktop/stable/longbridge-v${pkgver}-linux-x86_64.deb")-sha256sums=('218775d5600f5cfcf7ea62a317fda2b35dea55be0afcc7bcb5545e3ca7059a02')+sha256sums=('c03bbc0994db46b184ad41e65590bba92c681a35a1c3fd9fa5e5d76a4dcfcea9') prepare() { cd "$srcdir"Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | MEDIUM | 2 |
| 2026-08-02 00:16:08 | MEDIUM | 2 |
| 2026-08-01 00:11:18 | MEDIUM | 2 |
| 2026-07-31 00:14:10 | MEDIUM | 2 |
| 2026-07-30 00:17:23 | MEDIUM | 2 |
| 2026-07-29 03:10:20 | MEDIUM | 2 |
| 2026-07-29 00:25:53 | MEDIUM | 2 |
| 2026-07-28 00:07:28 | MEDIUM | 2 |
| 2026-07-27 00:24:32 | MEDIUM | 2 |
| 2026-07-26 00:07:32 | MEDIUM | 2 |
| 2026-07-25 00:13:44 | MEDIUM | 2 |
| 2026-07-24 00:02:28 | MEDIUM | 2 |
| 2026-07-23 00:14:47 | MEDIUM | 2 |
| 2026-07-22 00:29:32 | MEDIUM | 2 |
| 2026-07-21 11:16:59 | MEDIUM | 2 |
| 2026-07-21 00:24:15 | MEDIUM | 2 |
| 2026-07-20 00:19:49 | MEDIUM | 2 |
| 2026-07-19 00:17:08 | MEDIUM | 2 |
| 2026-07-18 00:14:48 | MEDIUM | 2 |
| 2026-07-17 00:06:16 | MEDIUM | 2 |