2020-04-24 12:00:44 +02:00
---
# vi: ts=2 sw=2 et:
2021-10-01 12:10:22 +02:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2020-04-24 12:00:44 +02:00
# See: https://google.github.io/oss-fuzz/getting-started/continuous-integration/
name : CIFuzz
2021-11-13 14:40:20 +00:00
2021-11-13 22:34:04 +00:00
permissions :
contents : read
2021-11-13 14:40:20 +00:00
2020-05-08 18:46:46 +02:00
on :
pull_request :
paths :
- '**/meson.build'
- '.github/workflows/**'
- 'meson_options.txt'
- 'src/**'
- 'test/fuzz/**'
- 'tools/oss-fuzz.sh'
2020-05-08 20:14:19 +02:00
push :
branches :
2021-01-21 13:52:18 +00:00
- main
2020-04-24 12:00:44 +02:00
jobs :
2021-11-10 16:42:07 +01:00
Fuzzing :
2024-06-07 10:55:53 +02:00
# FIXME: Figure out why 32-bit applications fail to run in docker on Ubuntu 24.04.
runs-on : ubuntu-22.04
2021-11-10 16:42:07 +01:00
if : github.repository == 'systemd/systemd'
2021-11-10 16:45:12 +01:00
concurrency :
2022-05-29 14:15:15 +00:00
group : ${{ github.workflow }}-${{ matrix.sanitizer }}-${{ matrix.architecture }}-${{ github.ref }}
2021-11-10 16:45:12 +01:00
cancel-in-progress : true
2021-11-10 16:42:07 +01:00
strategy :
fail-fast : false
matrix :
sanitizer : [ address, undefined, memory]
2022-05-29 14:15:15 +00:00
architecture : [ x86_64]
include :
- sanitizer : address
architecture : i386
2023-06-05 01:37:34 -04:00
permissions :
security-events : write
2021-11-10 16:42:07 +01:00
steps :
2023-08-30 19:58:14 +02:00
- name : Build Fuzzers
2021-11-10 16:42:07 +01:00
id : build
uses : google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with :
oss-fuzz-project-name : 'systemd'
dry-run : false
allowed-broken-targets-percentage : 0
2022-02-11 02:01:33 +00:00
# keep-unaffected-fuzz-targets should be removed once https://github.com/google/oss-fuzz/issues/7011 is fixed
keep-unaffected-fuzz-targets : true
2021-11-10 16:42:07 +01:00
sanitizer : ${{ matrix.sanitizer }}
2022-05-29 14:15:15 +00:00
architecture : ${{ matrix.architecture }}
2023-06-05 01:37:34 -04:00
output-sarif : true
2023-08-30 19:58:14 +02:00
- name : Run Fuzzers
2021-11-10 16:42:07 +01:00
uses : google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with :
oss-fuzz-project-name : 'systemd'
fuzz-seconds : 600
dry-run : false
sanitizer : ${{ matrix.sanitizer }}
2023-06-05 01:37:34 -04:00
output-sarif : true
2021-11-10 16:42:07 +01:00
- name : Upload Crash
2024-03-01 09:18:57 +00:00
uses : actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
2021-11-10 16:42:07 +01:00
if : failure() && steps.build.outcome == 'success'
with :
2022-05-29 14:15:15 +00:00
name : ${{ matrix.sanitizer }}-${{ matrix.architecture }}-artifacts
2021-11-10 16:42:07 +01:00
path : ./out/artifacts
2023-06-05 01:37:34 -04:00
- name : Upload Sarif
if : always() && steps.build.outcome == 'success'
2024-10-01 09:17:13 +00:00
uses : github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13
2023-06-05 01:37:34 -04:00
with :
# Path to SARIF file relative to the root of the repository
sarif_file : cifuzz-sarif/results.sarif
checkout_path : cifuzz-sarif