shorin-contrib-gitee-git

maintainer jxc · 0 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The package clones source code from a Gitee repository, which is a non-standard host, but the content is built and installed as expected for an AUR package; the source is not prebuilt binary, and the host, while not whitelisted, is plausibly the project's own mirror with no evidence of malicious redirection or payload.

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 clones source code from a Gitee repository, which is a non-standard host, but the content is built and installed as expected for an AUR package; the source is not prebuilt binary, and the host, while not whitelisted, is plausibly the project's own mirror with no evidence of malicious redirection or payload.

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:29 source=("git+https://gitee.com/jxc20120414/shorin-contrib.git")

PKGBUILD

1 offending line(s) highlighted
1#我经过shorin本人同意后,把本aur包需要的源代码上传至gitee,并且修改了源代码获取的地址,其他无改动,我的邮箱:3824280949@qq.com
2# Maintainer: Shorin <2433516202@qq.com>
3
4pkgname=shorin-contrib-gitee-git
5_pkgname=shorin-contrib
6pkgver=r61.fe88d7d
7pkgrel=1
8pkgdesc="Shorin's personal Arch Linux toolbox and system utilities (Subcommand version)"
9arch=('any')
10url="https://gitee.com/jxc20120414/shorin-contrib"
11license=('GPL3')
12depends=('bash' 'fzf')
13makedepends=('git')
14install='shorin-contrib.install'
15
16# 可选依赖:让用你包的人知道特定子命令需要什么环境
17optdepends=(
18 'snapper: for quicksave/quickload btrfs snapshot support'
19 'btrfs-assistant: for advanced btrfs restoration backend'
20 'fuzzel: for GUI menus in Wayland'
21 'libnotify: for desktop notifications'
22 'ffmpeg: for video2gif utility'
23 'timg: for lsi image preview'
24)
25
26provides=("${_pkgname}")
27conflicts=("${_pkgname}")
28
29source=("git+https://gitee.com/jxc20120414/shorin-contrib.git")
30sha256sums=('SKIP')
31
32# 自动获取最新的 Git commit 数量作为版本号
33pkgver() {
34 cd "${_pkgname}"
35 printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
36}
37package() {
38 cd "${_pkgname}"
39
40 # 1. 创建私有库目录
41 install -dm755 "${pkgdir}/usr/lib/${_pkgname}"
42
43 # 2. 拍平复制所有脚本
44 find . -mindepth 2 -type f -not -path "*/\.git/*" -exec install -Dm755 {} "${pkgdir}/usr/lib/${_pkgname}/" \;
45
46 # 3. 配置全局命令
47 install -dm755 "${pkgdir}/usr/bin"
48
49 # 系统级(需 root 或全局可用)的命令,直接在打包阶段链接到 /usr/bin
50 ln -sf "/usr/lib/${_pkgname}/quicksave" "${pkgdir}/usr/bin/quicksave"
51 ln -sf "/usr/lib/${_pkgname}/quickload" "${pkgdir}/usr/bin/quickload"
52 ln -sf "/usr/lib/${_pkgname}/change-grub-theme" "${pkgdir}/usr/bin/change-grub-theme"
53
54 # 写入增强版 shorin 主调度器
55 cat << 'EOF' > "${pkgdir}/usr/bin/shorin"
56#!/bin/bash
57set -euo pipefail
58
59# =============================================================================
60# 功能描述: Shorin Contrib 的主调度器。
61# 支持动态解析子命令描述,并根据 LANG 环境变量显示中文/英文。
62# =============================================================================
63
64LIB_DIR="/usr/lib/shorin-contrib"
65
66# --------------------- 语言检测 ---------------------
67if [[ "${LANG:-}" == zh_CN* ]]; then
68 IS_CN=true
69else
70 IS_CN=false
71fi
72
73# --------------------- 双语字符串定义 ---------------------
74if $IS_CN; then
75 USAGE_STR="用法:"
76 AVAIL_STR="可用子命令:"
77 ENV_STR="环境管理:"
78 LINK_DESC="生成本地用户的快捷软链接 (全程免密)"
79 UNLINK_DESC="移除本地软链接"
80 LINK_START="开始生成本地快捷命令..."
81 LINK_DONE="链接部署完成!"
82 LINK_ITEM="[User] 已链接:"
83 UNLINK_START="开始清理快捷命令..."
84 UNLINK_DONE="链接清理完成!"
85 UNLINK_ITEM="[User] 已移除:"
86 UNKNOWN_CMD="未知子命令"
87 SUB_PLACEHOLDER="<子命令>"
88 OPT_PLACEHOLDER="[选项]"
89else
90 USAGE_STR="Usage:"
91 AVAIL_STR="Available subcommands:"
92 ENV_STR="Environment management:"
93 LINK_DESC="Create no-password local symlinks for user"
94 UNLINK_DESC="Remove local symlinks"
95 LINK_START="Creating local symlinks..."
96 LINK_DONE="Symlink deployment complete!"
97 LINK_ITEM="[User] Linked:"
98 UNLINK_START="Cleaning up symlinks..."
99 UNLINK_DONE="Symlink cleanup complete!"
100 UNLINK_ITEM="[User] Removed:"
101 UNKNOWN_CMD="unknown subcommand"
102 SUB_PLACEHOLDER="<subcommand>"
103 OPT_PLACEHOLDER="[options]"
104fi
105
106# 颜色定义
107BLUE='\033[0;34m'
108NC='\033[0m'
109
110# ===================== 无参数时显示帮助 =====================
111if [ $# -eq 0 ]; then
112 echo -e "${USAGE_STR} ${BLUE}shorin${NC} ${SUB_PLACEHOLDER} ${OPT_PLACEHOLDER}"
113 echo -e "\n${AVAIL_STR}"
114
115 # 遍历库目录,提取对应语言的描述
116 for script in "$LIB_DIR"/*; do
117 if [ -x "$script" ]; then
118 name=$(basename "$script")
119 if $IS_CN; then
120 # 中文:提取第二行,去掉 "# 描述:" 前缀
121 desc=$(sed -n '2p' "$script" | sed -E 's/^#[[:space:]]*描述:[[:space:]]*//')
122 else
123 # 英文:提取第三行,去掉 "# Description:" 前缀
124 desc=$(sed -n '3p' "$script" | sed -E 's/^#[[:space:]]*Description:[[:space:]]*//')
125 fi
126 # 若描述为空,显示占位符
127 [ -z "$desc" ] && desc="-"
128 printf " ${BLUE}%-15s${NC} %s\n" "$name" "$desc"
129 fi
130 done | sort
131
132 echo -e "\n${ENV_STR}"
133 printf " ${BLUE}%-15s${NC} %s\n" "link" "$LINK_DESC"
134 printf " ${BLUE}%-15s${NC} %s\n" "unlink" "$UNLINK_DESC"
135 exit 1
136fi
137
138COMMAND="$1"
139shift
140
141# ===================== 软链接管理 =====================
142if [ "$COMMAND" = "link" ]; then
143 mkdir -p "$HOME/.local/bin"
144 echo "$LINK_START"
145 for script in "$LIB_DIR"/*; do
146 if [ -f "$script" ]; then
147 base_name=$(basename "$script")
148 if [[ "$base_name" != "quicksave" && "$base_name" != "quickload" && "$base_name" != "change-grub-theme" ]]; then
149 ln -sf "$script" "$HOME/.local/bin/$base_name"
150 echo " ${LINK_ITEM} ~/.local/bin/$base_name"
151 fi
152 fi
153 done
154 echo -e "\n${LINK_DONE}"
155 exit 0
156elif [ "$COMMAND" = "unlink" ]; then
157 echo "$UNLINK_START"
158 for script in "$LIB_DIR"/*; do
159 if [ -f "$script" ]; then
160 base_name=$(basename "$script")
161 if [[ "$base_name" != "quicksave" && "$base_name" != "quickload" && "$base_name" != "change-grub-theme" ]]; then
162 rm -f "$HOME/.local/bin/$base_name"
163 echo " ${UNLINK_ITEM} ~/.local/bin/$base_name"
164 fi
165 fi
166 done
167 echo -e "\n${UNLINK_DONE}"
168 exit 0
169fi
170
171# ===================== 执行子命令 =====================
172TARGET_SCRIPT="$LIB_DIR/$COMMAND"
173if [ -x "$TARGET_SCRIPT" ]; then
174 exec "$TARGET_SCRIPT" "$@"
175else
176 echo "shorin: ${UNKNOWN_CMD} '$COMMAND'" >&2
177 exit 1
178fi
179EOF
180
181 chmod +x "${pkgdir}/usr/bin/shorin"
182
183 # 4. Fish 补全 (保持不变)
184 install -dm755 "${pkgdir}/usr/share/fish/vendor_completions.d"
185 cat << 'EOF' > "${pkgdir}/usr/share/fish/vendor_completions.d/shorin.fish"
186complete -c shorin -f
187complete -c shorin -a "(ls /usr/lib/shorin-contrib/ 2>/dev/null)"
188EOF
189}
190

Scan history

Scanned at (UTC)SeverityRules
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

Report a package

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

0 / 4000
Your suggestion