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

Apply OIDC to upload reports to AWS #154

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Changes from 4 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
16 changes: 12 additions & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
env:
KS_VERSION: 8.6.6
KS_VERSION_TAG: latest
TEAM: gen4
SERVICE: katalonstudio-docker-vulnerability-reports
steps:
- name: Checkout
uses: actions/checkout@master
Expand Down Expand Up @@ -57,7 +59,13 @@ jobs:
run: |
chmod u+x ./build/security-report/security_scan.sh
./build/security-report/security_scan.sh $KS_VERSION_TAG ${{ secrets.SNYK_AUTH_TOKEN }}
- name: Upload reports
run: |
chmod u+x ./build/security-report/upload.sh
./build/security-report/upload.sh $KS_VERSION ${{ secrets.SEC_AWS_S3_BUCKET }} ${{ secrets.SEC_AWS_ACCESS_KEY_ID }} ${{ secrets.SEC_AWS_SECRET_ACCESS_KEY }}
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/katalon-github-oidc-federation
role-session-name: github-actions-$TEAM-$SERVICE
aws-region: ${{ vars.AWS_REGION }}
- name: Upload Reports to S3
run: |
aws s3 cp ./build/security-report/security_report_trivy.html s3://${{ secrets.AWS_S3_BUCKET }}/$KS_VERSION/security_report_trivy.html
aws s3 cp ./build/security-report/security_report_snyk.html s3://${{ secrets.AWS_S3_BUCKET }}/$KS_VERSION/security_report_snyk.html