Files
trivy/docs/integrations/aws-security-hub.md
aprp becd5088df add MkDocs implementation (#870)
* mkdocs: add top level nav

* mkdocs: add installation nav

* mkdocs: add quick-start nav

* mkdocs: add examples nav

* mkdocs: add CI nav

* mkdocs: add vuln-detection nav

* mkdocs: add comparison nav

* mkdocs: add usage nav

* mkdocs: add migration nav

* mkdocs: add FAQ nav

* mkdocs: add mkdocs.yml

* mkdocs: add github workflow

* docs: update documents

* fix links

* chore(ci): use ORG_GITHUB_TOKEN

* chore(mkdocs): use mike

* chore(ci): support dev

* chore(ci): documentation test

Co-authored-by: knqyf263 <knqyf263@gmail.com>
2021-03-09 20:05:37 +02:00

1005 B

AWS Security Hub

Upload findings to Security Hub

In the following example using the template asff.tpl, ASFF file can be generated.

$ AWS_REGION=us-west-1 AWS_ACCOUNT_ID=123456789012 trivy image --format template --template "@contrib/asff.tpl" -o report.asff golang:1.12-alpine

ASFF template needs AWS_REGION and AWS_ACCOUNT_ID from environment variables.

Then, you can upload it with AWS CLI.

$ aws securityhub batch-import-findings --findings file://report.asff

Customize

You can customize asff.tpl

$ export AWS_REGION=us-west-1
$ export AWS_ACCOUNT_ID=123456789012
$ trivy image --format template --template "@your-asff.tpl" -o report.asff golang:1.12-alpine

Reference

https://aws.amazon.com/blogs/security/how-to-build-ci-cd-pipeline-container-vulnerability-scanning-trivy-and-aws-security-hub/