Skip to content

Commit 7442070

Browse files
committed
Merge commercial repo (origin/main) back into open-source
Syncs all changes from jazzer.js-commercial back into the open-source repo: - Features: SSRF bug detector, eval/Function sanitizers, global function hooking, per-test dictionaries, built-in class function hooking - Breaking changes: FDP uses UTF-8 for strings, removed printable string generation - Releases: 3.0.0 and 3.1.0 - CI: updated pipelines, self-hosted macOS runner, grouped dependabot PRs - Dependency bumps to latest versions Conflict resolution: - All package.json/package-lock.json conflicts resolved by taking origin/main (newer dependency versions) - Restored Apache 2.0 LICENSE (removed in commercial repo) - Removed 'no longer open source' README banner (re-open-sourcing)
2 parents 592be5c + ecdee03 commit 7442070

214 files changed

Lines changed: 9566 additions & 9068 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,10 @@ updates:
33
- package-ecosystem: "npm"
44
directory: "/"
55
schedule:
6-
interval: "daily"
6+
interval: "weekly"
77
versioning-strategy: increase
8+
groups:
9+
minor-dependencies:
10+
update-types:
11+
- "minor"
12+
- "patch"

.github/workflows/prerelease.yaml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,52 @@
11
name: "🚀 Release"
22

33
on:
4-
release:
5-
types: [released]
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "v*.*.*"
68

