Skip to content

scan again

scan again #3

name: KRE ECR scan
on:
push:
branches:
- security-refactor
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
run:
name: Run
runs-on: ubuntu-latest
env:
KRE_VERSION: 10.2.0
DOCKER_IMAGE_PUBLISHED_TAG: 10.2.0-rc
DD_URL: ${{ secrets.DD_URL }}
DD_API_KEY: ${{ secrets.DD_TOKEN }}
DD_PRODUCT_TYPE_NAME: Katalon Studio
DD_PRODUCT_NAME: Katalon Studio Enterprise
DD_SSL_VERIFY: 0
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::002582244933:role/katalon-github-oidc-federation
role-session-name: github-actions
aws-region: us-east-1
mask-aws-account-id: "no"
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v1
- name: scan ecr
run: |
set -e
sudo apt-get install wget gnupg
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | gpg --dearmor | sudo tee /usr/share/keyrings/trivy.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/trivy.gpg] https://aquasecurity.github.io/trivy-repo/deb generic main" | sudo tee -a /etc/apt/sources.list.d/trivy.list
sudo apt-get update
sudo apt-get install trivy
pip3 install dd-import
trivy image --format json -o trivy_ecr.json 002582244933.dkr.ecr.us-east-1.amazonaws.com/katalon-studio:$DOCKER_IMAGE_PUBLISHED_TAG
- name: Upload 10-latest to DefectDojo
env:
DD_ENGAGEMENT_NAME: Container Scan
DD_TEST_NAME: Trivy
DD_TEST_TYPE_NAME: Trivy Scan
DD_FILE_NAME: trivy_ecr.json
DD_SERVICE: dd-import
DD_VERSION: ${{ DOCKER_IMAGE_PUBLISHED_TAG }}

Check failure on line 52 in .github/workflows/container-scan.yml

View workflow run for this annotation

GitHub Actions / KRE ECR scan

Invalid workflow file

The workflow is not valid. .github/workflows/container-scan.yml (Line: 52, Col: 23): Unrecognized named-value: 'DOCKER_IMAGE_PUBLISHED_TAG'. Located at position 1 within expression: DOCKER_IMAGE_PUBLISHED_TAG
DD_GROUP_BY: file_path
run: |
dd-reimport-findings