Skip to content

Commit 22d036c

Browse files
committed
Added false-positive message
1 parent 363f8ed commit 22d036c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cache/boltdb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func (c *Boltdb) createBucket() error {
318318
// invalidateMissingAppCache perodically cleanup inmemory house keeping for
319319
// not found apps. When the this cache is cleaned up, end clients have chance
320320
// to retry missing apps
321-
func (c *Boltdb) invalidateMissingAppCache() { // nosemgrep
321+
func (c *Boltdb) invalidateMissingAppCache() { // nosemgrep false-positive : Execution of ticker `ticker` more times than desired will not be causing any issues for function "invalidateMissingAppCache".
322322
ticker := time.NewTicker(c.config.MissingAppCacheTTL)
323323

324324
c.wg.Add(1)
@@ -340,7 +340,7 @@ func (c *Boltdb) invalidateMissingAppCache() { // nosemgrep
340340

341341
// invalidateCache perodically fetches a full copy apps info from remote
342342
// and update boltdb and in-memory cache
343-
func (c *Boltdb) invalidateCache() { // nosemgrep
343+
func (c *Boltdb) invalidateCache() { // nosemgrep false-positive : Execution of ticker `ticker` and `orgSpaceTicker` more times than desired will not be causing any issues for function "invalidateCache".
344344
ticker := time.NewTicker(c.config.AppCacheTTL)
345345
orgSpaceTicker := time.NewTicker(c.config.OrgSpaceCacheTTL)
346346

events/events.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func IsAuthorizedEvent(wantedEvent string) bool {
271271
return ok
272272
}
273273

274-
func AuthorizedEvents() string { // nosemgrep
274+
func AuthorizedEvents() string { // nosemgrep false-positive : `Envelope_EventType_name` is not pointer.
275275
arrEvents := []string{}
276276
for _, listEvent := range events.Envelope_EventType_name {
277277
arrEvents = append(arrEvents, listEvent)
@@ -280,7 +280,7 @@ func AuthorizedEvents() string { // nosemgrep
280280
return strings.Join(arrEvents, ", ")
281281
}
282282

283-
func ParseSelectedEvents(wantedEvents string) (map[string]bool, error) { // nosemgrep
283+
func ParseSelectedEvents(wantedEvents string) (map[string]bool, error) {
284284
wantedEvents = strings.TrimSpace(wantedEvents)
285285
selectedEvents := make(map[string]bool)
286286
if wantedEvents == "" {
@@ -312,7 +312,7 @@ func getKeyValueFromString(kvPair string) (string, string, error) {
312312
return strings.TrimSpace(values[0]), strings.TrimSpace(values[1]), nil
313313
}
314314

315-
func ParseExtraFields(extraEventsString string) (map[string]string, error) { // nosemgrep
315+
func ParseExtraFields(extraEventsString string) (map[string]string, error) {
316316
extraEvents := map[string]string{}
317317

318318
for _, kvPair := range strings.Split(extraEventsString, ",") {

0 commit comments

Comments
 (0)