tradingview
maintainer xiota
· 37 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The package downloads a Snap file from the official Snapcraft API and extracts it; this is a standard, verifiable source for official software, not a swappable host, and the binary content is from the project's own distribution, making the risk low despite the non-whitelisted domain.
Triggered rules
LOW
AI review downgraded a static finding
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) 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, verifiable source for official software, not a swappable host, and the binary content is from the project's own distribution, making the risk low despite the non-whitelisted domain.
1 higher static finding superseded - not the current verdict (shown for transparency)
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:31
"$_pkgsrc.snap"::"https://api.snapcraft.io/api/v1/snaps/download/${_snap_id}_${_snap_rev}.snap" -
PKGBUILD:32
"$_terms_of_use.html"::"https://www.tradingview.com/policies/"
PKGBUILD
2 offending line(s) highlighted
1
# Maintainer:
2
# Contributor: Ivan Gabaldon <aur[at]inetol.net>
3
# Contributor: archlinuxbits <archlinuxbits at proton.me>
4
5
: ${_snap_id:=nJdITJ6ZJxdvfu8Ch7n5kH5P99ClzBYV}
6
: ${_snap_rev:=72}
7
8
_pkgname="tradingview"
9
pkgname="$_pkgname"
10
pkgver=3.3.0
11
pkgrel=1
12
pkgdesc='Charting platform for traders and investors'
13
arch=('x86_64')
14
url="https://www.tradingview.com/desktop/"
15
license=('LicenseRef-TradingView')
16
17
depends=(
18
'libsecret'
19
)
20
makedepends=(
21
'html-xml-utils'
22
'squashfs-tools'
23
'w3m'
24
)
25
26
options=('!debug' '!strip')
27
28
_terms_of_use="$_pkgname-$pkgver-$_snap_rev-eula"
29
_pkgsrc="$_pkgname-$pkgver-$_snap_rev"
30
source=(
31
"$_pkgsrc.snap"::"https://api.snapcraft.io/api/v1/snaps/download/${_snap_id}_${_snap_rev}.snap"
32
"$_terms_of_use.html"::"https://www.tradingview.com/policies/"
33
)
34
sha256sums=(
35
'e4343ff1a62a67a75f05720d4762392f44fa0c70ecf4858049366632043bf118'
36
'SKIP'
37
)
38
39
prepare() {
40
hxextract .tv-policies "$_terms_of_use.html" \
41
1> "$_terms_of_use-2.html" \
42
2> /dev/null
43
44
w3m -O UTF-8 -cols 80 -dump "$_terms_of_use-2.html" > "$_terms_of_use.txt"
45
46
# unpack
47
mkdir -p "$_pkgsrc"
48
unsquashfs -q -n -f -d "$_pkgsrc/" "$_pkgsrc.snap"
49
}
50
51
package() {
52
local _electron_version=$(strings "$_pkgsrc/tradingview" | grep -Pom1 'Electron/\K[0-9]+')
53
depends+=("electron${_electron_version}")
54
55
# asar
56
mkdir -pm755 "$pkgdir/usr/lib/$_pkgname"
57
cp -r "$_pkgsrc/resources/"* "$pkgdir/usr/lib/$_pkgname/"
58
59
# launcher
60
sed -E -e '/^Comment=/d' \
61
-e 's&^(Icon)=.*$&\1='"$_pkgname&" \
62
-e 's&^(Categories)=(Finance;)$&\1=Office;\2&' \
63
-i "$_pkgsrc/meta/gui/$_pkgname.desktop"
64
65
install -Dm644 "$_pkgsrc/meta/gui/$_pkgname.desktop" -t "$pkgdir/usr/share/applications/"
66
67
# icon
68
install -Dm644 "$_pkgsrc/meta/gui/icon.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/$_pkgname.png"
69
70
# license
71
install -Dm644 "$_terms_of_use.txt" -t "$pkgdir/usr/share/licenses/$pkgname/"
72
73
# script
74
install -Dm755 /dev/stdin "$pkgdir/usr/bin/$_pkgname" << END
75
#!/usr/bin/env bash
76
77
name=$_pkgname
78
flags_file="\${XDG_CONFIG_HOME:-\$HOME/.config}/\${name}-flags.conf"
79
80
lines=()
81
if [[ -f "\${flags_file}" ]]; then
82
mapfile -t lines < "\${flags_file}"
83
fi
84
85
flags=()
86
for line in "\${lines[@]}"; do
87
if [[ ! "\${line}" =~ ^[[:space:]]*#.* ]] && [[ -n "\${line}" ]]; then
88
flags+=("\${line}")
89
fi
90
done
91
92
: \${ELECTRON_IS_DEV:=0}
93
export ELECTRON_IS_DEV
94
: \${ELECTRON_FORCE_IS_PACKAGED:=true}
95
export ELECTRON_FORCE_IS_PACKAGED
96
97
exec electron${_electron_version} "\${flags[@]}" "/usr/lib/$_pkgname/app.asar" "\$@"
98
END
99
}
100
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | LOW | 2 |
| 2026-08-02 00:16:08 | LOW | 2 |
| 2026-08-01 00:11:18 | LOW | 2 |
| 2026-07-31 00:14:10 | LOW | 2 |
| 2026-07-30 00:17:23 | LOW | 2 |
| 2026-07-29 00:25:53 | LOW | 2 |
| 2026-07-28 00:07:28 | LOW | 2 |
| 2026-07-27 00:24:32 | LOW | 2 |
| 2026-07-26 00:07:32 | LOW | 2 |
| 2026-07-25 00:13:44 | LOW | 2 |
| 2026-07-24 00:02:28 | LOW | 2 |
| 2026-07-23 00:14:47 | LOW | 2 |
| 2026-07-22 00:29:32 | LOW | 2 |
| 2026-07-21 00:24:15 | LOW | 2 |
| 2026-07-20 00:19:49 | LOW | 2 |
| 2026-07-19 00:17:08 | LOW | 2 |
| 2026-07-18 00:14:48 | LOW | 2 |
| 2026-07-17 00:06:16 | LOW | 2 |
| 2026-07-16 00:05:41 | LOW | 2 |
| 2026-07-15 00:09:25 | LOW | 2 |