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

Test pr 2 #344

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 28 additions & 5 deletions .github/workflows/codeguru.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Analyze with CodeGuru Reviewer

on:
- push
- workflow_dispatch # This allows manual triggering of the action through the GitHub UI.
pull_request:
types: [opened]
# - push
# - workflow_dispatch # This allows manual triggering of the action through the GitHub UI.

permissions:
id-token: write
Expand All @@ -19,8 +21,8 @@ jobs:
continue-on-error: true
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::048169001733:role/GuruGitHubCICDRole
aws-region: us-west-2
role-to-assume: arn:aws:iam::737243363187:role/CodeGuruSecurityGitHubAccessRole
aws-region: us-east-1

- uses: actions/checkout@v2
if: steps.iam-role.outcome == 'success'
Expand All @@ -35,12 +37,13 @@ jobs:
if: steps.iam-role.outcome == 'success'
run: mvn compile -DskipTests


- name: CodeGuru Reviewer
uses: aws-actions/[email protected]
if: steps.iam-role.outcome == 'success'
continue-on-error: false
with:
s3_bucket: codeguru-reviewer-github-profiler-demo-048169001733-uw2
s3_bucket: codeguru-reviewer-demo-234234sdfsdf
build_path: ./target/classes

- name: Store SARIF file
Expand All @@ -55,3 +58,23 @@ jobs:
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: codeguru-results.sarif.json

- name: CodeGuru Security
uses: aws-actions/codeguru-security@v1
with:
source_path: .
aws_region: us-east-1
# fail_on_severity: Critical
- name: Print findings
run: |
ls -l
cat codeguru-security-results.sarif.json

# If you want content in security scanning, you’ll need to enable codescanning by going into github.
# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning-for-a-repository
- name: Upload result
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: codeguru-security-results.sarif.json


2 changes: 1 addition & 1 deletion src/main/java/com/shipmentEvents/util/S3ClientUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.amazonaws.services.s3.AmazonS3ClientBuilder;

public class S3ClientUtil {

// test
public static AmazonS3 getS3Client() {
return AmazonS3ClientBuilder.standard().withRegion(Regions.DEFAULT_REGION).build();
}
Expand Down
Loading