Skip to content

Commit 3aa38d7

Browse files
committed
fix: suppress gosec G118 false positive — cancel stored in pollers map for deferred invocation
1 parent 107cc62 commit 3aa38d7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/server/email_trigger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ func (e *EmailTriggerPoller) startPoller(ctx context.Context, t TriggerRecord) {
125125
return
126126
}
127127

128-
pollCtx, cancel := context.WithCancel(ctx)
128+
pollCtx, cancel := context.WithCancel(ctx) // #nosec G118 -- cancel is stored in e.pollers and called during Stop()/Reload()
129129
e.pollers[t.ID] = cancel
130130

131131
e.wg.Add(1)

0 commit comments

Comments
 (0)