Add test to check binaries for (MS) banned API
- Dominant language
- C#
- Stars
- 2.9k
- Forks
- 576
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 123
Description
https://github.com/xamarin/xamarin-macios/pull/8893#pullrequestreview-433851185
> It would be nice to have tests to ensure we don't accidentally re-introduce usage of these symbols. We already have some symbol checking of the libraries we ship, so it shouldn't be very hard to implement:
https://github.com/xamarin/xamarin-macios/blob/34362be2454cd40a8453c5a029a12f08ea9adb52/tests/mtouch/MiscTests.cs#L84
https://github.com/xamarin/xamarin-macios/pull/8893#issuecomment-646639319
@rolfbjarne that's what Binscope for Mac does (and is required to use by our security tenets). The tool is not public but we have a script to run it, in [maccore](https://github.com/xamarin/maccore/tree/main/tools/binscopemac-runner) and an issue https://github.com/xamarin/maccore/issues/2232 to automate it on internal bots.
I did add the check for p/invokes in managed code, as this was not covered. So we could reuse the list of symbols (from BSfM) in the test you mentioned. It does not remove the requirement, but it would give partial results earlier.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.