MindFlavor / prometheus_wireguard_exporter

A Prometheus exporter for WireGuard, written in Rust.
https://mindflavor.github.io/prometheus_wireguard_exporter
MIT License
493 stars 51 forks source link

Invalid line in /etc/sudoers.d/prometheus-wireguard-exporter #50

Closed arisudesu closed 3 years ago

arisudesu commented 3 years ago

The Dockerfile has an error, when filling in the sudoers file during build, it performs path expansion, replacing * with a list of file system directories. The file then contains nonsense:

prometheus-wireguard-exporter ALL=(root) NOPASSWD:/usr/bin/wg show bin dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var dump

As a result, the wg dump command doesn't work in the container at all.

It should be properly escaped, or rather, put in quotes to avoid path expansion.