This is a solution to the issue with getenv() (https://github.com/llvm/llvm-project/issues/53276) but I covered a few more functions just because I could.
The patch is straightforward except the tiny fix in BugReporterVisitors.cpp that suppresses a default note for "Assuming pointer value is null" when a note tag from the checker is present. This is probably the right thing to do but also definitely not a complete solution to the problem of different sources of path notes being unaware of each other, which is a large and annoying issue that we have to deal with. Note tags really help there because they're nicely introspectable. The problem is demonstrated by the newly added getenv() test; I did not investigate why doesn't the original buggy report have the same note but I agree that this might be interesting to figure out.
The notes are currently optional but I think we should eventually implement all of them and then make them mandatory.
The notes are prunable, i.e. they won't bring-in entire stack frames worth of notes just because they're there, but they will be always visible regardless of whether the value is of interest to the bug report. I think this is debatable, the arguably better solution is to make them non-prunable but conditional to the value being tracked back to the call, which would probably need a better tracking infrastructure.
This comment has been out of date for years and I don't think it makes sense to have it in the first place.