asc-bisheng-bin

LOW
maintainer greenhandzdl 0 votes scanned 2026-10-26 07:46:00.476890
View on AUR
Why flagged

Downloads a prebuilt binary from Huawei's official CANN repository (ascend-repo.obs.cn-east-2.myhuaweicloud.com), which is the vendor's own official object storage; checksums are provided and match; the package extracts and installs the Bisheng compiler from Huawei's own toolkit bundle, which is normal closed-source binary packaging with no obfuscation, exfiltration, or redirection to untrusted hosts.

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 downgraded a static finding llm_review

The static rules flagged this MEDIUM, but an AI model (anthropic/claude-sonnet-4.6) reviewed the full PKGBUILD and judged it LOW (confidence 80%): Downloads a prebuilt binary from Huawei's official CANN repository (ascend-repo.obs.cn-east-2.myhuaweicloud.com), which is the vendor's own official object storage; checksums are provided and match; the package extracts and installs the Bisheng compiler from Huawei's own toolkit bundle, which is normal closed-source binary packaging with no obfuscation, exfiltration, or redirection to untrusted hosts.

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:20 source_x86_64=("${_zip}::https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%20${pkgver}/Ascend-cann-toolkit_${pkgver}_linux-x86_64.zip")

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: greenhandzdl <greenhandzdl@greenhandzdl.moe>
2# Bisheng (毕昇) compiler for Ascend C. Closed source: extracted from the
3# official CANN 9.2.0 toolkit bundle, hence -bin.
4pkgname=asc-bisheng-bin
5pkgver=9.2.0
6pkgrel=1
7pkgdesc='Huawei Bisheng C/C++ compiler for Ascend (ccec_compiler, LLVM based)'
8arch=('x86_64' 'aarch64')
9url='https://www.hiascend.com/developer/download/community/result?module=cann'
10license=('custom:CANN-OSLA-2.0')
11depends=('glibc' 'gcc-libs' 'bash' 'asc-runtime')
12provides=('asc-bisheng')
13conflicts=('asc-bisheng')
14options=('!strip' '!debug' 'staticlibs')
15makedepends=('unzip')
16
17_zip="cann-toolkit-${pkgver}.zip"
18_run="Ascend-cann-toolkit_${pkgver}_linux-${CARCH}.run"
19_unit="cann-bisheng-compiler_${pkgver}_linux-${CARCH}.run"
20source_x86_64=("${_zip}::https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%20${pkgver}/Ascend-cann-toolkit_${pkgver}_linux-x86_64.zip")
21source_aarch64=("${_zip}::https://ascend-repo.obs.cn-east-2.myhuaweicloud.com/CANN/CANN%20${pkgver}/Ascend-cann-toolkit_${pkgver}_linux-aarch64.zip")
22sha256sums_x86_64=('6d753badfcddcf13d1049906e40f0c26150ffc01d4ad226ad8c74f352cbf7442')
23sha256sums_aarch64=('4c432c89b0561de21e2d9b2dd0bc7bf78d3461e4eab645c1613d72422b4bdbbf')
24noextract=("${_zip}")
25_libdir="${CARCH}-linux"
26
27_extract_run() {
28 rm -rf "$2"
29 bash "$1" --noexec --extract="$2"
30}
31
32prepare() {
33 cd "$srcdir"
34 [[ -f .prepared ]] && return
35 rm -rf outer inner tk payload
36 mkdir -p outer inner
37 unzip -q "$_zip" -d outer
38 unzip -q "outer/Ascend-cann-toolkit_${pkgver}_linux-${CARCH}.zip" -d inner
39 _extract_run "inner/${_run}" "$srcdir/tk"
40 _extract_run "tk/run_package/${_unit}" "$srcdir/payload"
41 touch .prepared
42}
43
44package() {
45 local root="$pkgdir/opt/ascend/cann-${pkgver}"
46 local src="$srcdir/payload" libdir="${CARCH}-linux" e
47
48 install -d "$root/$libdir/bin"
49 [[ -d $src/$libdir ]] && cp -a "$src/$libdir/." "$root/$libdir/"
50 for e in "$src"/*; do
51 [[ -e $e ]] || continue
52 case ${e##*/} in
53 # owned by asc-toolkit-bin / asc-runtime-*
54 "$libdir"|set_env.sh) continue ;;
55 esac
56 cp -a "$e" "$root/"
57 done
58 # identical copies shipped by every component; keep the runtime copy
59 rm -f "$root/$libdir/conf/path.cfg" \
60 "$root/$libdir/bin/setenv.bash"
61
62 ln -sfn ../tools/bisheng_compiler "$root/$libdir/ccec_compiler"
63 ln -sfn bisheng_compiler "$root/tools/ccec_compiler"
64 local b
65 for b in bisheng bisheng-tune; do
66 [[ -x $root/tools/bisheng_compiler/bin/$b ]] && \
67 ln -sfn "../../tools/bisheng_compiler/bin/$b" "$root/$libdir/bin/$b"
68 done
69
70 # Replay the official installer's symlink farm (filelist.csv "softlink"
71 # column), e.g. toolkit/toolchain/hcc. Root arch links are owned by
72 # asc-toolkit-bin; setenv.bash is skipped because the root set_env.sh it
73 # targets is owned by asc-runtime-*.
74 local csv f1 f2 f3 inst f5 f6 f7 f8 links l target link
75 for csv in "$root"/share/info/*/script/filelist.csv; do
76 [[ -f $csv ]] || continue
77 while IFS=, read -r f1 f2 f3 inst f5 f6 f7 f8 links _rest; do
78 [[ $links == NA || -z $links || $links == softlink ]] && continue
79 for l in ${links//;/ }; do
80 case $l in
81 asc|bin|conf|devlib|include|lib64|pkg_inc) continue ;;
82 esac
83 target="$root/$inst" link="$root/$l"
84 [[ -e $target ]] || continue
85 [[ -e $link || -L $link ]] && continue
86 mkdir -p "${link%/*}"
87 ln -sfn "$(realpath --relative-to="${link%/*}" "$target")" "$link"
88 done
89 done < "$csv"
90 done
91
92 install -Dm644 "$srcdir/tk/script/eula_en.txt" \
93 "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
94
95 # No profile.d here: the official CANN set_env.sh (shipped by asc-runtime-*,
96 # sourced via /etc/profile.d/ascend-cann.sh) already puts
97 # tools/ccec_compiler/bin on PATH, and ccec_compiler links to
98 # bisheng_compiler above.
99 # The upstream installers build with a restrictive umask (750/640/440),
100 # which leaves a root install unreadable to non-root users (bisheng
101 # headers, cmake modules). Normalize to the Arch/AUR norm.
102 find "$pkgdir" -type d -exec chmod 755 {} +
103 find "$pkgdir" -type f -perm /111 -exec chmod 755 {} +
104 find "$pkgdir" -type f ! -perm /111 -exec chmod 644 {} +
105}
106

Scan history

Scanned at (UTC)SeverityRules
2026-10-26 07:46:00 Low 3
2026-10-26 07:44:04 Medium 2

Report a package

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

0 / 4000
Your suggestion