You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-11-29 22:48:19 +02:00
Document GoSec nosec skip comments
This commit is contained in:
@@ -19,10 +19,12 @@ type UserMap struct {
|
||||
}
|
||||
|
||||
// NewUserMap parses the authenticated emails file into a new UserMap
|
||||
//
|
||||
// TODO (@NickMeves): Audit usage of `unsafe.Pointer` and potentially refactor
|
||||
func NewUserMap(usersFile string, done <-chan bool, onUpdate func()) *UserMap {
|
||||
um := &UserMap{usersFile: usersFile}
|
||||
m := make(map[string]bool)
|
||||
atomic.StorePointer(&um.m, unsafe.Pointer(&m))
|
||||
atomic.StorePointer(&um.m, unsafe.Pointer(&m)) // #nosec G103
|
||||
if usersFile != "" {
|
||||
logger.Printf("using authenticated emails file %s", usersFile)
|
||||
WatchForUpdates(usersFile, done, func() {
|
||||
@@ -68,7 +70,7 @@ func (um *UserMap) LoadAuthenticatedEmailsFile() {
|
||||
address := strings.ToLower(strings.TrimSpace(r[0]))
|
||||
updated[address] = true
|
||||
}
|
||||
atomic.StorePointer(&um.m, unsafe.Pointer(&updated))
|
||||
atomic.StorePointer(&um.m, unsafe.Pointer(&updated)) // #nosec G103
|
||||
}
|
||||
|
||||
func newValidatorImpl(domains []string, usersFile string,
|
||||
|
||||
Reference in New Issue
Block a user