Language: Go
Label: safe
CWE: CWE-287 \u2014 Improper Authentication
When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.

Code:
func (a *Auth) AuthPlain(username, password string) error {
	if a.useHelper {
		if err := external.AuthUsingHelper(a.helperPath, username, password); err != nil {
			return err
		}
	}
	err := runPAMAuth(username, password)
	if err != nil {
		return err
	}
	return nil
}