drivesync-git

MEDIUM
maintainer orphaned 2 votes scanned 2026-09-17 00:27:14.276658
broken
View on AUR
Why flagged

The PKGBUILD has multiple serious issues. First, it runs `gem install bundler` and `bundle install` during build without pinned versions or checksums for the gems fetched, creating a genuine supply-chain risk since arbitrary gem versions could be pulled from rubygems.org at build time. Second, the package() function is clearly broken: it writes to ~/.bashrc (modifying user state from a package function is wrong), uses `mv -T` to move the source to /tmp (not $pkgdir), and never installs anything into $pkgdir, so the package would be empty. The `if [ ! -d /opt/drivesync ]` check also references a path that is never created. The supply-chain concern (unpinned gem installs executing arbitrary code) is a real medium-severity issue, not a false positive, though the broken packaging means it likely never successfully installs anyway.

Triggered rules

Medium External install via pipx/uv/poetry/cargo/go/gem alt_pkg_manager_install

A non-pip/npm package manager (pipx, uv, poetry, cargo install, go install, gem, conda…) fetches and builds an external package at build time, outside source=() and makepkg's checksums.

  • PKGBUILD:22 gem install bundler
Medium AI review llm_review

An AI model (anthropic/claude-4.6-sonnet-20260217) reviewed this and agrees it is MEDIUM (confidence 80%): The PKGBUILD has multiple serious issues. First, it runs `gem install bundler` and `bundle install` during build without pinned versions or checksums for the gems fetched, creating a genuine supply-chain risk since arbitrary gem versions could be pulled from rubygems.org at build time. Second, the package() function is clearly broken: it writes to ~/.bashrc (modifying user state from a package function is wrong), uses `mv -T` to move the source to /tmp (not $pkgdir), and never installs anything into $pkgdir, so the package would be empty. The `if [ ! -d /opt/drivesync ]` check also references a path that is never created. The supply-chain concern (unpinned gem installs executing arbitrary code) is a real medium-severity issue, not a false positive, though the broken packaging means it likely never successfully installs anyway.

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Nahuel Morata <nahuelmorata@gmail.com>
2pkgname=drivesync-git
3_origname="drivesync"
4pkgver=1.4.0.r0.g1124fc6
5pkgrel=1
6pkgdesc="A command line utility that synchronizes your Google Drive files with a local folder on your machine"
7arch=('any')
8url="https://github.com/MStadlmeier/drivesync"
9license=('MIT')
10depends=("ruby")
11provides=("drivesync")
12install=.INSTALL
13source=("$pkgname::git+https://github.com/MStadlmeier/drivesync.git")
14md5sums=("SKIP")
15
16pkgver() {
17 cd "$pkgname"
18 git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
19}
20
21prepare() {
22 gem install bundler
23}
24
25build() {
26 cd "$pkgname"
27 ~/.gem/ruby/$(ls ~/.gem/ruby | tail -n 1)/bin/bundle install
28}
29
30package() {
31 if [ ! -d /opt/drivesync ]; then
32 echo "alias drivesync='ruby /opt/drivesync/drivesync.rb'" >> ~/.bashrc
33 fi
34
35 mv -T $pkgname /tmp/drivesync
36}
37

Scan history

Scanned at (UTC)SeverityRules
2026-09-17 00:27:14 Medium 2
2026-09-16 00:03:17 Medium 2
2026-09-15 00:25:31 Medium 2
2026-09-14 00:27:57 Medium 2
2026-09-13 00:19:54 Medium 2
2026-09-12 00:25:17 Medium 2
2026-09-11 00:19:22 Medium 2
2026-09-10 00:22:44 Medium 2
2026-09-09 00:04:09 Medium 2
2026-09-08 00:18:08 Medium 2
2026-09-07 00:30:15 Medium 2
2026-09-06 00:17:06 Medium 2
2026-09-05 00:16:27 Medium 2
2026-09-04 00:03:13 Medium 2
2026-09-03 00:15:47 Medium 2
2026-09-02 00:02:31 Medium 2
2026-09-01 00:11:19 Medium 2
2026-08-31 00:19:57 Medium 2
2026-08-30 00:04:14 Medium 2
2026-08-29 00:29:17 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