shorin-contrib-gitee-git
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
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)
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#我经过shorin本人同意后,把本aur包需要的源代码上传至gitee,并且修改了源代码获取的地址,其他无改动,我的邮箱:3824280949@qq.com
# Maintainer: Shorin <2433516202@qq.com>
pkgname=shorin-contrib-gitee-git
_pkgname=shorin-contrib
pkgver=r61.fe88d7d
pkgrel=1
pkgdesc="Shorin's personal Arch Linux toolbox and system utilities (Subcommand version)"
arch=('any')
url="https://gitee.com/jxc20120414/shorin-contrib"
license=('GPL3')
depends=('bash' 'fzf')
makedepends=('git')
install='shorin-contrib.install'
# 可选依赖:让用你包的人知道特定子命令需要什么环境
optdepends=(
'snapper: for quicksave/quickload btrfs snapshot support'
'btrfs-assistant: for advanced btrfs restoration backend'
'fuzzel: for GUI menus in Wayland'
'libnotify: for desktop notifications'
'ffmpeg: for video2gif utility'
'timg: for lsi image preview'
)
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("git+https://gitee.com/jxc20120414/shorin-contrib.git")
sha256sums=('SKIP')
# 自动获取最新的 Git commit 数量作为版本号
pkgver() {
cd "${_pkgname}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
package() {
cd "${_pkgname}"
# 1. 创建私有库目录
install -dm755 "${pkgdir}/usr/lib/${_pkgname}"
# 2. 拍平复制所有脚本
find . -mindepth 2 -type f -not -path "*/\.git/*" -exec install -Dm755 {} "${pkgdir}/usr/lib/${_pkgname}/" \;
# 3. 配置全局命令
install -dm755 "${pkgdir}/usr/bin"
# 系统级(需 root 或全局可用)的命令,直接在打包阶段链接到 /usr/bin
ln -sf "/usr/lib/${_pkgname}/quicksave" "${pkgdir}/usr/bin/quicksave"
ln -sf "/usr/lib/${_pkgname}/quickload" "${pkgdir}/usr/bin/quickload"
ln -sf "/usr/lib/${_pkgname}/change-grub-theme" "${pkgdir}/usr/bin/change-grub-theme"
# 写入增强版 shorin 主调度器
cat << 'EOF' > "${pkgdir}/usr/bin/shorin"
#!/bin/bash
set -euo pipefail
# =============================================================================
# 功能描述: Shorin Contrib 的主调度器。
# 支持动态解析子命令描述,并根据 LANG 环境变量显示中文/英文。
# =============================================================================
LIB_DIR="/usr/lib/shorin-contrib"
# --------------------- 语言检测 ---------------------
if [[ "${LANG:-}" == zh_CN* ]]; then
IS_CN=true
else
IS_CN=false
fi
# --------------------- 双语字符串定义 ---------------------
if $IS_CN; then
USAGE_STR="用法:"
AVAIL_STR="可用子命令:"
ENV_STR="环境管理:"
LINK_DESC="生成本地用户的快捷软链接 (全程免密)"
UNLINK_DESC="移除本地软链接"
LINK_START="开始生成本地快捷命令..."
LINK_DONE="链接部署完成!"
LINK_ITEM="[User] 已链接:"
UNLINK_START="开始清理快捷命令..."
UNLINK_DONE="链接清理完成!"
UNLINK_ITEM="[User] 已移除:"
UNKNOWN_CMD="未知子命令"
SUB_PLACEHOLDER="<子命令>"
OPT_PLACEHOLDER="[选项]"
else
USAGE_STR="Usage:"
AVAIL_STR="Available subcommands:"
ENV_STR="Environment management:"
LINK_DESC="Create no-password local symlinks for user"
UNLINK_DESC="Remove local symlinks"
LINK_START="Creating local symlinks..."
LINK_DONE="Symlink deployment complete!"
LINK_ITEM="[User] Linked:"
UNLINK_START="Cleaning up symlinks..."
UNLINK_DONE="Symlink cleanup complete!"
UNLINK_ITEM="[User] Removed:"
UNKNOWN_CMD="unknown subcommand"
SUB_PLACEHOLDER="<subcommand>"
OPT_PLACEHOLDER="[options]"
fi
# 颜色定义
BLUE='\033[0;34m'
NC='\033[0m'
# ===================== 无参数时显示帮助 =====================
if [ $# -eq 0 ]; then
echo -e "${USAGE_STR} ${BLUE}shorin${NC} ${SUB_PLACEHOLDER} ${OPT_PLACEHOLDER}"
echo -e "\n${AVAIL_STR}"
# 遍历库目录,提取对应语言的描述
for script in "$LIB_DIR"/*; do
if [ -x "$script" ]; then
name=$(basename "$script")
if $IS_CN; then
# 中文:提取第二行,去掉 "# 描述:" 前缀
desc=$(sed -n '2p' "$script" | sed -E 's/^#[[:space:]]*描述:[[:space:]]*//')
else
# 英文:提取第三行,去掉 "# Description:" 前缀
desc=$(sed -n '3p' "$script" | sed -E 's/^#[[:space:]]*Description:[[:space:]]*//')
fi
# 若描述为空,显示占位符
[ -z "$desc" ] && desc="-"
printf " ${BLUE}%-15s${NC} %s\n" "$name" "$desc"
fi
done | sort
echo -e "\n${ENV_STR}"
printf " ${BLUE}%-15s${NC} %s\n" "link" "$LINK_DESC"
printf " ${BLUE}%-15s${NC} %s\n" "unlink" "$UNLINK_DESC"
exit 1
fi
COMMAND="$1"
shift
# ===================== 软链接管理 =====================
if [ "$COMMAND" = "link" ]; then
mkdir -p "$HOME/.local/bin"
echo "$LINK_START"
for script in "$LIB_DIR"/*; do
if [ -f "$script" ]; then
base_name=$(basename "$script")
if [[ "$base_name" != "quicksave" && "$base_name" != "quickload" && "$base_name" != "change-grub-theme" ]]; then
ln -sf "$script" "$HOME/.local/bin/$base_name"
echo " ${LINK_ITEM} ~/.local/bin/$base_name"
fi
fi
done
echo -e "\n${LINK_DONE}"
exit 0
elif [ "$COMMAND" = "unlink" ]; then
echo "$UNLINK_START"
for script in "$LIB_DIR"/*; do
if [ -f "$script" ]; then
base_name=$(basename "$script")
if [[ "$base_name" != "quicksave" && "$base_name" != "quickload" && "$base_name" != "change-grub-theme" ]]; then
rm -f "$HOME/.local/bin/$base_name"
echo " ${UNLINK_ITEM} ~/.local/bin/$base_name"
fi
fi
done
echo -e "\n${UNLINK_DONE}"
exit 0
fi
# ===================== 执行子命令 =====================
TARGET_SCRIPT="$LIB_DIR/$COMMAND"
if [ -x "$TARGET_SCRIPT" ]; then
exec "$TARGET_SCRIPT" "$@"
else
echo "shorin: ${UNKNOWN_CMD} '$COMMAND'" >&2
exit 1
fi
EOF
chmod +x "${pkgdir}/usr/bin/shorin"
# 4. Fish 补全 (保持不变)
install -dm755 "${pkgdir}/usr/share/fish/vendor_completions.d"
cat << 'EOF' > "${pkgdir}/usr/share/fish/vendor_completions.d/shorin.fish"
complete -c shorin -f
complete -c shorin -a "(ls /usr/lib/shorin-contrib/ 2>/dev/null)"
EOF
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 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 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 |
| 2026-08-29 00:29:17 | Low | 2 |