tradingview
The package downloads a Snap file from the official Snapcraft API and extracts it; this is a standard source for Snap packages, and the download is used to build the package locally without executing untrusted remote code.
Triggered rules
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package downloads a Snap file from the official Snapcraft API and extracts it; this is a standard source for Snap packages, and the download is used to build the package locally without executing untrusted remote code.
1 higher static finding superseded - not the current verdict (shown for transparency)
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:33
"$_pkgsrc.snap"::"https://api.snapcraft.io/api/v1/snaps/download/${_snap_id}_${_snap_rev}.snap" -
PKGBUILD:34
"$_terms_of_use.html"::"https://www.tradingview.com/policies/"
PKGBUILD
2 offending line(s) highlighted# Maintainer:
# Contributor: Ivan Gabaldon <aur[at]inetol.net>
# Contributor: archlinuxbits <archlinuxbits at proton.me>
: ${_snap_id:=nJdITJ6ZJxdvfu8Ch7n5kH5P99ClzBYV}
: ${_snap_rev:=72}
: ${_use_system_electron:=false}
_pkgname="tradingview"
pkgname="$_pkgname"
pkgver=3.3.0
pkgrel=2
pkgdesc='Charting platform for traders and investors'
arch=('x86_64')
url="https://www.tradingview.com/desktop/"
license=('LicenseRef-TradingView')
depends=(
'libsecret'
)
makedepends=(
'html-xml-utils'
'squashfs-tools'
'w3m'
)
options=('!debug' '!strip')
_terms_of_use="$_pkgname-$pkgver-$_snap_rev-eula"
_pkgsrc="$_pkgname-$pkgver-$_snap_rev"
source=(
"$_pkgsrc.snap"::"https://api.snapcraft.io/api/v1/snaps/download/${_snap_id}_${_snap_rev}.snap"
"$_terms_of_use.html"::"https://www.tradingview.com/policies/"
)
sha256sums=(
'e4343ff1a62a67a75f05720d4762392f44fa0c70ecf4858049366632043bf118'
'SKIP'
)
prepare() {
hxextract .tv-policies "$_terms_of_use.html" \
1> "$_terms_of_use-2.html" \
2> /dev/null
w3m -O UTF-8 -cols 80 -dump "$_terms_of_use-2.html" > "$_terms_of_use.txt"
# unpack
mkdir -p "$_pkgsrc"
unsquashfs -q -n -f -d "$_pkgsrc/" "$_pkgsrc.snap"
}
_package_system() {
local _electron_version=$(strings "$_pkgsrc/tradingview" | grep -Pom1 'Electron/\K[0-9]+')
depends+=("electron${_electron_version}")
# asar
mkdir -pm755 "$pkgdir/usr/lib/$_pkgname"
cp -r "$_pkgsrc/resources/"* "$pkgdir/usr/lib/$_pkgname/"
# script
install -Dm755 /dev/stdin "$pkgdir/usr/bin/$_pkgname" << END
#!/usr/bin/env bash
name=$_pkgname
flags_file="\${XDG_CONFIG_HOME:-\$HOME/.config}/\${name}-flags.conf"
lines=()
if [[ -f "\${flags_file}" ]]; then
mapfile -t lines < "\${flags_file}"
fi
flags=()
for line in "\${lines[@]}"; do
if [[ ! "\${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "\${line}" ]]; then
flags+=("\${line}")
fi
done
: \${ELECTRON_IS_DEV:=0}
export ELECTRON_IS_DEV
: \${ELECTRON_FORCE_IS_PACKAGED:=true}
export ELECTRON_FORCE_IS_PACKAGED
exec electron${_electron_version} "\${flags[@]}" "/usr/lib/$_pkgname/app.asar" "\$@"
END
}
_package_vendored() {
mkdir -pm755 "$pkgdir/usr/lib/$_pkgname"
cp -r "$_pkgsrc/"* "$pkgdir/usr/lib/$_pkgname/"
mkdir -pm755 "$pkgdir/usr/bin"
ln -s "/usr/lib/$_pkgname/tradingview" "$pkgdir/usr/bin/"
}
_package_common() {
# launcher
sed -E -e '/^Comment=/d' \
-e 's&^(Icon)=.*$&\1='"$_pkgname&" \
-e 's&^(Categories)=(Finance;)$&\1=Office;\2&' \
-i "$_pkgsrc/meta/gui/$_pkgname.desktop"
install -Dm644 "$_pkgsrc/meta/gui/$_pkgname.desktop" -t "$pkgdir/usr/share/applications/"
# icon
install -Dm644 "$_pkgsrc/meta/gui/icon.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/$_pkgname.png"
# license
install -Dm644 "$_terms_of_use.txt" -t "$pkgdir/usr/share/licenses/$pkgname/"
}
if [[ "${_use_system_electron::1}" == "t" ]]; then
eval "package() {
$(declare -f _package_system | tail +2)
$(declare -f _package_common | tail +2)
}"
else
eval "package() {
$(declare -f _package_vendored | tail +2)
$(declare -f _package_common | tail +2)
}"
fi
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-11-01 00:21:48 | Low | 2 |
| 2026-10-31 00:07:41 | Low | 2 |
| 2026-10-30 00:29:30 | Low | 2 |
| 2026-10-29 00:13:55 | Low | 2 |
| 2026-10-28 00:06:54 | Low | 2 |
| 2026-10-27 00:23:28 | Low | 2 |
| 2026-10-26 00:12:40 | Low | 2 |
| 2026-10-25 00:20:48 | Low | 2 |
| 2026-10-24 00:14:55 | Low | 2 |
| 2026-10-23 00:02:19 | Low | 2 |
| 2026-10-22 00:13:10 | Low | 2 |
| 2026-10-21 00:12:50 | Low | 2 |
| 2026-10-20 00:10:31 | Low | 2 |
| 2026-10-19 00:03:55 | Low | 2 |
| 2026-10-18 00:06:55 | Low | 2 |
| 2026-10-17 00:21:55 | Low | 2 |
| 2026-10-16 00:12:47 | Low | 2 |
| 2026-10-15 00:28:05 | Low | 2 |
| 2026-10-14 00:06:47 | Low | 2 |
| 2026-10-13 00:23:45 | Low | 2 |