@@ -21,7 +21,8 @@ The credentials must have at least the following permissions:
2121 " codeguru-reviewer:DescribeRepositoryAssociation" ,
2222 " codeguru-reviewer:CreateCodeReview" ,
2323 " codeguru-reviewer:DescribeCodeReview" ,
24- " codeguru-reviewer:ListRecommendations"
24+ " codeguru-reviewer:ListRecommendations" ,
25+ " iam:CreateServiceLinkedRole"
2526 ],
2627 "Resource" : " *" ,
2728 "Effect" : " Allow"
@@ -48,10 +49,10 @@ The credentials must have at least the following permissions:
4849
4950### Download the CLI and scan an Example
5051
51- You can download the [ aws-codeguru-cli] ( releases/download/latest /aws-codeguru-cli.zip ) from the releases section.
52+ You can download the [ aws-codeguru-cli] ( https://github.com /aws/aws -codeguru-cli/releases/latest ) from the releases section.
5253Download the latest version and add it to your ` PATH ` :
5354```
54- curl -OL https://github.com/martinschaef /aws-codeguru-cli/releases/download/latest /aws-codeguru-cli.zip
55+ curl -OL https://github.com/aws /aws-codeguru-cli/releases/download/0.0.1 /aws-codeguru-cli.zip
5556unzip aws-codeguru-cli.zip
5657export PATH=$PATH:./aws-codeguru-cli/bin
5758```
@@ -74,20 +75,20 @@ CodeGuru produces a Json and Html report.
7475You can provide your own bucket name using the ` --bucket-name ` option. Note that, currently, CodeGuru Reviewer only
7576supports bucket names that start with the prefix ` codeguru-reviewer- ` out of the box. If you choose a different naming
7677pattern for your bucket you need to:
77- 1 . Grant ` S3:GetObject ` permissions on their S3 bucket to ` codeguru-reviewer.amazonaws.com `
78- 2 . If you are using SSE on the S3 bucket, Grant ` KMS::Decrypt ` permissions to ` codeguru-reviewer.amazonaws.com `
78+ 1 . Grant ` S3:GetObject ` permissions on the S3 bucket to ` codeguru-reviewer.amazonaws.com `
79+ 2 . If you are using SSE in the S3 bucket, grant ` KMS::Decrypt ` permissions to ` codeguru-reviewer.amazonaws.com `
7980
8081### Using Encryption
8182
82- CodeGuru Reviewer allows you to use a customer managed key (CMCMK) to encrypt content of the S3 bucket that is used
83+ CodeGuru Reviewer allows you to use a customer managed key (CMCMK) to encrypt the contents of the S3 bucket that is used
8384to store source and build artifacts, and all metadata and recommendations that are produced by CodeGuru Reviewer.
84- First, create a customer owned key in KMS.
85- You need to grant CodeGuru Reviewer permission to decrypt artifacts with this key by adding the
85+ First, create a customer managed key in KMS.
86+ You will need to grant CodeGuru Reviewer permission to decrypt artifacts with this key by adding the
8687following Statement to your Key policy:
8788
8889``` json
8990{
90- "Sid" : " Allow CodeGuru to use the key to decrypt artifact " ,
91+ "Sid" : " Allow CodeGuru to use the key to decrypt artifacts " ,
9192 "Effect" : " Allow" ,
9293 "Principal" : {
9394 "AWS" : " *"
@@ -105,13 +106,13 @@ following Statement to your Key policy:
105106 }
106107}
107108```
108- Then, enable server-side for the bucket that you are using with CodeGuru Reviewer. The bucket name should be
109+ Then, enable server-side encryption for the bucket that you are using with CodeGuru Reviewer. The bucket name should be
109110` codeguru-reviewer-cli-[YOUR ACCOUNT]-[YOUR REGION] ` , unless you provided a custom name. For encryption, use the
110111KMS key that you created in the previous step.
111112
112113Now you can analyze a repository by providing the KMS key ID (not the alias). For example:
113114```
114- codeguru-reviewer -r ./ -kms 12345678-abcd-abcd-1234-1234567890ab
115+ aws- codeguru-cli -r ./ -kms 12345678-abcd-abcd-1234-1234567890ab
115116```
116117The first time you analyze a repository with the CodeGuru Reviewer CLI, a new association will be created and
117118the provided key will be associated with this repository. Fur subsequent scans, you do not need to provide the
@@ -143,7 +144,7 @@ and now run your local build with:
143144```
144145./build/install/aws-codeguru-cli/bin/aws-codeguru-cli
145146```
146- you can run a self-test with:
147+ You can run a self-test with:
147148```
148149./build/install/aws-codeguru-cli/bin/aws-codeguru-cli -r . -s src/main/java -b build/libs -c HEAD^:HEAD
149150```
0 commit comments