Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 509da83

Browse files
authored
Merge branch 'main' into tevoinea/FuzzCoverageRecording
2 parents 9b9f87b + d34138d commit 509da83

File tree

239 files changed

+7152
-7325
lines changed

Some content is hidden

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

239 files changed

+7152
-7325
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG VARIANT="ubuntu-22.04"
55
FROM mcr.microsoft.com/devcontainers/base:${VARIANT}
66

77
# note: keep this in sync with .github/workflows/ci.yml
8-
ARG RUSTVERSION="1.71"
8+
ARG RUSTVERSION="1.71.1"
99

1010
# Install packages required for build:
1111
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"**/target/**": true
1414
},
1515
"lldb.executable": "/usr/bin/lldb",
16+
"dotnet.server.useOmnisharp": true,
1617
"omnisharp.enableEditorConfigSupport": true,
1718
"omnisharp.enableRoslynAnalyzers": true,
1819
"python.defaultInterpreterPath": "/workspaces/onefuzz/src/venv/bin/python",
@@ -48,4 +49,4 @@
4849
"features": {
4950
"ghcr.io/devcontainers/features/azure-cli:1": {}
5051
}
51-
}
52+
}

.gitattributes

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
* text=auto
2-
*.ps1 text=crlf
1+
* text=auto
2+
*.ps1 text eol=crlf
3+
*.sh text eol=lf

.github/workflows/ci.yml

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ concurrency:
1616

1717
env:
1818
CARGO_TERM_COLOR: always
19-
ACTIONS_CACHE_KEY_DATE: 2023-06-19
19+
ACTIONS_CACHE_KEY_DATE: 2023-08-10
2020
CI: true
2121

