-
Notifications
You must be signed in to change notification settings - Fork 24
feat(preflight): build preflight package for AWS #1716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Lacework Code Security found potential new issues in this PR. sca found potential 5 new issues
|
if a == "*" { | ||
p.caller.IsAdmin = true | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean we don't need to populate the permissions
map below if any of the statement.Action
from any document
has statement.Action == "*"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. If any action is "*", that will mean the caller can do anything(like having admin access). No need to populate the map to check permissions.
if strings.Contains(lastStr, "assumed-role") { | ||
return paths[len(paths)-2], nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be useful to add an example comment on how this assumed-role Arn might look like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added examples in the comment.
(Audit Mode) sca found potential 5 new issues
|
Summary
This PR creates the package which serves functions to do preflight checks for AWS integrations including Agentless, Config and CloudTrail.
The following tasks will be run sequentially:
How did you test this change?
Run integration test in
preflight_aws_test.go