Skip to content

Commit

Permalink
Merge pull request #12214 from swagger-api/add_scanning
Browse files Browse the repository at this point in the history
Adding scanning of built container
  • Loading branch information
keithbsb authored Aug 15, 2023
2 parents de33c6f + e77aca8 commit 0ba698d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-release-3.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ jobs:
docker tag $DOCKER_GENERATOR_ROOT_FULL_IMAGE_NAME:${{ env.TAG }} $DOCKER_GENERATOR_FULL_IMAGE_NAME:${{ env.TAG }}-root
docker push $DOCKER_GENERATOR_FULL_IMAGE_NAME:$${{ env.TAG }}-root
env:
TAG: ${{ github.event.inputs.tag }}
TAG: ${{ github.event.inputs.tag }}
17 changes: 17 additions & 0 deletions .github/workflows/maven-master-pulls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,20 @@ jobs:
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B -U verify --file pom.xml

scan-with-lacework:
name: Trigger LaceWork Scanning
runs-on: ubuntu-latest

needs: [ build ]
if: success()

steps:
- name: Trigger LaceWork Scanning using a different method
run: |
docker run -e LW_ACCOUNT_NAME=$LW_ACCOUNT_NAME -e LW_ACCESS_TOKEN=$LW_ACCESS_TOKEN -e LW_SCANNER_SAVE_RESULTS=true -e LW_SCANNER_DISABLE_UPDATES=false -v /var/run/docker.sock:/var/run/docker.sock lacework/lacework-inline-scanner:latest image evaluate swaggerapi/swagger-codegen-cli latest --docker-server index.docker.io --docker-username $docker_user --docker-password $docker_password > /dev/null 2>&1
env:
LW_ACCOUNT_NAME: ${{ secrets.LW_ACCOUNT_NAME }}
LW_ACCESS_TOKEN: ${{ secrets.LW_ACCESS_TOKEN }}
docker_user: ${{ secrets.DOCKERHUB_SB_USERNAME}}
docker_password: ${{ secrets.DOCKERHUB_SB_PASSWORD}}
2 changes: 1 addition & 1 deletion .github/workflows/maven-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME:unstable
else
echo "not deploying release nor building and pushing release docker image: " ${MY_POM_VERSION}
fi
fi

0 comments on commit 0ba698d

Please sign in to comment.