matomo
LOW
maintainer Spixmaster
0 votes
scanned 2026-11-01 00:21:48.120785
Why flagged
The external download is a geolocation database (non-executable data) from a known provider, used at build time; worst case is data inaccuracy, not code execution.
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-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The external download is a geolocation database (non-executable data) from a known provider, used at build time; worst case is data inaccuracy, not code execution.
1 higher static finding superseded - not the current verdict (shown for transparency)
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:113
while [[ "$(curl -o /dev/null/ -sw "%{http_code}" https://download.db-ip.com/free/dbip-city-lite-"${_current_year}"-"${_current_month}".mmdb.gz || true)" != "200" ]]; do -
PKGBUILD:133
curl -o "${srcdir}"/DBIP-City.mmdb.gz https://download.db-ip.com/free/dbip-city-lite-"${_current_year}"-"${_current_month}".mmdb.gz
PKGBUILD
2 offending line(s) highlighted
1
#!/usr/bin/env bash
2
# shellcheck disable=SC2034
3
# shellcheck disable=SC2154
4
# The PKGBUILD for Matomo.
5
# Maintainer: Matheus <matheusgwdl@protonmail.com>
6
# Contributor: Matheus <matheusgwdl@protonmail.com>
7
8
declare -r _tag="2ecd53d2b3ebf9a1543f67600acc43fc06c91e3e"
9
10
pkgname="matomo"
11
pkgver="5.14.2"
12
pkgrel="1"
13
pkgdesc="A powerful web analytics platform."
14
arch=("x86_64")
15
url="https://github.com/matomo-org/${pkgname}"
16
license=("GPL-3.0-or-later")
17
depends=("bash" "gcc-libs" "glibc" "lib32-glibc" "mariadb" "nodejs" "perl" "php" "php-gd" "python" "python-beautifulsoup4" "python-requests" "python-yaml" "rhino")
18
makedepends=("composer" "curl" "git" "git-lfs" "npm")
19
checkdepends=("alsa-lib" "at-spi2-core" "cairo" "coffeescript" "dbus" "expat" "glib2" "gtk3" "java-runtime" "libcups" "libdrm" "libx11" "libxcb" "libxcomposite" "libxdamage" "libxext" "libxfixes" "libxkbcommon" "libxrandr" "libxshmfence" "mesa" "nspr" "nss" "pango" "ruby")
20
optdepends=("apache: HTTP server."
21
"certbot: Creates SSL certificates."
22
"mod_fcgid: FastCGI."
23
"nginx: HTTP server."
24
"php-cgi: CGI."
25
"php-fpm: FastCGI."
26
"php-legacy-cgi: CGI."
27
"php-legacy-fpm: FastCGI."
28
"spawn-fcgi: FastCGI."
29
"uwsgi-plugin-php: CGI."
30
"uwsgi-plugin-php-legacy: CGI."
31
)
32
provides=("${pkgname}")
33
conflicts=("matomo-bin")
34
options=("!strip")
35
install="${pkgname}.install"
36
source=("${pkgname}::git+${url}.git#tag=${_tag}"
37
"git+https://github.com/matomo-org/matomo-icons.git"
38
"git+https://github.com/matomo-org/matomo-log-analytics.git"
39
"git+https://github.com/matomo-org/plugin-AnonymousPiwikUsageMeasurement.git"
40
"git+https://github.com/matomo-org/plugin-Bandwidth.git"
41
"git+https://github.com/matomo-org/plugin-CustomAlerts.git"
42
"git+https://github.com/matomo-org/plugin-CustomVariables.git"
43
"git+https://github.com/matomo-org/plugin-DeviceDetectorCache.git"
44
"git+https://github.com/matomo-org/plugin-LoginLdap.git"
45
"git+https://github.com/matomo-org/plugin-LogViewer.git"
46
"git+https://github.com/matomo-org/plugin-MarketingCampaignsReporting.git"
47
"git+https://github.com/matomo-org/plugin-Provider.git"
48
"git+https://github.com/matomo-org/plugin-QueuedTracking.git"
49
"git+https://github.com/matomo-org/plugin-SecurityInfo.git"
50
"git+https://github.com/matomo-org/plugin-TasksTimetable.git"
51
"git+https://github.com/matomo-org/plugin-TrackingSpamPrevention.git"
52
"git+https://github.com/matomo-org/plugin-TreemapVisualization.git"
53
"git+https://github.com/matomo-org/plugin-VisitorGenerator.git"
54
"git+https://github.com/matomo-org/tag-manager.git"
55
"git+https://github.com/matomo-org/travis-scripts.git"
56
"override-${pkgname}.conf")
57
sha512sums=("33abc8d3d3eaeed71a7fcb6b06cc14fb4ae34fc401033ae4b44b923410df53c27d0517c6c9f6e6686ec98a3e480aa41ab95aeb35bdc2c914d07a578516289497"
58
"SKIP"
59
"SKIP"
60
"SKIP"
61
"SKIP"
62
"SKIP"
63
"SKIP"
64
"SKIP"
65
"SKIP"
66
"SKIP"
67
"SKIP"
68
"SKIP"
69
"SKIP"
70
"SKIP"
71
"SKIP"
72
"SKIP"
73
"SKIP"
74
"SKIP"
75
"SKIP"
76
"SKIP"
77
"3802c7aae4c26cf23a61c48fedabe1d4bb516bbc07e42573cdb8cdfd19a556cc0b65941eae03ceb1c9cbf3eff2d40742e01eea12f3b420ae0d277c3582368b34")
78
79
prepare()
80
{
81
cd "${srcdir}"/"${pkgname}"/ || exit 1
82
git submodule init
83
84
git config submodule.misc/log-analytics.url "${srcdir}"/matomo-log-analytics/
85
git config submodule.plugins/AnonymousPiwikUsageMeasurement.url "${srcdir}"/plugin-AnonymousPiwikUsageMeasurement/
86
git config submodule.plugins/Bandwidth.url "${srcdir}"/plugin-Bandwidth/
87
git config submodule.plugins/CustomAlters.url "${srcdir}"/plugin-CustomAlters/
88
git config submodule.plugins/CustomVariables.url "${srcdir}"/plugin-CustomVariables/
89
git config submodule.plugins/DeviceDetectorCache.url "${srcdir}"/plugin-DeviceDetectorCache/
90
git config submodule.plugins/LoginLdap.url "${srcdir}"/plugin-LoginLdap/
91
git config submodule.plugins/LogViewer.url "${srcdir}"/plugin-LogViewer/
92
git config submodule.plugins/MarketingCampaignsReporting.url "${srcdir}"/plugin-MarketingCampaignsReporting/
93
git config submodule.plugins/Morpheus/icons.url "${srcdir}"/matomo-icons/
94
git config submodule.plugins/Provider.url "${srcdir}"/plugin-Provider/
95
git config submodule.plugins/QueuedTracking.url "${srcdir}"/plugin-QueuedTracking/
96
git config submodule.plugins/SecurityInfo.url "${srcdir}"/plugin-SecurityInfo/
97
git config submodule.plugins/TagManager.url "${srcdir}"/tag-manager/
98
git config submodule.plugins/TasksTimetable.url "${srcdir}"/plugin-TasksTimetable/
99
git config submodule.plugins/TrackingSpamPrevention.url "${srcdir}"/plugin-TrackingSpamPrevention/
100
git config submodule.plugins/TreemapVisualization.url "${srcdir}"/plugin-TreemapVisualization/
101
git config submodule.plugins/VisitorGenerator.url "${srcdir}"/plugin-VisitorGenerator/
102
git config submodule.tests/travis.url "${srcdir}"/travis-scripts/
103
104
git -c protocol.file.allow=always submodule update
105
106
# Geolocation database
107
## Do not use option "-i" as it will remove the preceding "0".
108
declare _current_year
109
_current_year="$(date +"%Y")"
110
declare _current_month
111
_current_month="$(date +"%m")"
112
113
while [[ "$(curl -o /dev/null/ -sw "%{http_code}" https://download.db-ip.com/free/dbip-city-lite-"${_current_year}"-"${_current_month}".mmdb.gz || true)" != "200" ]]; do
114
## Remove the preceding "0".
115
if [[ "${_current_month::1}" -eq "0" ]]; then
116
_current_month=${_current_month:1}
117
fi
118
119
## Take the last month.
120
if [[ "${_current_month}" -gt "1" ]]; then
121
((_current_month--))
122
else
123
((_current_year--))
124
_current_month="12"
125
fi
126
127
## Put a "0" at the beginning again.
128
if [[ "${#_current_month}" -eq "1" ]]; then
129
_current_month="0${_current_month}"
130
fi
131
done
132
133
curl -o "${srcdir}"/DBIP-City.mmdb.gz https://download.db-ip.com/free/dbip-city-lite-"${_current_year}"-"${_current_month}".mmdb.gz
134
gzip -d "${srcdir}"/DBIP-City.mmdb.gz
135
}
136
137
build()
138
{
139
cd "${srcdir}"/"${pkgname}"/ || exit 1
140
composer install --no-dev
141
142
declare -r _package_jsons="$(find "${srcdir}"/"${pkgname}"/ -name package.json -type f)"
143
readarray -t _package_json_array <<< "${_package_jsons}"
144
145
for _package_json in "${_package_json_array[@]}"; do
146
if [[ "${_package_json}" != "${srcdir}"/"${pkgname}"*/node_modules/* ]]; then
147
cd "$(dirname "${_package_json}")" || exit 1
148
# TODO Not usable yet, https://github.com/matomo-org/matomo/issues/23667.
149
#npm install --omit dev
150
npm install
151
fi
152
done
153
154
cd "${srcdir}"/"${pkgname}"/ || exit 1
155
# TODO Node.js v16 is currently needed, https://github.com/matomo-org/matomo/issues/21440.
156
#./console development:enable
157
#./console vue:build
158
./console development:disable
159
}
160
161
package()
162
{
163
# Assure that the directories exist.
164
mkdir -p "${pkgdir}"/usr/lib/systemd/system/php-fpm.service.d/
165
mkdir -p "${pkgdir}"/usr/share/doc/"${pkgname}"/
166
mkdir -p "${pkgdir}"/usr/share/webapps/"${pkgname}"/misc/
167
168
# Install the software.
169
cp -r "${srcdir}"/"${pkgname}"/ "${pkgdir}"/usr/share/webapps/
170
install -Dm644 "${srcdir}"/DBIP-City.mmdb "${pkgdir}"/usr/share/webapps/"${pkgname}"/misc/
171
install -Dm644 "${srcdir}"/override-"${pkgname}".conf "${pkgdir}"/usr/lib/systemd/system/php-fpm.service.d/
172
chown -R http:http "${pkgdir}"/usr/share/webapps/"${pkgname}"/
173
174
# Install the documentation.
175
install -Dm644 "${srcdir}"/"${pkgname}"/README.md "${pkgdir}"/usr/share/doc/"${pkgname}"/
176
}
177
Changes since previous scan
--- PKGBUILD @ 2026-10-22 00:13+++ PKGBUILD @ 2026-11-01 00:21@@ -5,10 +5,10 @@ # Maintainer: Matheus <matheusgwdl@protonmail.com> # Contributor: Matheus <matheusgwdl@protonmail.com> -declare -r _tag="9499b8a35efce4bb2d655ca24d9153576dcae39c"+declare -r _tag="2ecd53d2b3ebf9a1543f67600acc43fc06c91e3e" pkgname="matomo"-pkgver="5.14.0"+pkgver="5.14.2" pkgrel="1" pkgdesc="A powerful web analytics platform." arch=("x86_64")@@ -54,7 +54,7 @@ "git+https://github.com/matomo-org/tag-manager.git" "git+https://github.com/matomo-org/travis-scripts.git" "override-${pkgname}.conf")-sha512sums=("a381486f0b1e7e65789384511f89eaa1598d067f9f3223e4c23d41fbd5db4f322ea6225060c795498d2c9aaa9724b98c0b107a77af06d23093df0c3d038b687a"+sha512sums=("33abc8d3d3eaeed71a7fcb6b06cc14fb4ae34fc401033ae4b44b923410df53c27d0517c6c9f6e6686ec98a3e480aa41ab95aeb35bdc2c914d07a578516289497" "SKIP" "SKIP" "SKIP"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 17:35:31 | Medium | 1 |
| 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 |