Skip to content

Commit

Permalink
Update Mayhem integration structure
Browse files Browse the repository at this point in the history
  • Loading branch information
rnshah9 authored and ForAllSecure Mayhem Bot committed Oct 15, 2024
1 parent 441f306 commit 23930b8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions .github/workflows/mayhem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ env:

jobs:
build:
permissions: write-all
name: '${{ matrix.os }} shared=${{ matrix.shared }} ${{ matrix.build_type }}'
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -23,40 +22,56 @@ jobs:
triplet: x64-linux

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: true
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 }}
password: ${{ secrets.GITHUB_TOKEN }}

- 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
File renamed without changes.
File renamed without changes.

0 comments on commit 23930b8

Please sign in to comment.