diff --git a/.github/workflows/mayhem.yml b/.github/workflows/mayhem.yml index c5521d85..1886da48 100644 --- a/.github/workflows/mayhem.yml +++ b/.github/workflows/mayhem.yml @@ -10,7 +10,6 @@ env: jobs: build: - permissions: write-all name: '${{ matrix.os }} shared=${{ matrix.shared }} ${{ matrix.build_type }}' runs-on: ${{ matrix.os }} strategy: @@ -23,12 +22,12 @@ jobs: triplet: x64-linux steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + uses: docker/login-action@v2.1.0 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -36,27 +35,43 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v4.1.1 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@v3.2.0 with: - file: ./Dockerfile.mayhem context: . push: true + file: mayhem/Dockerfile 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@v3 + + - name: Start analysis for ${{ matrix.mayhemfile }} uses: ForAllSecure/mcode-action@v1 with: mayhem-token: ${{ secrets.MAYHEM_TOKEN }} - args: --image ${{ steps.meta.outputs.tags }} + args: --image ${{ needs.build.outputs.image }} --file ${{ matrix.mayhemfile }} --duration 300 sarif-output: sarif - name: Upload SARIF file(s) - uses: github/codeql-action/upload-sarif@v1 + uses: github/codeql-action/upload-sarif@v2 with: sarif_file: sarif 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