deer-flow-git

maintainer VVS · 0 votes · scanned 2026-08-03 00:08:14.047287
MEDIUM
View on AUR ↗
Why flagged The PKGBUILD has two genuine supply-chain concerns: (1) It pipes a shell script from astral.sh directly into sh at build time (`curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=... sh`), which is an executed installer from an external host not declared in source=() and thus not integrity-checked. While astral.sh is a well-known vendor for the 'uv' tool, the pattern is still a real risk — if astral.sh is compromised or the URL is redirected, arbitrary code runs during the build. (2) `npm install -g pnpm` fetches and installs an npm package at build time, also outside source=() with no integrity verification. Both tools (uv and pnpm) are listed only as optdepends, meaning the PKGBUILD deliberately avoids declaring them as makedepends and instead bootstraps them at build time via network fetches. This is a non-trivial supply-chain risk: executed code from external hosts with no checksum verification. The correct severity is MEDIUM — this is sloppy and risky packaging, not a clear attack, but a real concern.

Triggered rules

MEDIUM npm/yarn/pnpm install of an undeclared external package npm_install_external

Runs `npm/yarn/pnpm install <package>` for a package not in source=(), pulling unpinned, unreviewed code at build time. Severity downgraded: the package declares/looks like a Node.js consumer, where build-time installs are expected.

  • PKGBUILD:71 npm install -g --prefix="$srcdir/.local" pnpm
  • PKGBUILD:80 (cd frontend && pnpm install --frozen-lockfile 2>/dev/null || pnpm install)
MEDIUM External download from an untrusted host, not in source=() external_download_not_in_source

curl/wget fetches a URL on a non-allowlisted host that is not part of source=(), so it is not checksum-verified by makepkg.

  • PKGBUILD:66 curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="$srcdir/.local/bin" sh
MEDIUM AI review llm_review

An AI model (anthropic/claude-4.6-sonnet-20260217) reviewed this and agrees it is MEDIUM (confidence 82%): The PKGBUILD has two genuine supply-chain concerns: (1) It pipes a shell script from astral.sh directly into sh at build time (`curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR=... sh`), which is an executed installer from an external host not declared in source=() and thus not integrity-checked. While astral.sh is a well-known vendor for the 'uv' tool, the pattern is still a real risk — if astral.sh is compromised or the URL is redirected, arbitrary code runs during the build. (2) `npm install -g pnpm` fetches and installs an npm package at build time, also outside source=() with no integrity verification. Both tools (uv and pnpm) are listed only as optdepends, meaning the PKGBUILD deliberately avoids declaring them as makedepends and instead bootstraps them at build time via network fetches. This is a non-trivial supply-chain risk: executed code from external hosts with no checksum verification. The correct severity is MEDIUM — this is sloppy and risky packaging, not a clear attack, but a real concern.

PKGBUILD