79
jobs:
10+
prebuilds:
11+
name: create prebuilds
12+
strategy:
13+
matrix:
14+
os: [ubuntu-20.04, selfhosted-macos, windows-2019]
15+
opts: [""]
16+
include:
17+
- os: selfhosted-macos
18+
opts: "--arch x86_64"
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- name: checkout
22+
uses: actions/checkout@v3
23+
- name: node
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: 16
27+
cache: "npm"
28+
- name: MSVC (windows)
29+
uses: ilammy/msvc-dev-cmd@v1
30+
if: contains(matrix.os, 'windows')
31+
- name: install dependencies
32+
run: npm ci
33+
- name: build
34+
run: |
35+
npm run prebuild --workspace=@jazzer.js/fuzzer -- ${{ matrix.opts }}
36+
npm run build --workspace=@jazzer.js/fuzzer -- ${{ matrix.opts }}
37+
- name: upload
38+
uses: actions/upload-artifact@v3
39+
with:
40+
name: native-addon
41+
path: packages/fuzzer/prebuilds
42+
if-no-files-found: error
43+
844
release:
945
name: release
46+
needs: [prebuilds]
1047
runs-on: ubuntu-20.04
48+
permissions:
49+
contents: write # for creating releases
1150
steps:
1251
- name: checkout
1352
uses: actions/checkout@v3
@@ -16,10 +55,31 @@ jobs:
1655
with:
1756
node-version: 16
1857
cache: "npm"
19-
registry-url: https://registry.npmjs.org
20-
- name: install & build
21-
run: npm ci && npm run build
22-
- name: publish to npm
58+
registry-url: https://gitlab.code-intelligence.com/api/v4/projects/89/packages/npm/
59+
- name: install
60+
run: npm ci
61+
- name: build
62+
run: npm run build
63+
- name: download prebuilds
64+
uses: actions/download-artifact@v3
65+
with:
66+
name: native-addon
67+
path: packages/fuzzer/prebuilds
68+
if-no-files-found: error
69+
- name: publish
2370
run: npm publish --workspaces --access public
2471
env:
2572
NODE_AUTH_TOKEN: ${{secrets.NPM_ACCESS_TOKEN}}
73+
# create GitHub release
74+
- name: read version
75+
id: read-version
76+
run: |
77+
echo ::set-output name=version::\
78+
$(cat ./package.json | jq '.version' | tr -d '"')
79+
shell: bash
80+
- name: create release
81+
uses: softprops/action-gh-release@v1
82+
with:
83+
name: Release ${{ steps.read-version.outputs.version }}
84+
body_path: ./.github/release_template.md
85+
generate_release_notes: true
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: "🔍 Tests Main"
2+
on:
3+
push:
4+
branches: [main]
5+
merge_group:
6+
workflow_dispatch:
7+
concurrency:
8+
group:
9+
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
jobs:
12+
tests:
13+
name: tests
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [windows-2019, ubuntu-20.04, selfhosted-macos]
18+
node: [16]
19+
include:
20+
# Test LTS versions on main
21+
# 18 on Ubuntu is sufficient, and 20 already tested in PR
22+
- os: ubuntu-20.04
23+
node: 18
24+
steps:
25+
- name: checkout
26+
uses: actions/checkout@v3
27+
- uses: actions/cache@v3
28+
id: cache-fuzzer
29+
with:
30+
path: |
31+
packages/fuzzer/prebuilds
32+
key:
33+
fuzzer-cache-${{ matrix.os }}-${{
34+
hashFiles('packages/fuzzer/CMakeLists.txt',
35+
'packages/fuzzer/**/*.h', 'packages/fuzzer/**/*.cpp') }}
36+
- name: node
37+
uses: actions/setup-node@v3
38+
with:
39+
node-version: ${{ matrix.node }}
40+
cache: "npm"
41+
- name: MSVC (windows)
42+
uses: ilammy/msvc-dev-cmd@v1
43+
if: contains(matrix.os, 'windows')
44+
- name: install dependencies
45+
run: npm ci
46+
- name: build project
47+
run: npm run build
48+
- name: build fuzzer
49+
if: ${{ steps.cache-fuzzer.outputs.cache-hit != 'true' }}
50+
run: npm run build --workspace=@jazzer.js/fuzzer
51+
- name: run all tests
52+
run: npm run test
53+
fuzz_tests:
54+
name: fuzz tests
55+
runs-on: ubuntu-20.04
56+
steps:
57+
- name: checkout
58+
uses: actions/checkout@v3
59+
- uses: actions/cache@v3
60+
id: cache-fuzzer
61+
with:
62+
path: |
63+
packages/fuzzer/prebuilds
64+
key:
65+
fuzzer-cache-${{ runner.os }}-${{
66+
hashFiles('packages/fuzzer/CMakeLists.txt',
67+
'packages/fuzzer/**/*.h', 'packages/fuzzer/**/*.cpp') }}
68+
- name: node
69+
uses: actions/setup-node@v3
70+
with:
71+
node-version: 16
72+
cache: "npm"
73+
- name: install dependencies
74+
run: npm ci
75+
- name: build project
76+
run: npm run build
77+
- name: build fuzzer
78+
if: ${{ steps.cache-fuzzer.outputs.cache-hit != 'true' }}
79+
run: npm run build --workspace=@jazzer.js/fuzzer
80+
- name: run all fuzz tests
81+
run: node fuzztests/runFuzzTests.js
82+
end-to-end:
83+
name: end-to-end
84+
runs-on: ubuntu-20.04
85+
steps:
86+
- name: checkout
87+
uses: actions/checkout@v3
88+
# Build with node.js 16
89+
- name: node
90+
uses: actions/setup-node@v3
91+
with:
92+
node-version: 16
93+
cache: "npm"
94+
- name: pack jazzer.js
95+
run: cd end-to-end && ./package-jazzer-js.sh
96+
- name: build example
97+
run: cd end-to-end && npm install --save-dev *.tgz && npm run build
98+
99+
# Run with different node.js versions
100+
# all in one job to avoid rebuilding
101+
- name: "node 14"
102+
uses: actions/setup-node@v3
103+
with:
104+
node-version: 14
105+
cache: "npm"
106+
- name: run tests
107+
run: cd end-to-end && npx jest
108+
109+
- name: "node 16"
110+
uses: actions/setup-node@v3
111+
with:
112+
node-version: 16
113+
cache: "npm"
114+
- name: run tests
115+
run: cd end-to-end && npx jest
116+
117+
- name: "node 18"
118+
uses: actions/setup-node@v3
119+
with:
120+
node-version: 18
121+
cache: "npm"
122+
- name: run tests
123+
run: cd end-to-end && npx jest
124+
125+
- name: "node 20"
126+
uses: actions/setup-node@v3
127+
with:
128+
node-version: 20
129+
cache: "npm"
130+
- name: run tests
131+
run: cd end-to-end && npx jest

0 commit comments

Comments
 (0)