Issue while upgrading the Hugo and Docsy

You’re pointing to security.funcs.getenv.getenv instead of security.funcs.getenv because you have the key with security.funcs.getenv as well as getenv =.

Try (untested):

[security.funcs]
getenv = …