-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (65 loc) · 2.34 KB
/
fuzz.yml
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
name: Fuzz
on:
schedule:
- cron: '11 14 * * 0' # every Sunday at 2:11pm
workflow_dispatch:
jobs:
fuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Coursier cache
uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: adopt:8
apps: sbt scala
- name: Build JAR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt 'fuzz / assembly'
- name: Download Jazzer
uses: robinraju/[email protected]
with:
repository: CodeIntelligenceTesting/jazzer
latest: true
filename: jazzer-linux.tar.gz
extract: true
- name: DiscoverSchemaFuzzer
continue-on-error: true
run: |
/usr/bin/timeout 5m ./jazzer \
--cp=./jazzer_standalone.jar \
--cp=fuzz/target/scala-2.13/fuzz.jar \
--target_class=io.github.dataunitylab.jsonoid.discovery.DiscoverSchemaFuzzer \
-dict=fuzz/test/resources/json.dict \
fuzz/test/resources || code=$?; \
if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi
- name: Generate example schemas
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt generateSchemas
- name: JsonSchemaFuzzer
continue-on-error: true
run: |
/usr/bin/timeout 5m ./jazzer \
--cp=./jazzer_standalone.jar \
--cp=fuzz/target/scala-2.13/fuzz.jar \
--target_class=io.github.dataunitylab.jsonoid.discovery.schemas.JsonSchemaFuzzer \
--disabled_hooks=com.code_intelligence.jazzer.sanitizers.RegexInjection \
-dict=fuzz/test/resources/json.dict \
target/jsonoid-schemas || code=$?; \
if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi
- uses: actions/upload-artifact@v4
with:
name: crash
path: |
./crash-*
./Crash-*.java
- name: Clean up
run: |
rm -rf "$HOME/.ivy2/local" || true
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true