Commit Graph

1315 Commits

Author SHA1 Message Date
fb9af4b811 Implement the download Function for C# (#2076)
Port the `download` function to the C# service.
2022-06-23 15:48:24 +12:00
4eec0bfc45 Implement the node C# function (#2072)
1. Ports the `node` function from Python to C#.
2. Adds a missing authentication check.
3. Add validated string type `PoolName` for consistency with Python version.
2022-06-23 13:44:14 +12:00
1eeefce85c Implement info Function in C# (#2061)
Adds implementation of the `info` function. 

Added support for blobs in the function integration test stuff.

Simplified usage of integration test classes by removing the account name parameter.
2022-06-23 13:06:40 +12:00
4cb7bba2c9 Add underscore naming convention to .editorconfig (#2070) 2022-06-22 15:47:10 +12:00
bbc060bbed Add null analysis attributes to result types (#2069) 2022-06-21 23:41:32 +00:00
3b8c5bbf29 Add bash-completion to devcontainer image (#2058) 2022-06-21 20:58:40 +00:00
8f30801c48 Add nsg config to check-pr (#2067)
Co-authored-by: Noah McGregor Harper <74685766+nharper285@users.noreply.github.com>
2022-06-21 12:32:02 -07:00
76d06efc8c Removing Bad Directory. (#2063) 2022-06-20 10:02:56 -07:00
4ecd43fc0f Convert agent_events to C# & add tests (#2032)
### Function implementation

Added implementation of `agent_events` function and some basic tests.

Fixed several issues encountered in `TestOperations`.

### Additional JsonConverter

The existing Python code for `agent_events` figures out which class to use only based upon the shape of the input, without a discriminator. I have added an additional `JsonConverter` named `SubclassConverter<T>` which will pick a subclass of `T` to deserialize into based upon what properties exist in the JSON.

### Enum helpers

Converted some enum helpers to extension methods to make them a bit more readable.
2022-06-16 22:28:09 +00:00
cdec3c9e8d Test infrastructure for C# Azure Function testing (#2055)
Add support for function tests and the ability to run them against either real Azure Storage or the Azurite emulator.

See follow-up PR #2032 for actual usage.
2022-06-16 21:50:02 +00:00
e9147ba9a7 Add context to every future in the supervisor task (#1976)
* Add context to every futur in the supervisor task

* adding more context info for the sync operations

* adding more logging in the monitoring of the process pipe
2022-06-16 12:01:22 -07:00
2225cb3fb8 Update onefuzz-agent to clap 3 (#2049)
Mostly a maintenance update (dependabot was trying to do this and failing), but it does have a small improvement in that the `debug node_event state_update` help:

```console
$ target/debug/onefuzz-agent debug node_event state_update --help
onefuzz-agent-debug-node_event-state_update 0.1.0

USAGE:
    onefuzz-agent debug node_event state_update <state>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:
    <state>    
```

Now displays the applicable enum values:

```console
$ target/debug/onefuzz-agent debug node_event state_update --help
onefuzz-agent-debug-node_event-state_update 

USAGE:
    onefuzz-agent debug node_event state_update <STATE>

ARGS:
    <STATE>    [possible values: init, free, setting-up, rebooting, ready, busy, done]

OPTIONS:
    -h, --help    Print help information
```

`structopt` dependency removed as it was integrated into `clap`.

Updating the other projects that use `clap` is more involved as they use the lower-level interface.
2022-06-16 14:15:40 +12:00
e73aa705fd fix typo (#2054) 2022-06-15 12:56:23 -07:00
286ebcc07b Adding Node State to Node Heartbeat (#2053) 2022-06-15 18:30:10 +00:00
8b826187a5 flushing the logs when the task is done (#2017)
* flushing the logs when the task is done

* removed teh flush logevent
flushig is now done by sending a message to the task_logger directly
moved the initialization of the logger to cmd.rs

* build fix

* include a duration in the flush message

* exit with a done state instead of panicing
2022-06-15 17:53:59 +00:00
f514fc35e3 Devcontainer: Set some default Omnisharp options (#2048) 2022-06-15 14:18:19 +12:00
ab1e422d34 Attempt to improve sccacheability (#2010)
Attempt to speed up CI builds:
1. Disable incremental builds when using `sccache` (incremental can't be cached)
2. Set `--locked` on all invocations of cargo
3. Add `restore-keys` for Github cache action
2022-06-14 21:49:57 +00:00
447f1813b1 Enable queue_signalr_events (#2047) 2022-06-14 18:25:16 +00:00
d91581372a Enabling functions (#2046)
QueueNodeHeartbeat
QueueTaskHeartbeat
2022-06-14 10:57:10 -07:00
dec4285527 Add scripts to install dotnet on windows and ubuntu (#2038)
* Add scripts to install dotnet on windows and ubuntu

* Install dotnet on linux setup

* Move the install to the setup scripts

* Fix slash direction

* typo

* PR comments
2022-06-14 14:56:53 +00:00
46289a33af Link build status shield to Github Actions page (#2040) 2022-06-13 16:20:07 -07:00
52ccf05a29 Remove deprecated libfuzzer_coverage task (#2021)
- Remove the ability to create or execute a `libfuzzer_coverage` task
- Preserve the enum variant in `onefuzztypes` to prevent errors when deserializing old data
- Remove doc references to `libfuzzer_coverage`
2022-06-13 12:38:35 -07:00
9989189e60 Adding Node State to Node Heartbeat (#2024)
* Adding Node State to Node Heartbeat.

* Updating docs.

* Fixing webhook events.

* Formatting.

* Resetting type.

* Updting param.

* Setting to nodestate.
2022-06-13 10:13:57 -07:00
695e141a7a Update auto-issue creation workflow (#2037)
* adjust spacing in yaml

* add manual dispatch
2022-06-09 15:11:06 -07:00
f8ba6e2d5b Specify that the tools are missing locally, not on the repro vm (#2036) 2022-06-09 20:04:08 +00:00
30a071a70e Devcontainer additions (#2029)
Add extensions for:

* Bicep 
* .NET test runner
* Azure Functions

Include in setup script:

* `cargo-audit` & `cargo-license` (pre-reqs for the CI script)
2022-06-09 19:13:32 +00:00
71171ad8fd Add workflow to sync gh issues with ado work items. (#2035) 2022-06-09 11:18:37 -07:00
cb1d89fce6 Fix typo in C# query (#2034) 2022-06-09 07:39:25 -04:00
c38722da75 Make Clippy run on all targets in CI (#2027)
## Summary of the Pull Request

While I'm browsing around the code clippy is shouting at me, so here's a janitorial exercise to clean up clippy lints and become a little more familiar with the codebase.

## Info on Pull Request

Fix all outstanding clippy lints. Fixes are almost mechanical, although I didn't automate them.
2022-06-09 16:19:34 +12:00
cc33427c94 Update Getting Started instructions (#2030) 2022-06-09 11:33:08 +12:00
c47372f4b6 Use shared Directory.Build.props (#2026) 2022-06-09 08:43:03 +12:00
fe56f6fb29 Collect .NET coverage info (#2023)
## Summary of the Pull Request

Collect .NET coverage during build and display it in GitHub Summary.

## Info on Pull Request

Add the `reportgenerator` tool, run it after tests.

## Validation Steps Performed

Run workflow and make sure it works.

See example coverage output here: https://github.com/microsoft/onefuzz/actions/runs/2458088617
2022-06-08 13:52:31 +12:00
60b304a220 handle messages that are too big to fit in a queue message (#2020)
* handle messages that are too big to fit in a queue message

* tests

Co-authored-by: stas <statis@microsoft.com>
2022-06-06 12:16:47 -07:00
e27eccc39f Release 5.6.0 (#2018) 5.6.0 2022-06-06 09:32:36 -07:00
79cc5d54d3 Fix equire_admin_privileges Logic. (#2016) 2022-06-03 15:59:08 -07:00
01ad154c00 Rename supervisor to agent (#1989) 2022-06-02 20:03:19 +00:00
599e27076e Bump tui from 0.16.0 to 0.18.0 in /src/agent (#2002)
Bumps [tui](https://github.com/fdehau/tui-rs) from 0.16.0 to 0.18.0.
- [Release notes](https://github.com/fdehau/tui-rs/releases)
- [Changelog](https://github.com/fdehau/tui-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fdehau/tui-rs/compare/v0.16.0...v0.18.0)

---
updated-dependencies:
- dependency-name: tui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Teo Voinea <58236992+tevoinea@users.noreply.github.com>
2022-06-02 19:12:01 +00:00
c47dcf96b4 Should fix codeql workflow (#2012)
* Build if csharp codeql

* typo

* Allow triggering the workflow manually
2022-06-02 18:34:09 +00:00
83f0ae3a67 Bump tokio from 1.15.0 to 1.16.1 in /src/agent (#1992)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.15.0 to 1.16.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.15.0...tokio-1.16.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-02 13:02:27 -04:00
c24193f7e9 Bump symbolic from 8.5.0 to 8.6.0 in /src/agent (#2003)
Bumps [symbolic](https://github.com/getsentry/symbolic) from 8.5.0 to 8.6.0.
- [Release notes](https://github.com/getsentry/symbolic/releases)
- [Changelog](https://github.com/getsentry/symbolic/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/symbolic/compare/8.5.0...8.6.0)

---
updated-dependencies:
- dependency-name: symbolic
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Teo Voinea <58236992+tevoinea@users.noreply.github.com>
2022-06-02 11:02:29 -04:00
ca22611892 Update .pylintrc (#2009)
Per: https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/old-no-self-use.html

R0201 was renamed → R6301
2022-06-01 22:18:02 +00:00
74a24b4f2e Bump iced-x86 from 1.15.0 to 1.17.0 in /src/agent (#1999)
Bumps [iced-x86](https://github.com/icedland/iced) from 1.15.0 to 1.17.0.
- [Release notes](https://github.com/icedland/iced/releases)
- [Commits](https://github.com/icedland/iced/compare/v1.15.0...v1.17.0)

---
updated-dependencies:
- dependency-name: iced-x86
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-01 15:21:28 -04:00
561e7ae45e Fix yml formatting (#1998) 2022-06-01 10:47:16 -04:00
9453869d67 Update dependabot.yml (#1995) 2022-06-01 08:53:49 -04:00
25aa3d8f07 Update 'tox' dependencies (#1996)
Co-authored-by: stas <statis@microsoft.com>
2022-05-31 15:14:42 -07:00
3918503760 Bump strum from 0.23.0 to 0.24.0 in /src/agent (#1986)
Bumps [strum](https://github.com/Peternator7/strum) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/Peternator7/strum/releases)
- [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Peternator7/strum/commits)

---
updated-dependencies:
- dependency-name: strum
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-31 13:06:26 -04:00
c9e194438e Bump proc-maps from 0.2.0 to 0.2.1 in /src/agent (#1983)
Bumps [proc-maps](https://github.com/rbspy/proc-maps) from 0.2.0 to 0.2.1.
- [Release notes](https://github.com/rbspy/proc-maps/releases)
- [Commits](https://github.com/rbspy/proc-maps/compare/v0.2.0...v0.2.1)

---
updated-dependencies:
- dependency-name: proc-maps
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-30 14:56:24 -04:00
d86384f08c Bump tokio-util from 0.6.9 to 0.7.2 in /src/agent (#1982)
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.6.9 to 0.7.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.6.9...tokio-util-0.7.2)

---
updated-dependencies:
- dependency-name: tokio-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-30 12:52:28 -04:00
bbd2178fdf Bump goblin from 0.4.3 to 0.5.1 in /src/agent (#1981)
Bumps [goblin](https://github.com/m4b/goblin) from 0.4.3 to 0.5.1.
- [Release notes](https://github.com/m4b/goblin/releases)
- [Changelog](https://github.com/m4b/goblin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/m4b/goblin/commits)

---
updated-dependencies:
- dependency-name: goblin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-30 11:08:59 -04:00
e5e43aa080 Bump serde_json from 1.0.73 to 1.0.81 in /src/agent (#1974)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.73 to 1.0.81.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.73...v1.0.81)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-30 08:40:20 -04:00