Skip to content
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

add: lambda adapter #1166

Merged
merged 13 commits into from
Apr 19, 2023
Merged

Conversation

realwebdev
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented Feb 8, 2023

CLA assistant check
All committers have signed the CLA.

giorod3
giorod3 previously approved these changes Feb 16, 2023
@giorod3
Copy link
Contributor

giorod3 commented Feb 27, 2023

@simar7 please also review and merge if you feel it looks good

@simar7
Copy link
Member

simar7 commented Mar 1, 2023

looks like some tests are failing, should be easy to fix.

Comment on lines -2 to +12
Do not install packages because they may be needed, install them only if you require them.
'apt-get' install should use '--no-install-recommends' to minimize image size.

### Impact

Image will increase substantially in size without `--no-install-recommends` for `apt-get install`.
<!-- Add Impact here -->

<!-- DO NOT CHANGE -->
{{ remediationActions }}

### Links
- https://docs.docker.com/develop/develop-images/dockerfile_best-practices/
- https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this change related?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change occur when I ran make docs command before pushing code. This change coming in my all PR's. It is created automatically. I added it in the commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change occur when I ran make docs command before pushing code. This change coming in my all PR's. It is created automatically. I added it in the commit.

Comment on lines 1 to +5

In iam:PassRole the service carrying out the actions is "provided" a role by the calling principal and implicitly takes on that role to carry out the actions (instead of executing sts:AssumeRole).
The privileges attached to the role are distinct from those of the primary ordering the action and may even be larger and can cause security issues.

Ensures any IAM pass role attched to roles are flagged and warned.

### Impact
Compromise on security of aws resources.
<!-- Add Impact here -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was part of aws/iampassrole_policy branch don't know why this is keep appearing again and again.

Comment on lines 3 to 14

```hcl
resource "azurerm_kubernetes_cluster" "good_example" {
api_server_authorized_ip_ranges = [
api_server_access_profile {
authorized_ip_ranges = [
"1.2.3.4/32"
]

}

}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same appear as the result of make docs command.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same appear as the result of make docs command.

Comment on lines 27 to 29
function_name = "lambda_function_name"
function_name = ""
role = aws_iam_role.iam_for_lambda.arn
runtime = "nodejs12.x"
runtime = ""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you explain this change? functions have these fields populated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, When I ran test cases it appeared in the logs that actual and expected values are different. in actual value runtime coming empty and same case with fucntion_name to remediate the failing of test case I changed the expected value here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's correct. Why the returned value is empty? is this documented somewhere on AWS API?

@simar7 simar7 self-requested a review April 14, 2023 22:46
Copy link
Member

@simar7 simar7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some comments

@realwebdev
Copy link
Contributor Author

left some comments

I have read thank for mentioning. let me know if this clearify. those changes in dot MD files appeared due to make docs command I commit them. Change in test cases was due to match the expected values with adapted(actual values)

1 similar comment
@realwebdev
Copy link
Contributor Author

left some comments

I have read thank for mentioning. let me know if this clearify. those changes in dot MD files appeared due to make docs command I commit them. Change in test cases was due to match the expected values with adapted(actual values)

@simar7
Copy link
Member

simar7 commented Apr 18, 2023

Looks like tests are failing again

@simar7 simar7 self-requested a review April 19, 2023 02:58
Copy link
Member

@simar7 simar7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks lgtm now

@simar7 simar7 merged commit 32da643 into aquasecurity:master Apr 19, 2023
simar7 added a commit that referenced this pull request May 3, 2023
simar7 added a commit that referenced this pull request May 4, 2023
* Revert "added autoscaling adapter (#1153)"

This reverts commit 124ecc6.

* Revert "add: multiple adapters added(kendra, kinesis, kinesisvideo, proton, q… (#1227)"

This reverts commit 1a1ff87.

* Revert "added in adapters of codebuild (#1184)"

This reverts commit ff5de60.

* Revert "add: lambda adapter (#1166)"

This reverts commit 32da643.

* Revert "added in adapters of mq and msk (#1218)"

This reverts commit 1169455.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants