Repository navigation
71 lines (66 loc) · 2.8 KB
/
Copy pathfuzz.yml
File metadata and controls
71 lines (66 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Fuzz
# The cargo-fuzz targets in core/fuzz: the `.ids` and `.idp` parsers and the
# schema compiler behind them, on any text, and the guarantee-safety oracle
# (`unverified_oracle`) on arbitrary package graphs. A pull request that
# touches the compiler runs each target for a minute, seeded from the repo's
# own schemas and configs (the oracle's, from nothing: its input is a graph).
# The nightly run gives each target ten minutes on every core of the runner
# (libFuzzer's fork mode) from a corpus cached between runs, and opens an
# issue on a failure instead of blocking anyone's pull request.
# See core/fuzz/README.md.
#
# The jobs are the shared reusable workflow's (ComlineProject/.github,
# fuzz.yml), run in the fuzz CI image (nightly and cargo-fuzz in it, nothing
# installed here).
#
# Every run writes `core.fuzz.json` (seconds, executions, corpus and findings
# per target; the Observatory's `fuzz` kind) with the Observatory's
# report-fuzz action. A run on `master` (the nightly, or a manual one) also
# commits it to the `reports` branch; only the `publish` job can write, and
# never on a pull request.
on:
pull_request:
paths:
- "core/**"
- "core_stdlib/**"
- "Cargo.toml"
- ".github/workflows/fuzz.yml"
schedule:
- cron: "47 3 * * *"
workflow_dispatch:
permissions:
contents: read
# A newer push to the same pull request supersedes this run; the nightly and
# manual runs of a branch queue.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
fuzz:
name: fuzz
# What the reusable workflow's jobs may ask for: `issues: write` for the
# fuzz jobs (the nightly's issue), `contents: write` for the publish job
# alone (never on a pull request).
permissions:
contents: write
issues: write
uses: ComlineProject/.github/.github/workflows/fuzz.yml@807dd25bcbf848275f5f2bc5dcdd15070dcc321b # main, no release tag yet
with:
image: ghcr.io/comlineproject/ci-fuzz@sha256:d18222e3007d318c73b1df500d997222ff6dca536b4b0e89e6ab7e55fc81326a
# One minute per target on a pull request, ten (on every core) nightly.
# The oracle's input is a package graph: no tokens to give it.
targets: >-
[
{"target": "ids_parse", "dict": "ids.dict"},
{"target": "ids_compile", "dict": "ids.dict"},
{"target": "idp_parse", "dict": "idp.dict"},
"unverified_oracle"
]
fuzz-dir: core/fuzz
# Inputs stop at 1 KiB: the parser costs about a millisecond per
# kilobyte under the sanitizer, and what it gets wrong shows up in
# short inputs.
libfuzzer-args: -max_len=1024
report-path: reports/core.fuzz.json
publish: true
default-branch: master