-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tests] Fix a few CodeQL warnings. #22154
Conversation
* Ignore SM02360. * Remove some MonoTouch.Dialog code we don't need. * Add some validation to xharness' web server. Fixes: * https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2350571 * https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2351243 * https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2376651
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [PR Build] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
✅ API diff for current PR / commit.NET ( No breaking changes )❗ API diff vs stable (Breaking changes).NET ( ❗ Breaking changes ❗ )ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
💻 [PR Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 116 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
❌ [PR Build] Tests on macOS M1 - Mac Monterey (12) failed ❌Failed tests are:
Pipeline on Agent |
Test failures are unrelated (#22169). |
In PR #22154 in an attempt to fix some CodeQL warnings we broke the local execution of xharness. The reason is the following, CodeQL complained about sanitizing the local path and in an attempt to remove the warning a test to make sure that the local path does not have a '/' was added. The issue is that our requests, when we run xharness locally, will return localpaths of the form: '/20250221_181807/index.html' that is because the request is for 'http://localhost:51234/20250221_181807/index.html'. In webapps, the path of the request ALWAYS starts with '/' even when the request is for 'http://localhost:51234' (which returns '/'). In an attemp to fix xharness AND keep CodeQL happy I have made the following changes: 1. Ensure that the full path is one of the allowed ones. 2. If the path is not one of the allowed ones, check if it is and allowed file. 2. Do not try to check for '/' or '\' but verify that the path instead get the path directory and ensure that is the one for the logs and no other. This should fix xharness and keep CodeQL happy.
Fixes: