wb2api-git
LOW
maintainer ynk
0 votes
scanned 2026-10-17 00:21:55.226236
Why flagged
Package builds from a legitimate Git repository, includes standard build steps, and installs binaries and config files; flagged low due to few votes and recent upload, but no malicious behavior observed.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Low
AI review
llm_review
An AI model (qwen/qwen3-235b-a22b-2507) reviewed this and agrees it is LOW (confidence 90%): Package builds from a legitimate Git repository, includes standard build steps, and installs binaries and config files; flagged low due to few votes and recent upload, but no malicious behavior observed.
PKGBUILD
1
# Maintainer: ynk
2
pkgname=wb2api-git
3
pkgver=1.13.0.r9.g6b31db6
4
pkgrel=1
5
pkgdesc="workbuddy2api panel - Go API panel service (git, auto-follows upstream)"
6
arch=('x86_64' 'aarch64')
7
url="https://github.com/linguo2625469/workbuddy2api-panel"
8
license=('MIT')
9
makedepends=('git' 'go')
10
provides=('wb2api')
11
conflicts=('wb2api')
12
backup=('etc/wb2api/config.json')
13
source=("git+$url.git"
14
"wb2api.service"
15
"wb2api.sysusers"
16
"wb2api.tmpfiles")
17
sha256sums=('SKIP'
18
'SKIP'
19
'SKIP'
20
'SKIP')
21
22
pkgver() {
23
cd workbuddy2api-panel
24
git describe --tags --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
25
}
26
27
build() {
28
cd workbuddy2api-panel
29
export CGO_ENABLED=0 GOFLAGS="-trimpath" GOPATH="$srcdir/gopath" GOCACHE="$srcdir/gocache"
30
go build -ldflags="-s -w" -o "$srcdir/wb2api" ./cmd/server
31
go build -ldflags="-s -w" -o "$srcdir/signin_bin" ./cmd/signin
32
go build -ldflags="-s -w" -o "$srcdir/login" ./cmd/login
33
go build -ldflags="-s -w" -o "$srcdir/credit" ./cmd/credit
34
}
35
36
package() {
37
# 二进制
38
install -Dm755 "$srcdir/wb2api" "$pkgdir/usr/bin/wb2api"
39
install -Dm755 "$srcdir/signin_bin" "$pkgdir/usr/bin/wb2api-signin"
40
install -Dm755 "$srcdir/login" "$pkgdir/usr/bin/wb2api-login"
41
install -Dm755 "$srcdir/credit" "$pkgdir/usr/bin/wb2api-credit"
42
43
# shell 脚本与辅助脚本
44
install -Dm755 workbuddy2api-panel/login.sh "$pkgdir/usr/share/wb2api/login.sh"
45
install -Dm755 workbuddy2api-panel/signin.sh "$pkgdir/usr/share/wb2api/signin.sh"
46
install -Dm755 workbuddy2api-panel/credit.sh "$pkgdir/usr/share/wb2api/credit.sh"
47
install -Dm755 workbuddy2api-panel/scripts/probe_active.py "$pkgdir/usr/share/wb2api/scripts/probe_active.py"
48
49
# 默认配置(backup= 声明后,升级时用户改动会被保留为 .pacnew)
50
install -Dm600 -o root -g root workbuddy2api-panel/config.example.json "$pkgdir/etc/wb2api/config.json"
51
52
# systemd 单元 + 运行用户 + 状态目录
53
install -Dm644 "$srcdir/wb2api.service" "$pkgdir/usr/lib/systemd/system/wb2api.service"
54
install -Dm644 "$srcdir/wb2api.sysusers" "$pkgdir/usr/lib/sysusers.d/wb2api.conf"
55
install -Dm644 "$srcdir/wb2api.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/wb2api.conf"
56
}
57
58
post_install() {
59
chgrp wb2api /etc/wb2api/config.json
60
chmod 640 /etc/wb2api/config.json
61
chown -R wb2api:wb2api /var/lib/wb2api
62
}
63
64
post_upgrade() {
65
chgrp wb2api /etc/wb2api/config.json
66
chmod 640 /etc/wb2api/config.json
67
chown -R wb2api:wb2api /var/lib/wb2api
68
}
69
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-17 00:21:55 | Low | 2 |
| 2026-10-16 00:12:47 | Low | 2 |
| 2026-10-15 11:11:38 | Low | 2 |