Without a root login and without a sudo password (NOPASSWD sudo, e.g. netOrk's own system account from NetOrk/netork#1817), _run_privileged prefixes the command and types it into the interactive shell (napalm_linux/linux.py:517):
sudo only covers the first simple command of the line. _rpm_security_names (line 1619-1620) sends DNF_SECURITY_COMMAND / _YUM_SECURITY_COMMAND, which start with a brace group:
(linux.py:119; dnf's twin in napalm_device_types/package_updates.py:33). The resulting line sudo -n { LC_ALL=C yum … ; echo __DNF_RC=$?; } | cat; echo __NETORK_RC=$? does not parse — bash -n reports syntax error near unexpected token '}' — so neither marker arrives, and _rpm_security_names returns None. Every pending update on such a dnf/yum host has security: None.
With a sudo password the same command goes through _sudo → _as_root, which wraps the whole line in sh -c (linux.py:551: return f"sudo -n sh -c {script}", None) and works; only the no-password branch of _run_privileged is broken. Other compound commands sent through it (… ; echo __NETORK_RC=$?) only work because their privileged part happens to be the first command.
Expected
_run_privileged without a password runs the whole command as root, the way _as_root does (sudo -n sh -c <quoted>), or goes through _sudo directly. Test-first: with _sudo_password=None and a non-root login, _rpm_security_names() sends a line that bash -n accepts and parses the advisories.
Priority: P3 — security classification of updates is missing on every RHEL-family host managed without a sudo password, which is netOrk's default account since #1817.
Found during the bug sweep of 2026-11-01.
## What happens
Without a root login and without a sudo password (NOPASSWD sudo, e.g. netOrk's own system account from NetOrk/netork#1817), `_run_privileged` prefixes the command and types it into the interactive shell (`napalm_linux/linux.py:517`):
```python
return self._send(f"sudo -n {command}", read_timeout=timeout)
```
`sudo` only covers the first simple command of the line. `_rpm_security_names` (line 1619-1620) sends `DNF_SECURITY_COMMAND` / `_YUM_SECURITY_COMMAND`, which start with a brace group:
```
{ LC_ALL=C yum updateinfo list security -q 2>/dev/null; echo __DNF_RC=$?; } | cat
```
(`linux.py:119`; dnf's twin in `napalm_device_types/package_updates.py:33`). The resulting line `sudo -n { LC_ALL=C yum … ; echo __DNF_RC=$?; } | cat; echo __NETORK_RC=$?` does not parse — `bash -n` reports `syntax error near unexpected token '}'` — so neither marker arrives, and `_rpm_security_names` returns `None`. Every pending update on such a dnf/yum host has `security: None`.
With a sudo password the same command goes through `_sudo` → `_as_root`, which wraps the whole line in `sh -c` (`linux.py:551`: `return f"sudo -n sh -c {script}", None`) and works; only the no-password branch of `_run_privileged` is broken. Other compound commands sent through it (`… ; echo __NETORK_RC=$?`) only work because their privileged part happens to be the first command.
## Expected
`_run_privileged` without a password runs the whole command as root, the way `_as_root` does (`sudo -n sh -c <quoted>`), or goes through `_sudo` directly. Test-first: with `_sudo_password=None` and a non-root login, `_rpm_security_names()` sends a line that `bash -n` accepts and parses the advisories.
Priority: P3 — security classification of updates is missing on every RHEL-family host managed without a sudo password, which is netOrk's default account since #1817.
Found during the bug sweep of 2026-11-01.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What happens
Without a root login and without a sudo password (NOPASSWD sudo, e.g. netOrk's own system account from NetOrk/netork#1817),
_run_privilegedprefixes the command and types it into the interactive shell (napalm_linux/linux.py:517):sudoonly covers the first simple command of the line._rpm_security_names(line 1619-1620) sendsDNF_SECURITY_COMMAND/_YUM_SECURITY_COMMAND, which start with a brace group:(
linux.py:119; dnf's twin innapalm_device_types/package_updates.py:33). The resulting linesudo -n { LC_ALL=C yum … ; echo __DNF_RC=$?; } | cat; echo __NETORK_RC=$?does not parse —bash -nreportssyntax error near unexpected token '}'— so neither marker arrives, and_rpm_security_namesreturnsNone. Every pending update on such a dnf/yum host hassecurity: None.With a sudo password the same command goes through
_sudo→_as_root, which wraps the whole line insh -c(linux.py:551:return f"sudo -n sh -c {script}", None) and works; only the no-password branch of_run_privilegedis broken. Other compound commands sent through it (… ; echo __NETORK_RC=$?) only work because their privileged part happens to be the first command.Expected
_run_privilegedwithout a password runs the whole command as root, the way_as_rootdoes (sudo -n sh -c <quoted>), or goes through_sudodirectly. Test-first: with_sudo_password=Noneand a non-root login,_rpm_security_names()sends a line thatbash -naccepts and parses the advisories.Priority: P3 — security classification of updates is missing on every RHEL-family host managed without a sudo password, which is netOrk's default account since #1817.
Found during the bug sweep of 2026-11-01.