From 8da17e93332d1564fbad4bbe0afc11b65b3960a0 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Fri, 10 Jan 2025 09:19:34 +0000 Subject: [PATCH] feat(COD-4237): remove the SCA version check --- .github/workflows/integration-test.yml | 1 + action.yaml | 27 ++------------------------ 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index a7d359a1..fda81e14 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -64,5 +64,6 @@ jobs: echo "Got $SCA_RESULTS from SCA" if [ "$SCA_RESULTS" != "$expectedScaResults" ]; then echo "::error::Expected to have $expectedScaResults SCA results!" + cat sca.sarif exit 1 fi diff --git a/action.yaml b/action.yaml index 1d16b26d..1de31875 100644 --- a/action.yaml +++ b/action.yaml @@ -63,42 +63,19 @@ runs: echo "Lacework context ID: $LACEWORK_CONTEXT_ID" echo "LACEWORK_CONTEXT_ID=$(echo $LACEWORK_CONTEXT_ID)" >> $GITHUB_ENV echo "LACEWORK_ACTION_REF=$(echo $LACEWORK_ACTION_REF)" >> $GITHUB_ENV - SCA_VERSION=0.1.23 curl https://raw.githubusercontent.com/lacework/go-sdk/main/cli/install.sh | bash - KEY="$(date +'%Y-%m-%d')" - KEY="$KEY-$RUNNER_OS-$RUNNER_ARCH" - KEY="$KEY-sca-$SCA_VERSION" - echo "sca-version=$SCA_VERSION" >> $GITHUB_OUTPUT - HASH="$(echo $KEY | md5sum | head -c 8)" - echo "cache-key=$HASH" >> $GITHUB_OUTPUT - - id: cache - uses: actions/cache/restore@v3 - with: - path: ~/.config/lacework/components - key: lacework-${{ steps.init.outputs.cache-key }} - name: Sets LW_LOG var for debug shell: bash if: ${{ inputs.debug == 'true' }} run: | echo "LW_LOG=debug" >> $GITHUB_ENV - - if: steps.cache.outputs.cache-hit != 'true' + - name: Install Lacework CLI component shell: bash run: | - echo "::group::Installing Lacework CLI components" - if [[ "${{ steps.init.outputs.sca-version }}" != "" ]]; then - lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" component install sca --version "${{ steps.init.outputs.sca-version }}" - fi - echo "::endgroup::" - echo "::group::Printing Lacework CLI information" + lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" component install sca lacework --noninteractive -a "${LW_ACCOUNT_NAME}" -k "${LW_API_KEY}" -s "${LW_API_SECRET}" version - echo "::endgroup::" env: CDK_DOWNLOAD_TIMEOUT_MINUTES: 2 - - if: steps.cache.outputs.cache-hit != 'true' - uses: actions/cache/save@v3 - with: - path: ~/.config/lacework/components - key: lacework-${{ steps.init.outputs.cache-key }} - uses: actions/setup-node@v3 with: node-version: 16