forked from intel/cve-bin-tool
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into version_compare
- Loading branch information
Showing
15 changed files
with
303 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Fuzzing | ||
|
||
on: | ||
schedule: | ||
- cron: '0 7 * * 1' # Runs at 07:00 on monday every week | ||
|
||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
fuzzing: | ||
name: Fuzzing | ||
runs-on: ubuntu-22.04 | ||
if: github.event.repository.fork == false | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install Bazel | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y wget | ||
wget -c https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64 | ||
chmod +x bazelisk-linux-amd64 | ||
sudo mv bazelisk-linux-amd64 /usr/local/bin/bazel | ||
bazel --version | ||
- name: Install Fuzzing Dependencies | ||
run: | | ||
pip install --upgrade atheris | ||
pip install --upgrade atheris-libprotobuf-mutator | ||
pip install --upgrade protobuf | ||
- name: Install Cve-bin-tool | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade setuptools | ||
python -m pip install --upgrade -r dev-requirements.txt | ||
python -m pip install --upgrade . | ||
- name: Run Fuzzing | ||
id: fuzzing | ||
env: | ||
PYTHONPATH: ${{ github.workspace }} | ||
run: | | ||
cd fuzz | ||
export PYTHONPATH="$PYTHONPATH:/generated" | ||
fuzzing_scripts=($(ls *.py)) | ||
echo "Found Fuzzing scripts: ${fuzzing_scripts[@]}" | ||
current_week=($(date -u +%U)) | ||
echo "Current week number: $current_week" | ||
at_index=$((($(date -u +%U) % ${#fuzzing_scripts[@]}))) | ||
selected_script="${fuzzing_scripts[$at_index]}" | ||
echo "Selected script: $selected_script" | ||
timeout --preserve-status --signal=SIGINT 60m python $selected_script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -339,6 +339,7 @@ | |
"xscreensaver", | ||
"yasm", | ||
"zabbix", | ||
"zchunk", | ||
"zeek", | ||
"zlib", | ||
"znc", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright (C) 2023 Orange | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
|
||
""" | ||
CVE checker for zchunk | ||
https://www.cvedetails.com/product/163243/Zchunk-Zchunk.html?vendor_id=33326 | ||
""" | ||
from __future__ import annotations | ||
|
||
from cve_bin_tool.checkers import Checker | ||
|
||
|
||
class ZchunkChecker(Checker): | ||
CONTAINS_PATTERNS: list[str] = [] | ||
FILENAME_PATTERNS: list[str] = [] | ||
VERSION_PATTERNS = [r"zchunk ([0-9]+\.[0-9]+\.[0-9]+)"] | ||
VENDOR_PRODUCT = [("zchunk", "zchunk")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.