Skip to content

Commit

Permalink
fixes #36. -o wide will give you the arn, and the default (-o brief) …
Browse files Browse the repository at this point in the history
…will only give you the name for brevity
  • Loading branch information
sethsec-bf committed Oct 25, 2023
1 parent b43d6ad commit 7656267
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions aws/lambda.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type Lambda struct {
Region string
Type string
Name string
Arn string
Role string
Admin string
CanPrivEsc string
Expand Down Expand Up @@ -129,7 +130,8 @@ func (m *LambdasModule) PrintLambdas(outputDirectory string, verbosity int) {
m.output.Headers = []string{
"Service",
"Region",
"Resource",
"Name",
"Arn",
"Role",
"IsAdminRole?",
"CanPrivEscToAdmin?",
Expand All @@ -150,7 +152,7 @@ func (m *LambdasModule) PrintLambdas(outputDirectory string, verbosity int) {
tableCols = []string{
"Service",
"Region",
"Resource",
"Arn",
"Role",
"IsAdminRole?",
"CanPrivEscToAdmin?",
Expand All @@ -160,7 +162,7 @@ func (m *LambdasModule) PrintLambdas(outputDirectory string, verbosity int) {
tableCols = []string{
"Service",
"Region",
"Resource",
"Name",
"Role",
"IsAdminRole?",
"CanPrivEscToAdmin?",
Expand All @@ -186,6 +188,7 @@ func (m *LambdasModule) PrintLambdas(outputDirectory string, verbosity int) {
m.Lambdas[i].Region,
//m.Lambdas[i].Type,
m.Lambdas[i].Name,
m.Lambdas[i].Arn,
m.Lambdas[i].Role,
m.Lambdas[i].Admin,
m.Lambdas[i].CanPrivEsc,
Expand Down Expand Up @@ -313,13 +316,14 @@ func (m *LambdasModule) getLambdasPerRegion(r string, wg *sync.WaitGroup, semaph
}

for _, function := range functions {
//arn := aws.ToString(function.FunctionArn)
arn := aws.ToString(function.FunctionArn)
name := aws.ToString(function.FunctionName)
role := aws.ToString(function.Role)

dataReceiver <- Lambda{
AWSService: "Lambda",
Name: name,
Arn: arn,
Region: r,
Type: "",
Role: role,
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
var (
rootCmd = &cobra.Command{
Use: os.Args[0],
Version: "1.12.2",
Version: "1.13.0-prerelease",
}
)

Expand Down

0 comments on commit 7656267

Please sign in to comment.