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

feat(plugin): trivy-aws as a plugin for Trivy #153

Merged
merged 12 commits into from
Jun 6, 2024
Merged

Conversation

simar7
Copy link
Member

@simar7 simar7 commented May 17, 2024

Notes

  1. The current aws subcommand will cause conflict if we name the plugin the same. So I've named it aws-scan for now.
  2. We need to deprecate the current aws subcommand within trivy. This will still continue to work until we remove it however. Will done in a separate PR.

Install

$ trivy plugin install ./trivy-aws.tar.gz
2024-05-18T00:06:06-06:00       INFO    Installing the plugin...        url="./trivy-aws.tar.gz"
2024-05-18T00:06:08-06:00       INFO    Loading the plugin metadata...

Run

$ AWS_REGION=<region> AWS_ACCOUNT_ID=<id> trivy aws-scan
2024/05/18 00:06:23 INFO Need to update the built-in policies
2024/05/18 00:06:23 INFO Downloading the built-in policies...

<results>

@simar7 simar7 self-assigned this May 18, 2024
Makefile Outdated Show resolved Hide resolved
pkg/commands/app.go Outdated Show resolved Hide resolved
@nikpivkin
Copy link
Contributor

@simar7 Updated the docker version in the go-mock-aws package. aquasecurity/go-mock-aws#5

@simar7 simar7 force-pushed the trivy-aws-plugin branch from 23ff7de to 83056f4 Compare May 28, 2024 23:59
@knqyf263
Copy link

I think we want to add this plugin to the index so people can install this plugin by trivy plugin install aws.

@simar7
Copy link
Member Author

simar7 commented May 30, 2024

I think we want to add this plugin to the index so people can install this plugin by trivy plugin install aws.

Yes I was going to do just that 👍🏼

@knqyf263 can you add the aquasecurity/trivy org as maintainers (or at least push access) to that repo? I could fork and submit a PR but it'd be nice to have the right access.

@knqyf263
Copy link

@simar7 Added!
CleanShot 2024-05-31 at 09 00 50

@simar7 simar7 marked this pull request as ready for review June 1, 2024 04:35
@simar7 simar7 requested a review from nikpivkin June 4, 2024 03:12
@nikpivkin
Copy link
Contributor

Some packages such as cache, commands and scanner are duplicated in pkg and pkg/cloud/aws.

❯ ls pkg/cloud/aws
cache    commands scanner
❯ ls pkg/
cache       cloud       commands    concurrency errs        progress    scanner     types


jobs:
build:
runs-on: ubuntu-latest
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we build the plugin for the same platforms as Trivy to maintain backwards compatibility?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can add cross platform support later on if asked for. Feels like feature creep for this PR.

@simar7 simar7 merged commit c92585c into main Jun 6, 2024
5 checks passed
@simar7 simar7 deleted the trivy-aws-plugin branch June 6, 2024 04:41
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.

3 participants