@@ -19,10 +19,12 @@ type UserMap struct {
1919}
2020
2121// NewUserMap parses the authenticated emails file into a new UserMap
22+//
23+// TODO (@NickMeves): Audit usage of `unsafe.Pointer` and potentially refactor
2224func NewUserMap(usersFile string, done <-chan bool, onUpdate func()) *UserMap {
2325 um := &UserMap{usersFile: usersFile}
2426 m := make(map[string]bool)
25− atomic.StorePointer(&um.m, unsafe.Pointer(&m))
27+ atomic.StorePointer(&um.m, unsafe.Pointer(&m)) // #nosec G103
2628 if usersFile != "" {
2729 logger.Printf("using authenticated emails file %s", usersFile)
2830 WatchForUpdates(usersFile, done, func() {
@@ -68,7 +70,7 @@ func (um *UserMap) LoadAuthenticatedEmailsFile() {
6870 address := strings.ToLower(strings.TrimSpace(r[0]))
6971 updated[address] = true
7072 }
71− atomic.StorePointer(&um.m, unsafe.Pointer(&updated))
73+ atomic.StorePointer(&um.m, unsafe.Pointer(&updated)) // #nosec G103
7274}
7375
7476func newValidatorImpl(domains []string, usersFile string,