MCPcopy Create free account
hub / github.com/BishopFox/cloudfox / getLambdaEnvironmentVariablesPerRegion

Method getLambdaEnvironmentVariablesPerRegion

aws/env-vars.go:426–452  ·  view source on GitHub ↗
(region string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan EnvironmentVariable)

Source from the content-addressed store, hash-verified

424}
425
426func (m *EnvsModule) getLambdaEnvironmentVariablesPerRegion(region string, wg *sync.WaitGroup, semaphore chan struct{}, dataReceiver chan EnvironmentVariable) {
427 defer func() {
428 m.CommandCounter.DecrExecuting()
429 m.CommandCounter.IncrComplete()
430 wg.Done()
431
432 }()
433 semaphore <- struct{}{}
434 defer func() {
435 <-semaphore
436 }()
437 // m.CommandCounter.IncrTotal()
438 m.CommandCounter.DecrPending()
439 m.CommandCounter.IncrExecuting()
440
441 Functions, err := sdk.CachedLambdaListFunctions(m.LambdaClient, aws.ToString(m.Caller.Account), region)
442 if err != nil {
443 m.modLog.Error(err.Error())
444 m.CommandCounter.IncrError()
445 return
446 }
447
448 for _, function := range Functions {
449 m.getLambdaEnvironmentVariablesPerFunction(function, region, dataReceiver)
450 }
451
452}
453
454func (m *EnvsModule) getLambdaEnvironmentVariablesPerFunction(function lambdaTypes.FunctionConfiguration, region string, dataReceiver chan EnvironmentVariable) {
455 if function.Environment != nil {

Callers 1

executeChecksMethod · 0.95

Calls 8

DecrExecutingMethod · 0.80
IncrCompleteMethod · 0.80
DecrPendingMethod · 0.80
IncrExecutingMethod · 0.80
ErrorMethod · 0.80
IncrErrorMethod · 0.80

Tested by

no test coverage detected