- resuse the regex to parse the output of libfuzzer
- added a cancellation notification to report_fuzzer_sys_info.
~~The code seems to be actively waiting this function and consuming some cpu time~~
The notification allows us to reduce the time waiting for the fuzzing loop to terminate.
## Summary of the Pull Request
_What is this about?_
## PR Checklist
* [ ] Applies to work item: #xxx
* [ ] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/onefuzz) and sign the CLI.
* [ ] Tests added/passed
* [ ] Requires documentation to be updated
* [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx
## Info on Pull Request
_What does this include?_
## Validation Steps Performed
_How does someone test & validate?_
We're experiencing a bug where Unions of sub-models are getting downcast, which causes a loss of information.
As an example, EventScalesetCreated was getting downcast to EventScalesetDeleted. I have not figured out why, nor can I replicate it locally to minimize the bug send upstream, but I was able to reliably replicate it on the service.
While working through this issue, I noticed that deserialization of SignalR events was frequently wrong, leaving things like tasks as "init" in `status top`.
Both of these issues are Unions of models with a type field, so it's likely these are related.
One of the difficulties in crash repro as task is a race condition where we the client tries to connect before the cdb is running.
This makes it such that we can use the heartbeat to identify if the task has started before connecting in.
NOTE: In this PR, it's always set to None. See #830 for it's actual usage. However, I split out the PR for easier review.
this fixes an issue related to object id reuse that can occur making the
object identification cache fail. Instead, this simplifies the
hide_secrets to always recurse and use setattr to always set the value
based on the recursion.
Note, the object id reuse issue was seen in the
`events.filter_event_recurse` development and this was the fix for the
id reuse there.
Python documentation states:
id(object):
Return the “identity” of an object. This is an integer (or long integer)
which is guaranteed to be unique and constant for this object during its
lifetime. Two objects with non-overlapping lifetimes may have the same
id() value.
Catch argparse argument type errors and display them in a simplified fashion.
As an example, this is how the output is rendered.
```
❯ onefuzz template libfuzzer basic --target_env ASAN_OPTIONS=allocator_may_return_null=1 a a a linux
unable to parse arguments: unable to parse value as a key=value pair: 'a'
❯
```
Note, this builds upon #910.
When recording coverage, don't try to use live process handles as the context for the `dbghelp` symbol handler in the module feature cache. Instead, use the default pseudo-handle for the semantically static PDB search, and the target process handle for any queries about the target and its address space.
- Fix a bug in PDB search where we treated the absence of the PE-specified file as a hard error
- In the return type of `find_pdb_path()`, distinguish between "no file found" and a search error
## Summary of the Pull Request
_What is this about?_
We'd like to refactor the proxy lifecycle to only delete when the proxy is out-of-date - i.e. when the proxy is older than 7 days or a mismatched version. I've changed two files, proxy.py and timer_daily\init.py to check for the version and timestamp before stopping a live proxy.
## PR Checklist
* [ ] Applies to work item: #xxx
* [ ] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/onefuzz) and sign the CLI.
* [ ] Tests added/passed
* [ ] Requires documentation to be updated
* [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx
## Info on Pull Request
_What does this include?_
Changes to two files:
proxy.py:
- get_or_create() edited to check if timestamp is >7 days.
- Created is_outdated() to check version and timestamp for out-of-date proxy.
timer_daily/init.py
- Proxy check now includes is_outdated() before determining if a proxy should be shutdown.
## Validation Steps Performed
Deploying test instance to determine if proxy lives past a single day.
This enables specifying the endpoint configuration for alternate tenants purely on the command line.
Previously, on a single tenant you could use the following:
```
onefuzz --endpoint https://INSTANCE.azurewebsites.net info get
```
For multi-tenant installs, we need to expose more than just endpoint.
This enables:
```
onefuzz --endpoint https://INSTANCE.azurewebsites.net --client_id CLIENT_ID --authority https://login.microsoftonline.com/common --tenant_domain TENANT_DOMAIN info get
```