-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat(aws): Add check for malicious AMI detection #352
Conversation
Signed-off-by: Nikita Pivkin <[email protected]>
Signed-off-by: Nikita Pivkin <[email protected]>
Signed-off-by: Nikita Pivkin <[email protected]>
Signed-off-by: Nikita Pivkin <[email protected]>
We need to find a way for Trivy to skip checks that it doesn't support. If we release a new check whose input is validated by a schema (e.g. cloud), old versions of Trivy will get an error when trying to compile such a check. Although Trivy will skip checks with compile-time errors, if the error limit is reached (currently 10), Trivy will terminate. Alternatively, we can add a |
Although not perfect, we should not have any checks in production that aren't compilable. As far as the limit is concerned, I think we could bump it up to a high number so that we don't run into an issue where this limit becomes the limiting factor for people to upgrade to a newer Trivy release. Having said that there are two options on the table: Distinguishing compiler failures vs incompatible checksToday we don't have any mechanism to do this as demonstrated in this PR. One way as you suggested could be to add a compatibility field but this will force us to track each check with each Trivy release that it will correspond to. IOW we would have to know which Trivy release the support for will be added for the particular check that we are writing. Schema-less checksThis might be the opportunity to remove schema completely from our checks. It would not let us type check but also not bind us to a particular schema where cases like this PR can occur. The checks would simply not evaluate as the fields would be unknown. |
Need to update the check since the schema in Trivy has been changed. |
Signed-off-by: Nikita Pivkin <[email protected]>
Related PRs: