viisan-vf3240-sane-driver

MEDIUM
maintainer shoenot 0 votes scanned 2026-08-27 09:33:21.393967
View on AUR
Why flagged

Installs a prebuilt proprietary binary SANE driver (.deb extracted) from an Aliyun OSS bucket (viisan.oss-us-west-1.aliyuncs.com) which, while plausibly the vendor's own CDN, is an object-storage URL that could be silently swapped; the binary runs with SANE privileges and includes bundled shared libraries (libopencv, libviisanvf3240dr.so). The checksum is present and pinned, which mitigates but does not eliminate the supply-chain risk of an unverifiable proprietary prebuilt.

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:11 source=("viisan-vf3240-${pkgver}.zip::https://viisan.oss-us-west-1.aliyuncs.com/en/file/t91/VF3240%20Linux%20sane%20driver%20${pkgver}.zip")
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.

Medium AI review llm_review

An AI model (anthropic/claude-sonnet-4.6) reviewed this and agrees it is MEDIUM (confidence 70%): Installs a prebuilt proprietary binary SANE driver (.deb extracted) from an Aliyun OSS bucket (viisan.oss-us-west-1.aliyuncs.com) which, while plausibly the vendor's own CDN, is an object-storage URL that could be silently swapped; the binary runs with SANE privileges and includes bundled shared libraries (libopencv, libviisanvf3240dr.so). The checksum is present and pinned, which mitigates but does not eliminate the supply-chain risk of an unverifiable proprietary prebuilt.

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Shurjo <mail@shurjo.me>
2pkgname=viisan-vf3240-sane-driver
3pkgver=1.0.2.0
4pkgrel=2
5pkgdesc="SANE driver for the Viisan VF3240 A3 Flatbed scanner"
6arch=('x86_64')
7url="https://www.viisan.com/en/product/VF3240.html"
8license=('proprietary')
9depends=('sane' 'libusb' 'opencv')
10options=('!debug' '!strip')
11source=("viisan-vf3240-${pkgver}.zip::https://viisan.oss-us-west-1.aliyuncs.com/en/file/t91/VF3240%20Linux%20sane%20driver%20${pkgver}.zip")
12sha256sums=('680d4c583400f935a2671f1c9a3be9425b9d0becb5b6beebf4918558aa369edc')
13
14prepare() {
15 cd "${srcdir}"/VF3240*
16
17 msg2 "Extracting inner Debian package..."
18 bsdtar -xf "viisan-vf3240-sane_${pkgver}_amd64.deb"
19
20 msg2 "Unpacking data payload..."
21 bsdtar -xf data.tar.*
22}
23
24package() {
25 cd "${srcdir}"/VF3240*
26
27 # 1. Base Installation Loop
28 msg2 "Installing files to package root..."
29 for dir in etc usr lib; do
30 if [[ -d "$dir" ]]; then
31 cp -dr --no-preserve=ownership "$dir" "${pkgdir}/"
32 fi
33 done
34
35 if [[ -d "${pkgdir}/lib" ]]; then
36 msg2 "Moving /lib to /usr/lib..."
37 install -dm755 "${pkgdir}/usr/lib"
38 cp -dr --no-preserve=ownership "${pkgdir}/lib/"* "${pkgdir}/usr/lib/"
39 rm -rf "${pkgdir}/lib"
40 fi
41
42 # 2. Extract and Map Precompiled Files from /usr/local Target Paths
43 if [[ -d "${pkgdir}/usr/local" ]]; then
44 msg2 "Normalizing /usr/local to /usr..."
45 if [[ -d "${pkgdir}/usr/local/lib64" ]]; then
46 install -dm755 "${pkgdir}/usr/lib"
47 cp -dr --no-preserve=ownership "${pkgdir}/usr/local/lib64/"* "${pkgdir}/usr/lib/"
48 fi
49 if [[ -d "${pkgdir}/usr/local/lib" ]]; then
50 install -dm755 "${pkgdir}/usr/lib"
51 cp -dr --no-preserve=ownership "${pkgdir}/usr/local/lib/"* "${pkgdir}/usr/lib/"
52 fi
53 rm -rf "${pkgdir}/usr/local"
54 fi
55
56 # 3. Handle Modern Udev System Policies
57 if [[ -d "${pkgdir}/etc/udev/rules.d" ]]; then
58 msg2 "Moving udev rules to /usr/lib/udev/rules.d..."
59 install -dm755 "${pkgdir}/usr/lib/udev/rules.d"
60 mv "${pkgdir}/etc/udev/rules.d/"* "${pkgdir}/usr/lib/udev/rules.d/"
61 rm -rf "${pkgdir}/etc/udev/rules.d"
62 rmdir --ignore-fail-on-non-empty "${pkgdir}/etc/udev"
63 fi
64
65 # 4. Configure SANE Drop-ins and Main Device Driver Maps
66 msg2 "Adding SANE dll.d drop-in configuration..."
67 install -dm755 "${pkgdir}/etc/sane.d/dll.d"
68 echo "aviisandrvf3240" > "${pkgdir}/etc/sane.d/dll.d/${pkgname}"
69
70 msg2 "Generating main standalone backend configuration map..."
71 install -dm755 "${pkgdir}/etc/sane.d"
72 cat <<EOF > "${pkgdir}/etc/sane.d/aviisandrvf3240.conf"
73# Viisan VF3240 Configuration File
74usb 0x2e5a 0xd011
75EOF
76
77 # 5. Fix Hardcoded Hardcoded Binary Directory Lookups
78 msg2 "Re-building structural /usr/local paths to pass hardcoded validations..."
79
80 # Satisfy the /usr/local/etc configuration lookups
81 install -dm755 "${pkgdir}/usr/local/etc"
82 ln -sf /etc/sane.d/aviisandrvf3240.conf "${pkgdir}/usr/local/etc/aviisandrvf3240.conf"
83
84 # Satisfy the hardcoded /usr/local/lib64 library check seen in strace
85 install -dm755 "${pkgdir}/usr/local/lib64/sane/aviisandr-adv"
86 ln -sf /usr/lib/sane/aviisandr-adv/VF3240 "${pkgdir}/usr/local/lib64/sane/aviisandr-adv/VF3240"
87
88 # 6. Build Direct System Symlinks for standard environment tracking
89 msg2 "Linking nested aviisandr-adv libraries out to standard library paths..."
90 local adv_dir="/usr/lib/sane/aviisandr-adv/VF3240"
91 ln -sf "${adv_dir}/libviisanvf3240dr.so" "${pkgdir}/usr/lib/libviisanvf3240dr.so"
92 ln -sf "${adv_dir}/libopencv_core.so.2.4" "${pkgdir}/usr/lib/libopencv_core.so.2.4"
93 ln -sf "${adv_dir}/libopencv_core.so.2.4.11" "${pkgdir}/usr/lib/libopencv_core.so.2.4.11"
94
95 # 7. Package Permission Tree Pass Overrides
96 msg2 "Fixing tree file permissions..."
97 find "${pkgdir}" -type d -exec chmod 755 {} +
98 find "${pkgdir}" -type f -exec chmod 644 {} +
99 find "${pkgdir}/usr/lib" -type f \( -name "*.so*" -o -name "*.so" \) -exec chmod 755 {} + 2>/dev/null || true
100}
101
102

Scan history

Scanned at (UTC)SeverityRules
2026-08-27 09:33:21 Medium 3
2026-08-27 09:31:53 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