spflashtool-standalone
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:12
source=("https://spflashtools.com/wp-content/uploads/SP_Flash_Tool_v${pkgver}_Linux.zip"
llm_review
An AI model (anthropic/claude-4.6-sonnet-20260217) reviewed this and agrees it is MEDIUM (confidence 72%): The package downloads a prebuilt binary ZIP from spflashtools.com, which is a third-party WordPress-based site (not the official MediaTek or official SP Flash Tool distribution channel). The binary is executed directly on the user's system (flash_tool, a native Linux executable). The Referer header requirement is a minor oddity but not inherently malicious — it's common on WordPress download sites. The sha256sum is present and pinned, which mitigates substitution risk somewhat, but the source is still an unofficial redistributor of a closed-source binary tool. This is a genuine medium-severity supply-chain concern: a prebuilt closed-source binary from an unofficial third-party host with no way to verify it matches any authoritative upstream release. The risk is real but not evidence of active malice.
PKGBUILD
1 offending line(s) highlightedpkgname=spflashtool-standalone
_pkgname=spflashtool
pkgver="5.2044"
pkgrel=1
pkgdesc="SP Flash Tool is an application to flash your MediaTek (MTK) SmartPhone. (standalone)"
arch=('x86_64')
url="https://spflashtools.com/category/linux"
license=('unknown')
makedepends=('gendesk')
provides=('spflashtool')
conflicts=('spflashtool' 'spflashtool-bin' 'spflashtool-noqtdeps')
source=("https://spflashtools.com/wp-content/uploads/SP_Flash_Tool_v${pkgver}_Linux.zip"
'spflashtool.png')
sha256sums=('3d0c08f3c4a46abbd79bdbb1b9cd1d44410d95da8afec2327d079538f19c2199'
'fe0b9c1de77c687623bfc07733041d1387f755493cdf904e6afcb47f784d34c7')
# Workaround for source file download, which requires the 'Referer' header to be set
DLAGENTS=('https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -e '"${url}"' -o %o %u')
prepare() {
# Create .desktop file.
gendesk -f -n \
--pkgname "${_pkgname}" \
--pkgdesc "${pkgdesc}" \
--name "SP Flash Tool" \
--genericname "Firmware Flasher" \
--comment "MediaTek (MTK) Firmware Flasher" \
--exec "/usr/bin/${_pkgname}" \
--categories "System;"
}
package() {
# Install files
mkdir -p "${pkgdir}/opt/${_pkgname}/"
bsdtar -xf "SP_Flash_Tool_v${pkgver}_Linux.zip" -C "${pkgdir}/opt/${_pkgname}/" --strip-components=1
# Overwrite flash_tool.sh
echo '#!/usr/bin/env sh
execfile=$(readlink -f "$0" | sed "s/\.sh$//")
dirname=$(dirname "$execfile")
LD_LIBRARY_PATH="$dirname":"$dirname/lib"
export LD_LIBRARY_PATH
"$execfile" "$@"' \
> "${pkgdir}/opt/${_pkgname}/flash_tool.sh"
# Mark the binaries as executable
chmod +x "${pkgdir}/opt/${_pkgname}/"{flash_tool,flash_tool.sh,bin/assistant}
# Excutable in PATH
mkdir -p "${pkgdir}/usr/bin/"
ln -sf "/opt/${_pkgname}/flash_tool.sh" "${pkgdir}/usr/bin/${_pkgname}"
# Desktop file and icon
install -Dm644 "${srcdir}/${_pkgname}.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
install -Dm644 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
# Remove udev rule (package modemmanager contains this rule)
rm "${pkgdir}/opt/${_pkgname}/99-ttyacms.rules"
}
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 |