fix: what bandit and the remaining lint rules found
- ipmi: a failed logout on close is logged at debug level instead of passed over (B110); the session still times out on the BMC. - ipmi: the pyghmi imports are this driver's protocol, the fallback for BMCs without Redfish, documented as insecure in the module and in docs/security.md (nosec B415). - parsers.accounts: the empty password is NAPALM's get_users field; Redfish never returns one (nosec B105).
This commit is contained in:
1 parent
09029ca0a4
commit
01b2a2ae58
2 files changed
+11
-5
No files matched your search
@@ -35,7 +35,8 @@ def to_napalm_users(accounts: Iterable[Mapping[str, Any] | None]) -> dict[str, d
|
||||
continue
|
||||
users[acc["username"]] = {
|
||||
"level": ROLE_LEVELS.get(acc.get("role_id") or "", 0),
|
||||
"password": "",
|
||||
# NAPALM's get_users field; Redfish never returns a password, so it stays empty.
|
||||
"password": "", # nosec B105
|
||||
"sshkeys": [],
|
||||
}
|
||||
return users
|
||||
Reference in new issue
Block a user