Skip to content

ci: fix error failing atheris-libprotobuf-mutator build #4818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 29 additions & 10 deletions .github/workflows/fuzzing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
schedule:
- cron: '0 7 * * 1' # Runs at 07:00 on monday every week

workflow_dispatch:
workflow_dispatch:

permissions:
contents: read
Expand All @@ -13,17 +13,34 @@ jobs:
fuzzing:
name: Fuzzing
runs-on: ${{ github.repository_owner == 'intel' && 'intel-ubuntu-latest' || 'ubuntu-latest' }}
if: github.event.repository.fork == false
if: github.event.repository.fork == false
steps:
- name: Check out code
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.9
python-version: 3.10.16

- name: Install Bazel
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential gcc g++ cmake

- name: Install newer GCC
run: |
sudo apt-get update
sudo apt-get install -y gcc-10 g++-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100

- name: Set up compiler environment
run: |
export CC=gcc
export CXX=g++

- name: Install Bazel
run: |
sudo apt-get update
sudo apt-get install -y wget
Expand All @@ -32,11 +49,12 @@ jobs:
sudo mv bazel-7.4.1-linux-x86_64 /usr/local/bin/bazel
bazel --version

- name: Install Fuzzing Dependencies
- name: Install Fuzzing Dependencies
run: |
pip install --upgrade atheris
pip install --upgrade atheris-libprotobuf-mutator
pip install --upgrade atheris-libprotobuf-mutator -v
pip install --upgrade protobuf

- name: Install Cve-bin-tool
run: |
python -m pip install --upgrade pip
Expand All @@ -56,21 +74,22 @@ jobs:
with:
path: fuzz-cache
key: Linux-cve-bin-tool-${{ steps.get-date.outputs.date }}

- name: Get yesterday's cached database if today's is not available
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
if: steps.todays-cache.outputs.cache-hit != 'true'
with:
path: fuzz-cache
key: Linux-cve-bin-tool-${{ steps.get-date.outputs.yesterday }}

- name: Try single CLI run of tool
if: env.sbom != 'true'
run: |
[[ -e fuzz-cache ]] && mkdir -p .cache && mv fuzz-cache ~/.cache/cve-bin-tool
NO_EXIT_CVE_NUM=1 python -m cve_bin_tool.cli test/assets/test-kerberos-5-1.15.1.out --disable-data-source CURL,EPSS,GAD,NVD,OSV,PURL2CPE,RSD
cp -r ~/.cache/cve-bin-tool fuzz-cache

- name: Run Fuzzing
- name: Run Fuzzing
id: fuzzing
env:
PYTHONPATH: ${{ github.workspace }}
Expand Down
Loading