shamela-native
Triggered rules
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:21
"shamela-linux-${pkgver}.tar.xz::https://archive.org/download/shamela_download/shamela-linux-${pkgver}.tar.xz"
llm_review
An AI model (anthropic/claude-4.6-sonnet-20260217) reviewed this and agrees it is MEDIUM (confidence 72%): The PKGBUILD downloads a prebuilt AppImage (inside a tar.xz) from archive.org — a third-party mirror/archive host rather than the official shamela.ws distribution channel. The AppImage is then executed during the prepare() phase (`./shamela.AppImage --appimage-extract`) to extract its squashfs contents. This means arbitrary code bundled in the AppImage runs at build time. While archive.org is a reputable hosting service and a sha1sum is provided (though SHA-1 is weak), the source is not the official vendor host, making this a genuine supply-chain concern: if the archive.org copy were replaced or tampered with, the sha1sum check would be the only guard (and SHA-1 is collision-vulnerable). Additionally, shamela.py is sourced locally (SKIP checksum) and installed as an executable wrapper, which is another unverified code vector. The combination of an executed binary from a non-official host with a weak/skipped integrity check justifies a MEDIUM rating.
PKGBUILD
1 offending line(s) highlightedpkgname=shamela-native
pkgver=1447.11
pkgrel=3
pkgdesc="Al-Maktaba Al-Shamela — Arabic and Islamic digital library"
arch=('x86_64')
url="https://shamela.ws"
license=('LicenseRef-shamela')
depends=(
'fuse2'
'libselinux'
'libxcrypt-compat'
'python'
)
makedepends=(
'squashfs-tools'
)
conflicts=('shamela' 'shamela-bin')
options=('!strip')
source=(
"shamela.py"
"shamela-linux-${pkgver}.tar.xz::https://archive.org/download/shamela_download/shamela-linux-${pkgver}.tar.xz"
)
sha1sums=(
'SKIP'
'cbe0e8282bd8470b1a30c8bb55be9fc205b8f394'
)
prepare() {
cd "${srcdir}/shamela"
# ── Extract squashfs from the AppImage (requires FUSE) ────────────────
# AppImage extraction uses the built-in --appimage-extract mechanism
chmod +x shamela.AppImage
./shamela.AppImage --appimage-extract
sed -i '/^Exec=/c\Exec=/usr/bin/shamela' squashfs-root/shamela.desktop
}
package() {
# ── Upstream tarball seed (/opt) ─────────────────────────────────────
# Store the upstream tar.xz as-is for first-run seeding by /usr/bin/shamela
install -d "${pkgdir}/opt/shamela"
install -Dm644 "${srcdir}/shamela-linux-${pkgver}.tar.xz" \
"${pkgdir}/opt/shamela/shamela.tar.xz"
# ── Wrapper / lifecycle manager (/usr/bin) ─────────────────────────────
install -Dm755 shamela.py \
"${pkgdir}/usr/bin/shamela"
# ── System .desktop entry (/usr/share/applications) ───────────────────
# The app's own shortcut generation is suppressed at first seed via a
# settings db patch (shortcut_desktop=false, shortcut_start=false in
# database/user/data.db), making this the permanent and only .desktop
install -Dm644 "${srcdir}/shamela/squashfs-root/shamela.desktop" \
"${pkgdir}/usr/share/applications/shamela.desktop"
# System icon (96×96 RGBA PNG, extracted from AppImage squashfs)
# Referenced as Icon=shamela in the .desktop file
install -Dm644 \
"${srcdir}/shamela/squashfs-root/usr/share/icons/hicolor/96x96/apps/shamela.png" \
"${pkgdir}/usr/share/icons/hicolor/96x96/apps/shamela.png"
# ── Licenses ───────────────────────────────────────────────────────────
install -Dm644 \
shamela/app/linux/64/jre/2/legal/java.base/LICENSE \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 \
shamela/app/linux/64/jre/2/legal/java.base/ADDITIONAL_LICENSE_INFO \
"${pkgdir}/usr/share/licenses/${pkgname}/ADDITIONAL_LICENSE_INFO"
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | MEDIUM | 2 |
| 2026-08-02 00:16:08 | MEDIUM | 2 |
| 2026-08-01 00:11:18 | MEDIUM | 2 |
| 2026-07-31 00:14:10 | MEDIUM | 2 |
| 2026-07-30 00:17:23 | MEDIUM | 2 |
| 2026-07-29 00:25:53 | MEDIUM | 2 |
| 2026-07-28 00:07:28 | MEDIUM | 2 |
| 2026-07-27 00:24:32 | MEDIUM | 2 |
| 2026-07-26 00:07:32 | MEDIUM | 2 |
| 2026-07-25 00:13:44 | MEDIUM | 2 |
| 2026-07-24 00:02:28 | MEDIUM | 2 |
| 2026-07-23 00:14:47 | MEDIUM | 2 |
| 2026-07-22 00:29:32 | MEDIUM | 2 |
| 2026-07-21 00:24:15 | MEDIUM | 2 |
| 2026-07-20 00:19:49 | MEDIUM | 2 |
| 2026-07-19 00:17:08 | MEDIUM | 2 |
| 2026-07-18 00:14:48 | MEDIUM | 2 |
| 2026-07-17 00:06:16 | MEDIUM | 2 |
| 2026-07-16 00:05:41 | MEDIUM | 2 |
| 2026-07-15 00:09:25 | MEDIUM | 2 |