spflashtool-standalone

maintainer orphaned · 4 votes · scanned 2026-08-03 00:08:14.047287
MEDIUM
View on AUR ↗
Why flagged 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.

Triggered rules

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:12 source=("https://spflashtools.com/wp-content/uploads/SP_Flash_Tool_v${pkgver}_Linux.zip"
MEDIUM AI review 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) highlighted
1pkgname=spflashtool-standalone
2_pkgname=spflashtool
3pkgver="5.2044"
4pkgrel=1
5pkgdesc="SP Flash Tool is an application to flash your MediaTek (MTK) SmartPhone. (standalone)"
6arch=('x86_64')
7url="https://spflashtools.com/category/linux"
8license=('unknown')
9makedepends=('gendesk')
10provides=('spflashtool')
11conflicts=('spflashtool' 'spflashtool-bin' 'spflashtool-noqtdeps')
12source=("https://spflashtools.com/wp-content/uploads/SP_Flash_Tool_v${pkgver}_Linux.zip"
13 'spflashtool.png')
14sha256sums=('3d0c08f3c4a46abbd79bdbb1b9cd1d44410d95da8afec2327d079538f19c2199'
15 'fe0b9c1de77c687623bfc07733041d1387f755493cdf904e6afcb47f784d34c7')
16
17# Workaround for source file download, which requires the 'Referer' header to be set
18DLAGENTS=('https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -e '"${url}"' -o %o %u')
19
20prepare() {
21 # Create .desktop file.
22 gendesk -f -n \
23 --pkgname "${_pkgname}" \
24 --pkgdesc "${pkgdesc}" \
25 --name "SP Flash Tool" \
26 --genericname "Firmware Flasher" \
27 --comment "MediaTek (MTK) Firmware Flasher" \
28 --exec "/usr/bin/${_pkgname}" \
29 --categories "System;"
30}
31
32package() {
33 # Install files
34 mkdir -p "${pkgdir}/opt/${_pkgname}/"
35 bsdtar -xf "SP_Flash_Tool_v${pkgver}_Linux.zip" -C "${pkgdir}/opt/${_pkgname}/" --strip-components=1
36
37 # Overwrite flash_tool.sh
38 echo '#!/usr/bin/env sh
39
40execfile=$(readlink -f "$0" | sed "s/\.sh$//")
41dirname=$(dirname "$execfile")
42
43LD_LIBRARY_PATH="$dirname":"$dirname/lib"
44export LD_LIBRARY_PATH
45
46"$execfile" "$@"' \
47 > "${pkgdir}/opt/${_pkgname}/flash_tool.sh"
48
49 # Mark the binaries as executable
50 chmod +x "${pkgdir}/opt/${_pkgname}/"{flash_tool,flash_tool.sh,bin/assistant}
51
52 # Excutable in PATH
53 mkdir -p "${pkgdir}/usr/bin/"
54 ln -sf "/opt/${_pkgname}/flash_tool.sh" "${pkgdir}/usr/bin/${_pkgname}"
55
56 # Desktop file and icon
57 install -Dm644 "${srcdir}/${_pkgname}.png" "${pkgdir}/usr/share/pixmaps/${_pkgname}.png"
58 install -Dm644 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
59
60 # Remove udev rule (package modemmanager contains this rule)
61 rm "${pkgdir}/opt/${_pkgname}/99-ttyacms.rules"
62}
63

Scan history

Scanned at (UTC)SeverityRules
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

Report a package

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

0 / 4000
Your suggestion