3 offending line(s) highlighted
1# Maintainer: Vitaliy VVS Star <vitaliy <dot> star <at> Gmail-DOT-Com>
2
3pkgname=deer-flow-git
4pkgver=2.0_m1_rc0.r2101.ba864112a
5pkgrel=1
6pkgdesc="Deep Exploration and Efficient Research Flow — an open-source super agent harness by ByteDance"
7arch=('any')
8url="https://github.com/bytedance/deer-flow"
9license=('MIT')
10depends=(
11 'python>=3.12'
12 'nodejs>=22'
13 'nginx'
14)
15makedepends=('git' 'npm')
16optdepends=(
17 'docker: sandbox execution mode'
18 'kubernetes: sandbox execution with k8s pods'
19 'pnpm: frontend package manager (if not using corepack)'
20 'uv: python package manager (if not using pipx)'
21)
22provides=('deer-flow')
23conflicts=('deer-flow')
24source=(
25 'deer-flow::git+https://github.com/bytedance/deer-flow.git#branch=main'
26 'deer-flow-nginx.conf'
27 'deer-flow-langgraph.service'
28 'deer-flow-gateway.service'
29 'deer-flow-frontend.service'
30 'deer-flow.target'
31)
32sha256sums=('SKIP'
33 '92a63da438377d5804d25b43e4a19957411be07e36618bc130aa26bf0d69675c'
34 'a846d2b8d27a8062f811f0b4613bae976a6c14c590a2ba46855b80b4c2de5cee'
35 '9dc3bc7fcc61ccb7ae9216ed9876b6d9ea50462d52059710cfdd9416b747e45f'
36 'db2eeb2148539afda1d2bb7b0a09bd3d5f9d142f3723f5354c62cb05fff141bc'
37 '5a6317f3395de78d31a716fe24bb4ce64596fef0cdbb2fe8e052ffbf695f4e16')
38install=deer-flow.install
39
40pkgver() {
41 cd "$srcdir/deer-flow"
42 _tag=$(git tag --list 'v*' --sort=-version:refname | head -1)
43 if [ -n "$_tag" ]; then
44 _tag_ver=$(echo "$_tag" | sed 's/^v//' | tr '-' '_')
45 else
46 _tag_ver="0.0.0"
47 fi
48 _rev=$(git rev-list --count HEAD)
49 _hash=$(git rev-parse --short HEAD)
50 printf '%s.r%s.%s' "$_tag_ver" "$_rev" "$_hash"
51}
52
53prepare() {
54 cd "$srcdir/deer-flow"
55 git config --local --add safe.directory "$srcdir/deer-flow" 2>/dev/null || true
56}
57
58build() {
59 cd "$srcdir/deer-flow"
60
61 export PATH="$srcdir/.local/bin:$PATH"
62 mkdir -p "$srcdir/.local/bin"
63
64 if ! command -v uv &>/dev/null; then
65 echo "Installing uv locally..."
66 curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="$srcdir/.local/bin" sh
67 fi
68
69 if ! command -v pnpm &>/dev/null; then
70 echo "Installing pnpm locally..."
71 npm install -g --prefix="$srcdir/.local" pnpm
72 ln -sf "$srcdir/.local/lib/node_modules/.bin/pnpm" "$srcdir/.local/bin/pnpm"
73 ln -sf "$srcdir/.local/lib/node_modules/.bin/pnpx" "$srcdir/.local/bin/pnpx"
74 fi
75
76 echo "Installing backend dependencies..."
77 (cd backend && uv sync --quiet)
78
79 echo "Installing frontend dependencies and building..."
80 (cd frontend && pnpm install --frozen-lockfile 2>/dev/null || pnpm install)
81 (cd frontend && pnpm run build)
82}
83
84package() {
85 _appdir="/opt/deer-flow"
86
87 cd "$srcdir/deer-flow"
88
89 # ── Install application to /opt/deer-flow ──
90 install -dm755 "$pkgdir$_appdir"
91
92 # Copy backend (with venv and workspace packages)
93 cp -a backend "$pkgdir$_appdir/backend"
94
95 # Copy frontend (with built .next)
96 cp -a frontend "$pkgdir$_appdir/frontend"
97
98 # Copy top-level files
99 for f in Makefile config.example.yaml extensions_config.example.json .env.example; do
100 [ -f "$f" ] && install -Dm644 "$f" "$pkgdir$_appdir/$f"
101 done
102
103 # Copy scripts
104 cp -a scripts "$pkgdir$_appdir/scripts"
105
106 # Copy skills
107 cp -a skills "$pkgdir$_appdir/skills"
108
109 # Copy docs (if exists)
110 [ -d docs ] && cp -a docs "$pkgdir$_appdir/docs"
111
112 # Copy docker nginx config as reference
113 install -dm755 "$pkgdir$_appdir/docker/nginx"
114 install -Dm644 docker/nginx/nginx.local.conf "$pkgdir$_appdir/docker/nginx/nginx.local.conf"
115
116 # ── Install license ──
117 install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
118
119 # ── Install nginx config ──
120 install -Dm644 "$srcdir/deer-flow-nginx.conf" "$pkgdir/etc/nginx/sites-available/deer-flow.conf"
121
122 # ── Install systemd services ──
123 install -Dm644 "$srcdir/deer-flow-langgraph.service" "$pkgdir/usr/lib/systemd/system/deer-flow-langgraph.service"
124 install -Dm644 "$srcdir/deer-flow-gateway.service" "$pkgdir/usr/lib/systemd/system/deer-flow-gateway.service"
125 install -Dm644 "$srcdir/deer-flow-frontend.service" "$pkgdir/usr/lib/systemd/system/deer-flow-frontend.service"
126 install -Dm644 "$srcdir/deer-flow.target" "$pkgdir/usr/lib/systemd/system/deer-flow.target"
127
128 # ── Create runtime dirs ──
129 install -dm755 "$pkgdir$_appdir/logs"
130 install -dm755 "$pkgdir$_appdir/temp"
131 install -dm755 "$pkgdir$_appdir/backend/.deer-flow"
132 install -dm750 "$pkgdir/etc/deer-flow"
133 install -Dm644 /dev/stdin "$pkgdir/etc/deer-flow/config.yaml" <<<'# See /opt/deer-flow/config.example.yaml for full reference
134# Copy and edit: cp /opt/deer-flow/config.example.yaml /etc/deer-flow/config.yaml
135'
136 install -Dm600 /dev/stdin "$pkgdir/etc/deer-flow/.env" <<<'# Add your API keys here
137# OPENAI_API_KEY=sk-...
138# TAVILY_API_KEY=tvly-...
139'
140}
141

Scan history

Scanned at (UTC)SeverityRules
2026-08-03 00:08:14 MEDIUM 3
2026-08-02 00:16:08 MEDIUM 3
2026-08-01 00:11:18 MEDIUM 3
2026-07-31 00:14:10 MEDIUM 3
2026-07-30 00:17:23 MEDIUM 3
2026-07-29 00:25:53 MEDIUM 3
2026-07-28 00:07:28 MEDIUM 3
2026-07-27 00:24:32 MEDIUM 3
2026-07-26 00:07:32 MEDIUM 3
2026-07-25 00:13:44 MEDIUM 3
2026-07-24 00:02:28 MEDIUM 3
2026-07-23 00:14:47 MEDIUM 3
2026-07-22 00:29:32 MEDIUM 3
2026-07-21 00:24:15 MEDIUM 3
2026-07-20 00:19:49 MEDIUM 3
2026-07-19 00:17:08 MEDIUM 3
2026-07-18 00:14:48 MEDIUM 3
2026-07-17 00:06:16 MEDIUM 3
2026-07-16 00:05:41 MEDIUM 3
2026-07-15 00:09:25 MEDIUM 3

Report a package

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

0 / 4000
Your suggestion