Skip to content

Corpus Generation

Corpus Generation #658

Workflow file for this run

name: Corpus Generation
on:
workflow_dispatch:
push:
branches: [ "main" ]
paths:
- files/*
- .github/workflows/corpusgen.yml
schedule:
- cron: '1 1 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/setup-go@v4.0.0
- name: Clone syzkaller and prep corpus
run: |
cd ..
git clone https://github.com/google/syzkaller
cd syzkaller
git checkout 9efbf01ce756705010a1d1627bc76b3636ab43c0
cd tools/syz-db
go run syz-db.go pack ../../../linux-kernel-enriched-corpus/files enriched_corpus.db
cp -v enriched_corpus.db ../../../linux-kernel-enriched-corpus/corpus.db
wget https://storage.googleapis.com/syzkaller/corpus/ci-qemu-upstream-corpus.db -O ../../../linux-kernel-enriched-corpus/ci-qemu-upstream-corpus.db
echo "Downloaded Corpus From Syz-CI"
go run syz-db.go unpack ../../../linux-kernel-enriched-corpus/ci-qemu-upstream-corpus.db temp/
echo "Unpacking Retrived Corpus"
for f in ../../../linux-kernel-enriched-corpus/files/* ; do cp -v "$f" temp/ ; done
echo "Packing Enriched Syz-CI Google Corpus"
go run syz-db.go pack temp ../../../linux-kernel-enriched-corpus/enriched-ci-qemu-upstream-corpus.db
cd ../../../
rm -vr syzkaller
cd linux-kernel-enriched-corpus
- name: zip artifacts
run: |
zip --junk-paths enriched-corpus *.db
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
automatic_release_tag: "latest"
title: "Daily Enriched Corpus"
files: |
LICENSE
*.db
enriched-corpus.zip
- name: Remove Zip
run: |
rm -v enriched-corpus.zip
find -maxdepth 1 -name "*.db" -size +50M -delete
echo "Deleted Files Larger Than 100MB before Pushing to GitHub"
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Git Version
id: version
uses: paulhatch/semantic-version@v5.0.2
with:
change_path: ./
bump_each_commit: true