From c4a0545f8124bf418ba1ac97241dce89adae68bb Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Thu, 17 Nov 2022 06:13:18 +0000 Subject: [PATCH] Update Mayhem integration structure --- .github/workflows/mayhem.yml | 42 ++++++++++++++------------ Dockerfile.mayhem => mayhem/Dockerfile | 0 Mayhemfile => mayhem/Mayhemfile | 0 3 files changed, 22 insertions(+), 20 deletions(-) rename Dockerfile.mayhem => mayhem/Dockerfile (100%) rename Mayhemfile => mayhem/Mayhemfile (100%) diff --git a/.github/workflows/mayhem.yml b/.github/workflows/mayhem.yml index c5521d85..f7e20fcf 100644 --- a/.github/workflows/mayhem.yml +++ b/.github/workflows/mayhem.yml @@ -10,18 +10,9 @@ env: jobs: build: + name: 'Build mayhem fuzzing container' permissions: write-all - name: '${{ matrix.os }} shared=${{ matrix.shared }} ${{ matrix.build_type }}' - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - shared: [false] - build_type: [Release] - include: - - os: ubuntu-latest - triplet: x64-linux - + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: @@ -43,20 +34,31 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: - file: ./Dockerfile.mayhem context: . + file: mayhem/Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - name: Start analysis + outputs: + image: ${{ steps.meta.outputs.tags }} + + mayhem: + needs: build + name: 'fuzz ${{ matrix.mayhemfile }}' + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + mayhemfile: + - mayhem/Mayhemfile + + steps: + - uses: actions/checkout@v2 + + - name: Start analysis for ${{ matrix.mayhemfile }} uses: ForAllSecure/mcode-action@v1 with: mayhem-token: ${{ secrets.MAYHEM_TOKEN }} - args: --image ${{ steps.meta.outputs.tags }} - sarif-output: sarif - - - name: Upload SARIF file(s) - uses: github/codeql-action/upload-sarif@v1 - with: - sarif_file: sarif + args: --image ${{ needs.build.outputs.image }} --file ${{ matrix.mayhemfile }} --duration 300 + sarif-output: sarif \ No newline at end of file diff --git a/Dockerfile.mayhem b/mayhem/Dockerfile similarity index 100% rename from Dockerfile.mayhem rename to mayhem/Dockerfile diff --git a/Mayhemfile b/mayhem/Mayhemfile similarity index 100% rename from Mayhemfile rename to mayhem/Mayhemfile