2222
jobs:
@@ -45,7 +45,7 @@ jobs:
4545
- name: Install specific Rust version
4646
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb # pinned latest master as of 2022-10-08
4747
with:
48-
toolchain: "1.71" # note: keep this in sync with .devcontainer/Dockerfile
48+
toolchain: "1.71.1" # note: keep this in sync with .devcontainer/Dockerfile
4949
components: clippy, rustfmt, llvm-tools-preview
5050
- name: Setup Rust problem-matchers
5151
uses: r7kamura/rust-problem-matchers@d58b70c4a13c4866d96436315da451d8106f8f08 # pinned to 1.3.0
@@ -79,16 +79,24 @@ jobs:
7979
key: ${{env.ACTIONS_CACHE_KEY_DATE}} # additional key for cache-busting
8080
workspaces: src/agent
8181
- name: Linux Prereqs
82-
if: runner.os == 'Linux' && steps.cache-agent-artifacts.outputs.cache-hit != 'true'
82+
if: runner.os == 'Linux'
8383
run: |
8484
sudo apt-get -y update
85-
sudo apt-get -y install libssl-dev libunwind-dev build-essential pkg-config
85+
sudo apt-get -y install libssl-dev libunwind-dev build-essential pkg-config clang
86+
- name: Clone onefuzz-samples
87+
run: git clone https://github.com/microsoft/onefuzz-samples
88+
- name: Prepare for agent integration tests
89+
shell: bash
90+
working-directory: ./onefuzz-samples/examples/simple-libfuzzer
91+
run: |
92+
make
93+
mkdir -p ../../../src/agent/onefuzz-task/tests/targets/simple
94+
cp fuzz.exe ../../../src/agent/onefuzz-task/tests/targets/simple/fuzz.exe
95+
cp *.pdb ../../../src/agent/onefuzz-task/tests/targets/simple/ 2>/dev/null || :
8696
- name: Install Rust Prereqs
87-
if: steps.rust-build-cache.outputs.cache-hit != 'true' && steps.cache-agent-artifacts.outputs.cache-hit != 'true'
8897
shell: bash
8998
run: src/ci/rust-prereqs.sh
9099
- run: src/ci/agent.sh
91-
if: steps.cache-agent-artifacts.outputs.cache-hit != 'true'
92100
shell: bash
93101
- name: Upload coverage to Codecov
94102
uses: codecov/codecov-action@v3
@@ -375,6 +383,10 @@ jobs:
375383
with:
376384
# use global.json to install the correct version
377385
global-json-file: global.json
386+
- name: install llVM
387+
run: |
388+
choco install llvm --version 16.0.6
389+
shell: powershell
378390
- run: src/ci/dotnet-fuzzing-tools.ps1
379391
shell: pwsh
380392
- uses: actions/upload-artifact@v3
@@ -527,7 +539,7 @@ jobs:
527539
uses: actions/cache@v3
528540
with:
529541
path: src/integration-tests/artifacts
530-
key: integration-tests|linux|${{ hashFiles('src/integration-tests/**/*') }}
542+
key: integration-tests|linux|${{ env.ACTIONS_CACHE_KEY_DATE }}|${{ hashFiles('src/integration-tests/**/*') }}
531543
- name: Build integration tests
532544
if: steps.cache-integration-tests.outputs.cache-hit != 'true'
533545
run: |
@@ -538,9 +550,11 @@ jobs:
538550
539551
mkdir -p artifacts/linux-libfuzzer
540552
mkdir -p artifacts/linux-libfuzzer-with-options
553+
mkdir -p artifacts/mariner-libfuzzer
541554
(cd libfuzzer ; make )
542555
cp -r libfuzzer/fuzz.exe libfuzzer/seeds artifacts/linux-libfuzzer
543556
cp -r libfuzzer/fuzz.exe libfuzzer/seeds artifacts/linux-libfuzzer-with-options
557+
cp -r libfuzzer/fuzz.exe libfuzzer/seeds artifacts/mariner-libfuzzer
544558
545559
mkdir -p artifacts/linux-libfuzzer-regression
546560
(cd libfuzzer-regression ; make )
@@ -590,15 +604,17 @@ jobs:
590604
name: artifact-integration-tests-linux
591605
path: src/integration-tests/artifacts
592606
build-integration-tests-windows:
593-
runs-on: windows-2019
607+
runs-on: windows-2022
594608
steps:
595609
- uses: actions/checkout@v3
596610
- name: Cache integration tests
597611
id: cache-integration-tests
598612
uses: actions/cache@v3
599613
with:
600614
path: src/integration-tests/artifacts
601-
key: integration-tests|windows|${{ hashFiles('src/integration-tests/**/*') }}
615+
key: integration-tests|windows|${{ env.ACTIONS_CACHE_KEY_DATE }}|${{ hashFiles('src/integration-tests/**/*') }}
616+
- name: Setup C/C++ environment
617+
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 # pinned to v1.12.1
602618
- name: Build integration tests
603619
if: steps.cache-integration-tests.outputs.cache-hit != 'true'
604620
run: |
@@ -609,33 +625,6 @@ jobs:
609625
choco install make
610626
$env:Path += ";C:\Program Files\LLVM\bin;C:\ProgramData\chocolatey\bin"
611627
612-
# WORKAROUND: effectively downgrade the default Windows 10 SDK version.
613-
#
614-
# This ensures we link against a version of the SDK which won't trigger a
615-
# startup bug in the LLVM-shipped ASAN runtime.
616-
617-
# Assume a default MSVC 2019 install path.
618-
$MsvcDir = 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC'
619-
620-
# Assume that `$MsvcDir` only contains version-named subdirectories.
621-
$MsvcVersion = ((Get-ChildItem $MsvcDir).name | Sort-Object -Descending)[0]
622-
$MsvcLib = "${MsvcDir}/${MsvcVersion}/lib/x64"
623-
624-
# Known "good" (non-bug-surfacing) version.
625-
$WindowsSdkVersion = '10.0.18362.0'
626-
627-
# Assume default install path.
628-
$WindowsSdkDir = 'C:/Program Files (x86)/Windows Kits/10'
629-
$WindowsSdkLib = "${WindowsSdkDir}/Lib/${WindowsSdkVersion}"
630-
$WindowsSdkInclude = "${WindowsSdkDir}/Include/${WindowsSdkVersion}"
631-
632-
# Used by `clang.exe`.
633-
$env:CPATH = $WindowsSdkInclude
634-
$env:LIBRARY_PATH = "${MsvcLib};${WindowsSdkLib}/ucrt/x64;${WindowsSdkLib}/um/x64"
635-
636-
# Used by `link.exe`.
637-
$env:LIB = $env:LIBRARY_PATH
638-
639628
cd src/integration-tests
640629
641630
mkdir artifacts/windows-libfuzzer

