🐛 (os): skip unresolved users in group.members#6850
🐛 (os): skip unresolved users in group.members#6850SergioChan wants to merge 1 commit intomondoohq:mainfrom
Conversation
|
Thank you for your submission. We really appreciate it. Before we can accept your contribution, we ask that you sign the Mondoo Contributor License Agreement. You can sign the CLA by adding a new comment to this pull request and pasting exactly the following text. I have read the Mondoo CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
| user, ok := users.usersByName[name] | ||
| if !ok { |
There was a problem hiding this comment.
🔵 suggestion — Silently dropping unresolved users makes debugging harder — callers won't know why a group appears to have fewer members than expected. Consider emitting a log.Warn (or log.Debug) when a non-empty name is skipped so operators have some breadcrumb.
if !ok {
log.Warn().Str("group", x.GetName().Data).Str("user", name).Msg("skipping unresolved group member")
continue
}|
I have read the Mondoo CLA Document and I hereby sign the CLA recheck |
|
@SergioChan can you update your CLA signing message to be on 2 lines so the bot can process it please |
|
I have read the Mondoo CLA Document and I hereby sign the CLA |
|
recheck |
Summary
group.memberstolerate usernames that are not present in the resolveduserscachegetent passwdTesting
go test ./providers/os/resources/...Related