libcorecrypto

maintainer AlphaJack · 3 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The download is from Apple's own developer website (developer.apple.com), which is the official upstream source. The maintainer explicitly explains why it cannot be in source=(): Apple doesn't allow redistribution and the download requires browser-like headers/cookies to access. The checksum validation is commented out with an explanation that Apple frequently changes the checksum, which is sloppy but the source itself is Apple's official server. This is not an unofficial or personal host — it's the legitimate vendor. The real concern is the lack of integrity verification (no checksum on the downloaded zip), which is a quality/reproducibility issue rather than a supply-chain attack vector, since the download comes directly from Apple's servers over HTTPS. The build() and package() steps use standard cmake/make. This is low severity: sloppy packaging practice (no checksum, download outside source=()) but not a genuine supply-chain risk given the source is Apple's own infrastructure.

Triggered rules

LOW AI review downgraded a static finding llm_review

The static rules flagged this MEDIUM, but an AI model (anthropic/claude-4.6-sonnet-20260217) reviewed the full PKGBUILD and judged it LOW (confidence 82%): The download is from Apple's own developer website (developer.apple.com), which is the official upstream source. The maintainer explicitly explains why it cannot be in source=(): Apple doesn't allow redistribution and the download requires browser-like headers/cookies to access. The checksum validation is commented out with an explanation that Apple frequently changes the checksum, which is sloppy but the source itself is Apple's official server. This is not an unofficial or personal host — it's the legitimate vendor. The real concern is the lack of integrity verification (no checksum on the downloaded zip), which is a quality/reproducibility issue rather than a supply-chain attack vector, since the download comes directly from Apple's servers over HTTPS. The build() and package() steps use standard cmake/make. This is low severity: sloppy packaging practice (no checksum, download outside source=()) but not a genuine supply-chain risk given the source is Apple's own infrastructure.

1 higher static finding superseded - not the current verdict (shown for transparency)
MEDIUM External download from an untrusted host, not in source=() external_download_not_in_source

curl/wget fetches a URL on a non-allowlisted host that is not part of source=(), so it is not checksum-verified by makepkg.

  • PKGBUILD:27 curl -s 'https://developer.apple.com/file/?file=security&agree=Yes' \

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: AlphaJack <alphajack at tuta dot io>
2
3pkgname="libcorecrypto"
4# when apple breaks the checksum, run
5# curl -s https://developer.apple.com/security/ | grep 'rel="/file/?file=security&agree=Yes"' | cut -d "(" -f2 | cut -d ")" -f1 | grep -o '[0-9]\+'
6pkgver=2023
7pkgrel=1
8pkgdesc="Library implementing Apple low-level cryptographic primitives"
9url="https://developer.apple.com/security/"
10license=("custom")
11arch=("x86_64" "armv7h" "aarch64")
12makedepends=("clang" "cmake" "curl" "python")
13source=("LICENSE"
14 #"corecrypto.zip.b2"
15 #"code-coverage.cmake"
16 )
17b2sums=('571233903371c819e99b2e39f4b32013b37e3c8a618d54ee27d98b0c61bfb50f702780f597e096df9d8e8e4d0ad0a4e3fcaf6949b7035796ecb5be274c1894d0')
18provides=("libcorecrypto")
19conflicts=("libcorecrypto-git")
20
21prepare(){
22 # get corecrypto.zip from apple website
23 # since apple doesn't allow redistribution of the archive, and that a canonical download link would have been too mainstream, i had to use firefox > copy as curl
24 # also the server doesn't seem to support byte ranges, so to skip the download we cannot rely on curl
25 echo "==> Retrieving corecrypto.zip from Apple (~40MB)..."
26 if [ ! -f "corecrypto.zip" ]; then
27 curl -s 'https://developer.apple.com/file/?file=security&agree=Yes' \
28 -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0' \
29 -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' \
30 -H 'Accept-Language: en-US,en;q=0.5' \
31 -H 'Accept-Encoding: gzip, deflate, br' \
32 -H 'Referer: https://developer.apple.com/security/' \
33 -H 'DNT: 1' \
34 -H 'Connection: keep-alive' \
35 -H 'Cookie: geo=US' \
36 -H 'Upgrade-Insecure-Requests: 1' \
37 -H 'Sec-Fetch-Dest: document' \
38 -H 'Sec-Fetch-Mode: navigate' \
39 -H 'Sec-Fetch-Site: same-origin' \
40 -H 'Sec-Fetch-User: ?1' \
41 -H 'Pragma: no-cache' \
42 -H 'Cache-Control: no-cache' \
43 -o "corecrypto.zip"
44 fi
45 if [ -e "corecrypto.zip" ]; then
46 echo " -> Found corecrypto.zip"
47 else
48 echo " [KO] Could not find corecrypto.zip"
49 exit 1
50 fi
51 # removing because checksum changes often
52 #echo "==> Validating corecrypto.zip with b2sums..."
53 #b2sum --check --quiet "corecrypto.zip.b2" || return 1
54 #echo " corecrypto.zip. ... Passed"
55 bsdtar --extract --file "corecrypto.zip" || exit
56 cd "corecrypto-2023"
57 install -d "scripts"
58 # missing comment character
59 sed 's| Copyright|# Copyright|' -i "CMakeLists.txt"
60 # not needed if removing all coverage entries
61 #install -D "$srcdir/code-coverage.cmake" "scripts/code-coverage.cmake"
62 sed '/coverage/d' -i "CMakeLists.txt"
63 # run cmake
64 # https://wiki.archlinux.org/title/CMake_package_guidelines
65 # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=cpprestsdk
66 CC=clang CXX=clang++ cmake -B "build" -S . \
67 -DCMAKE_BUILD_TYPE="Release" \
68 -DCMAKE_INSTALL_PREFIX="/usr" \
69 -DCMAKE_INSTALL_LIBDIR="lib" \
70 -Wno-dev
71 # avoid errors, as per https://github.com/NyaMisty/AltServer-Linux/
72 sed '/corecrypto_perf\|corecrypto_test/d' -i "build/CMakeFiles/Makefile2"
73 # avoid error, as per https://aur.archlinux.org/packages/libcorecrypto-git
74 sed 's|CC_MARK_MEMORY_PUBLIC|//&|' -i "ccrng/src/ccrng_entropy.c"
75 # not needed if removing all coverage entries
76 # avoid "error: expected expression"
77 #sed 's|^;|{};|g' -i "build/gen/corecrypto_test/include/cc_generated_test_vectors.h"
78}
79
80build(){
81 cd "corecrypto"
82 cmake --build "build" -j "$(nproc)"
83}
84
85package(){
86 cd "corecrypto"
87 make -C "build" DESTDIR="$pkgdir" install
88 install -D -m 644 "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/libcorecrypto/LICENSE"
89}
90
91

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