CHANGELOG.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,105 @@ All notable changes to this project will be documented in this file.
77
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
99

10+
## 8.8.0
11+
12+
### Added
13+
14+
* Agent: Added Mariner Linux support for agent VMs [#3306](https://github.com/microsoft/onefuzz/pull/3306)
15+
* Service: Added support for custom ado fields that mark work items as duplicate [#3467](https://github.com/microsoft/onefuzz/pull/3467)
16+
* Service: Permanently store OneFuzz job result data - # crashing input, # regression crashing input, etc. - in Azure storage [#3380](https://github.com/microsoft/onefuzz/pull/3380), [#3439](https://github.com/microsoft/onefuzz/pull/3439)
17+
* Service: Added validation for Iteration/AreaPath on notifications when a job is submitted with a notification config and for `onefuzz debug notification test_template` [#3386](https://github.com/microsoft/onefuzz/pull/3386)
18+
19+
### Changed
20+
21+
* Agent: Updated libfuzzer-fuzz basic template to include required args and make it match cli [#3429](https://github.com/microsoft/onefuzz/pull/3429)
22+
* Agent: Downgraded some debug logs from warn to debug [#3450](https://github.com/microsoft/onefuzz/pull/3450)
23+
* CLI: Removed CLI commands from the local fuzzing tasks as they can now be described via yaml template [#3428](https://github.com/microsoft/onefuzz/pull/3428)
24+
* Service: AutoScale table entries are now deleted on VMSS shutdown [#3455](https://github.com/microsoft/onefuzz/pull/3455)
25+
26+
### Fixed
27+
28+
* Agent: Fixed local path generation [#3432](https://github.com/microsoft/onefuzz/pull/3432), [#3460](https://github.com/microsoft/onefuzz/pull/3460)
29+
30+
## 8.7.1
31+
32+
### Fixed
33+
34+
* Service: Removed deprecated Azure retention policy setting that was causing scaleset deployment errors [#3452](https://github.com/microsoft/onefuzz/pull/3452)
35+
36+
## 8.7.0
37+
38+
### Added
39+
40+
* Agent: Added a snapshot-based test to coverage implementation [#3368](https://github.com/microsoft/onefuzz/pull/3368)
41+
* Agent/CLI/Service: Added ability to capture crash dumps from libfuzzer, when provided [#2793](https://github.com/microsoft/onefuzz/pull/2793) [#3409](https://github.com/microsoft/onefuzz/pull/3409)
42+
* CLI/Service: Implemented `--with_tasks ` option for `onefuzz jobs get` command to expand the task information [#3343](https://github.com/microsoft/onefuzz/pull/3343)
43+
44+
### Changed
45+
46+
* Agent: Migrated all the task types to the template model [#3397](https://github.com/microsoft/onefuzz/pull/3307)
47+
* Agent: Removed `srcview` code from OneFuzz since it is not currently utilized [#3376](https://github.com/microsoft/onefuzz/pull/3376)
48+
* Agent: Updated default windows VM image to windows 11 [#3374](https://github.com/microsoft/onefuzz/pull/3374)
49+
* Agent: Migrated `winapi` to `windows-rs`, the newer Microsoft supported version of the Windows API bindings for Rust [#3050](https://github.com/microsoft/onefuzz/pull/3050)
50+
* Deployment: Updated the default deployment option for `EnableWorkItemCreation` feature flag to be enabled [#3387](https://github.com/microsoft/onefuzz/pull/3387)
51+
52+
### Fixed
53+
54+
* Agent: Deserialize the coverage files directly into the output files [#3410](https://github.com/microsoft/onefuzz/pull/3410)
55+
* Agent/Deployment/Service: Bumped several C#, Python, and Rust dependencies as well as the Rust edition across all Rust crates [#3396](https://github.com/microsoft/onefuzz/pull/3396), [#3161](https://github.com/microsoft/onefuzz/pull/3161), [#3346](https://github.com/microsoft/onefuzz/pull/3346), [#3391](https://github.com/microsoft/onefuzz/pull/3391), [#2870](https://github.com/microsoft/onefuzz/pull/2870), [#3392](https://github.com/microsoft/onefuzz/pull/3392), [#3402](https://github.com/microsoft/onefuzz/pull/3402)
56+
* Agent: Fixed a bug in agent `DirectoryMonitor` by adding error tolerance when attempting to fetch metadata for `CreateKind::Any` or `CreateKind::Other` events [#3393](https://github.com/microsoft/onefuzz/pull/3393)
57+
* Service: Fixed tag shadowing in logging by giving precedence to the tags produced by log messages over the tags added prior to the call, when the tag names clashed [#3388](https://github.com/microsoft/onefuzz/pull/3388)
58+
59+
## 8.6.3
60+
61+
### Fixed
62+
63+
* Service: Fixed another duplicate Azure DevOps work item creation case by handling `Microsoft.VSTS.Common.ResolvedReason` field when present [#3383](https://github.com/microsoft/onefuzz/pull/3383)
64+
65+
## 8.6.2
66+
67+
### Fixed
68+
69+
* Agent: Fixed tasks hanging when shutting down by forcefully shutting down the runtime before exiting the main task [#3378](https://github.com/microsoft/onefuzz/pull/3378)
70+
* Service: Refactored Azure DevOps template rendering to fix duplicate bugs being filed due to title truncation and added several validation tests in this area [#3370](https://github.com/microsoft/onefuzz/pull/3370)
71+
72+
## 8.6.1
73+
74+
### Added
75+
76+
* Service: Added feature flag to toggle Azure DevOps work item processing [#3353](https://github.com/microsoft/onefuzz/pull/3353)
77+
* Service: Requeue Azure DevOps notifications when the feature flag for work item processing is set to 'disabled' [#3358](https://github.com/microsoft/onefuzz/pull/3358)
78+
79+
## 8.6.0
80+
81+
### Added
82+
83+
* Agent: Implemented `debuginfo` caching [#3280](https://github.com/microsoft/onefuzz/pull/3280)
84+
85+
### Changed
86+
87+
* Agent: Limit azcopy copy buffer to 512MB of RAM as the default maximum [#3293](https://github.com/microsoft/onefuzz/pull/3293)
88+
* Agent: Define local fuzzing tasks relationships through new templating model [#3117](https://github.com/microsoft/onefuzz/pull/3117)
89+
* Deployment: Replaced `--upgrade` flag with `--skip_aad_setup` flag in the deploy.py setup script [#3345](https://github.com/microsoft/onefuzz/pull/3345)
90+
* Service: Make `ServiceConfiguration` eagerly evaluated [#3136](https://github.com/microsoft/onefuzz/pull/3136)
91+
* Service: Improved `TimerRetention` performance through several UPN changes & fixes [#3289](https://github.com/microsoft/onefuzz/pull/3289)
92+
93+
### Fixed
94+
95+
* Agent: Fixed resolution of sibling .NET DLLs [#3325](https://github.com/microsoft/onefuzz/pull/3325)
96+
* Agent/Service: Bumped several C# and Rust dependencies [#3319](https://github.com/microsoft/onefuzz/pull/3319), [#3320](https://github.com/microsoft/onefuzz/pull/3320), [#3317](https://github.com/microsoft/onefuzz/pull/3317), [#3297](https://github.com/microsoft/onefuzz/pull/3297), [#3301](https://github.com/microsoft/onefuzz/pull/3301), [#3291](https://github.com/microsoft/onefuzz/pull/3291), [#3195](https://github.com/microsoft/onefuzz/pull/3195), [#3328](https://github.com/microsoft/onefuzz/pull/3328)
97+
* CLI: Look for azcopy.exe in environment variable `AZCOPY` and determine if it's actually referencing a directory [#3344](https://github.com/microsoft/onefuzz/pull/3344)
98+
* CLI: Updated `repro get_files` to handle regression reports [#3340](https://github.com/microsoft/onefuzz/pull/3340)
99+
* CLI: Fixed missing `target_timeout` setting in the Libfuzzer basic template [#3334](https://github.com/microsoft/onefuzz/pull/3334)
100+
* CLI: Fixed false 'missing' dependency warning [#3331](https://github.com/microsoft/onefuzz/pull/3331)
101+
* CLI: Fixed the `debug notification test_template` command expecting a `task_id` [#3308](https://github.com/microsoft/onefuzz/pull/3308)
102+
* Deployment: Update App Registration redirect URIs if deployment uses a custom domain [#3341](https://github.com/microsoft/onefuzz/pull/3341)
103+
* Service: Fixed links in bugs filed from regression reports by populating `InputBlob` when possible [#3342](https://github.com/microsoft/onefuzz/pull/3342)
104+
* Service: Fixed several storage issues to improve platform performance and reduce spurious `404`s [#3313](https://github.com/microsoft/onefuzz/pull/3313)
105+
* Service: Added extra logging when `System.Title` is too long [#3332](https://github.com/microsoft/onefuzz/pull/3332)
106+
* Service: Render `System.Title` before trying to trim it to the max allowed size [#3329](https://github.com/microsoft/onefuzz/pull/3329)
107+
* Service: Differentiate `INVALID_JOB` and `INVALID_TASK` error codes [#3318](https://github.com/microsoft/onefuzz/pull/3318)
108+
10109
## 8.5.0
11110

12111
### Added

CURRENT_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.5.0
1+
8.8.0

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# <img src="docs/onefuzz_text.svg" height="120" alt="OneFuzz" />
22

3+
# IMPORTANT NOTICE
4+
5+
**_Since September 2020 when OneFuzz was first open sourced, we’ve been on a journey to create a best-in-class orchestrator for running fuzzers, driving security and quality into our products._**
6+
7+
8+
**_Initially launched by a small group in MSR, OneFuzz has now become a significant internal platform within Microsoft. As such, we are regretfully archiving the project to focus our attention on becoming a more deeply integrated service within the company. Unfortunately, we aren’t a large enough team to live in both the open-source world and the internal Microsoft world with its own unique set of requirements._**
9+
10+
**_Our current plan is to archive the project in the next few months. That means we’ll still be making updates for a little while. Of course, even after it’s archived, you’ll still be able to fork it and make the changes you need. Once we’ve decided on a specific date for archiving, we’ll update this readme._**
11+
12+
**_Thanks for taking the journey with us._**
13+
14+
**_The OneFuzz team._**
15+
16+
---
17+
318
[![Onefuzz build status](https://github.com/microsoft/onefuzz/workflows/Build/badge.svg?branch=main)](https://github.com/microsoft/onefuzz/actions/workflows/ci.yml?query=branch%3Amain)
419

520
## A self-hosted Fuzzing-As-A-Service platform

0 commit comments

Comments
 (0)