Skip to content

Commit

Permalink
feat(COD-4237): remove the SCA version check
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydubreil committed Jan 10, 2025
1 parent 8c0de50 commit 8da17e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
1 change: 1 addition & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
27 changes: 2 additions & 25 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8da17e9

Please sign in to comment.