Skip to content

fix snyk.sarif file path #45

fix snyk.sarif file path

fix snyk.sarif file path #45

name: Build and Push rapid7/metasploit-framework to burso/metasploit-framework
on:
push:
branches:
- main # Change to your default branch if not main
pull_request:
branches:
- main # Change to your default branch if not main
jobs:
build-and-push:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: snyk/actions/setup@master
- name: Set release version
id: set_version
run: echo "RELEASE_VERSION=6.4.38" >> $GITHUB_ENV
- name: Clone Metasploit Framework repository at specific version
run: |
git clone --branch ${{ env.RELEASE_VERSION }} https://github.com/rapid7/metasploit-framework.git
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push Docker image
run: |
docker buildx build --push \
--tag ${{ secrets.DOCKER_HUB_USERNAME }}/metasploit-framework:${{ env.RELEASE_VERSION }} \
--tag ${{ secrets.DOCKER_HUB_USERNAME }}/metasploit-framework:latest
--platform linux/amd64,linux/arm64 ./metasploit-framework
- name: Logout from Docker Hub
run: docker logout
- name: Check burso/metasploit-framework image
uses: snyk/actions/docker@master
with:
image: burso/metasploit-framework
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif