-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
OSOE-351: Offer security checks in Lombiq.UITestingToolbox
- Loading branch information
Showing
11 changed files
with
48 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ Overconstrained | |
parallelizable | ||
qrcode | ||
retriable | ||
Runtimes | ||
sanitizers | ||
scrollbars | ||
shortcutting | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
NuGetTest/test/Lombiq.OSOCE.NuGet.Tests.UI/Tests/SecurityScanningTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Lombiq.Tests.UI.SecurityScanning; | ||
using Shouldly; | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace Lombiq.OSOCE.NuGet.Tests.UI.Tests; | ||
|
||
public class SecurityScanningTests : UITestBase | ||
{ | ||
public SecurityScanningTests(ITestOutputHelper testOutputHelper) | ||
: base(testOutputHelper) | ||
{ | ||
} | ||
|
||
// Only scanning the homepage, since this is just to make sure that ZAP still works from NuGet. | ||
[Fact] | ||
public Task BasicSecurityScanShouldPass() => | ||
ExecuteTestAfterSetupAsync( | ||
context => context.RunAndAssertBaselineSecurityScanAsync( | ||
configuration => configuration.ExcludeUrlWithRegex(".*:[0-9]+\\/.+"), | ||
// We expect 5 alerts from ZAP. This is using "less than" not to fail the test, should ZAP be a bit | ||
// inconsistent, which it can be (see https://www.zaproxy.org/faq/why-can-zap-scans-be-inconsistent/). | ||
// If this starts failing after some update, then inspect the scan report in the failure dump to see if | ||
// the alerts can be simply expected and this number should be increased. | ||
sarifLog => sarifLog.Runs[0].Results.Count.ShouldBeLessThan(6))); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule Lombiq.HelpfulLibraries
updated
2 files
+27 −0 | Lombiq.HelpfulLibraries.Cli/CliProgram.cs | |
+4 −3 | Lombiq.HelpfulLibraries.Common/Extensions/StringExtensions.cs |
Submodule Lombiq.TrainingDemo
updated
2 files
+5 −2 | Controllers/CrossTenantServicesController.cs | |
+2 −0 | Controllers/FileManagementController.cs |
Submodule Lombiq.UITestingToolbox
updated
44 files