Skip to content
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

TDEAL-16: ZAP improvements #334

Merged
merged 93 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
816c476
Update baseline rule exception.
sarahelsaig Dec 26, 2023
3eec5b1
Merge remote-tracking branch 'origin/dev' into issue/TDEAL-16
sarahelsaig Dec 26, 2023
7856594
The baseline scan should visit at least one page that throws an excep…
sarahelsaig Dec 26, 2023
222be47
Disable app log assertion for the duration of the security scan.
sarahelsaig Dec 26, 2023
dfd2c55
Merge remote-tracking branch 'origin/dev' into issue/TDEAL-16
sarahelsaig Dec 26, 2023
6cfb21d
unusing
sarahelsaig Dec 26, 2023
b60dfe0
Expect custom error page.
sarahelsaig Dec 26, 2023
eea23bd
Disable rule 10037.
sarahelsaig Dec 26, 2023
71f189d
Fix disabled rules, shouldn't have been dictionary.
sarahelsaig Dec 27, 2023
e011568
Turn all the collections into private, because we have methods to han…
sarahelsaig Dec 27, 2023
f8219f8
Some YAML extensio DRYing.
sarahelsaig Dec 27, 2023
c61a55c
By default ignore /vendor/ or /vendors/ URLs.
sarahelsaig Dec 27, 2023
f6ea9fb
unusing
sarahelsaig Dec 27, 2023
32f03dd
Fix sample.
sarahelsaig Dec 28, 2023
445074d
Why was this rule disabled in the first place? Just enable "OrchardCo…
sarahelsaig Dec 28, 2023
bf117a6
Merge branch 'issue/TDEAL-16' of https://github.com/Lombiq/UI-Testing…
sarahelsaig Dec 28, 2023
1a6ad0c
Update the comment.
sarahelsaig Dec 28, 2023
5dd7647
Update Lombiq.Tests.UI/SecurityScanning/SecurityScanConfiguration.cs
sarahelsaig Dec 28, 2023
2544f98
Remove duplicate method.
sarahelsaig Dec 28, 2023
a97fd47
More documentation.
sarahelsaig Dec 28, 2023
33810db
Explain why disabling "Strict-Transport-Security Header" is necessary.
sarahelsaig Dec 28, 2023
a1e8dad
Remove forced error generation because we are going to enable Orchard…
sarahelsaig Dec 28, 2023
e0c6d65
Tweak app log error handling during sercurity scan..
sarahelsaig Dec 28, 2023
6fa5d43
Disable 10062.
sarahelsaig Dec 29, 2023
5e3ed10
Typo.
sarahelsaig Dec 29, 2023
d1fd50d
Update coment regarding unsafe-inline.
sarahelsaig Dec 29, 2023
af0a663
Change "The response contains Personally Identifiable Information" to…
sarahelsaig Jan 5, 2024
1941430
Merge remote-tracking branch 'origin/dev' into issue/TDEAL-16
sarahelsaig Jan 6, 2024
e581165
Update the CustomZapAutomationFrameworkPlan.
sarahelsaig Jan 6, 2024
faa917b
Add DoWithoutAppLogAssertionAsync
sarahelsaig Jan 7, 2024
212b761
Test a known error page.
sarahelsaig Jan 7, 2024
3145498
Merge branch 'issue/TDEAL-16' of https://github.com/Lombiq/UI-Testing…
sarahelsaig Jan 7, 2024
d939ed0
Simplify job configuration using new extension methods.
sarahelsaig Jan 7, 2024
7653286
Limit the execution duration of activeScan.
sarahelsaig Jan 7, 2024
2149e2f
Permit some error lines in app logs.
sarahelsaig Jan 7, 2024
9026b83
Add AssertAppLogsForSecurityScan.
sarahelsaig Jan 7, 2024
b48b062
Permit another format exception.
sarahelsaig Jan 7, 2024
411d7cd
Much nicer app log error reporting.
sarahelsaig Jan 7, 2024
9f949da
spelling?
sarahelsaig Jan 7, 2024
e38ba5e
unusing
sarahelsaig Jan 7, 2024
fb08f79
Eliminate this arbitrary limitation.
sarahelsaig Jan 7, 2024
85e4b68
Make AssertAppLogsForSecurityScan parametric.
sarahelsaig Jan 7, 2024
218f8b3
Fix code styling.
sarahelsaig Jan 7, 2024
15bd351
Use SafelyDeleteDirectoryIfExists.
sarahelsaig Jan 7, 2024
0d43a1f
Add default value to userName in SignInDirectly.
sarahelsaig Jan 7, 2024
fb5bcdd
Add exception for a parameter key being null.
sarahelsaig Jan 7, 2024
85327ec
check empty userName differently
sarahelsaig Jan 7, 2024
888c0ab
unusing
sarahelsaig Jan 7, 2024
31a58cc
Reorganize the security scanning test into a reusable extension.
sarahelsaig Jan 8, 2024
2b2545d
Update HL NuGet package.
sarahelsaig Jan 8, 2024
059a34f
Update HL NuGet again.
sarahelsaig Jan 8, 2024
b2e8ec2
Make the AssertSecurityScanHasNoAlerts more informative.
sarahelsaig Jan 9, 2024
b225f61
Try to delete the ZAP directory even more safely.
sarahelsaig Jan 9, 2024
3127ba7
Instead of trying to delete the Zap directory use Zap1, Zap2, etc to …
sarahelsaig Jan 10, 2024
106085a
Throw on failure.
sarahelsaig Jan 10, 2024
11a538f
nuget
sarahelsaig Jan 10, 2024
8c12e5e
Additional documentation.
sarahelsaig Jan 12, 2024
07efb93
Documentation cross-linking.
sarahelsaig Jan 12, 2024
a137be5
Include the PII disclosure issue URL.
sarahelsaig Jan 12, 2024
cca1aa5
Rename maxScanDurationInMinutes to maxActiveScanDurationInMinutes.
sarahelsaig Jan 12, 2024
050812e
Rename extension method and mention it in the samples.
sarahelsaig Jan 12, 2024
a9a4083
Update Lombiq.Tests.UI/SecurityScanning/SecurityScanConfiguration.cs
sarahelsaig Jan 12, 2024
43a782d
Make error page scanning optional.
sarahelsaig Jan 12, 2024
e94c005
Use STJ.
sarahelsaig Jan 12, 2024
1b71ab7
Update Lombiq.Tests.UI/Services/OrchardCoreUITestExecutorConfiguratio…
sarahelsaig Jan 12, 2024
9ca337f
More info on build-and-test-orchard-core.
sarahelsaig Jan 12, 2024
573ff8a
Merge branch 'issue/TDEAL-16' of https://github.com/Lombiq/UI-Testing…
sarahelsaig Jan 12, 2024
d85b200
Update workflow name convention.
sarahelsaig Jan 12, 2024
3e631a2
Code styling.
sarahelsaig Jan 12, 2024
50817fb
Add missing using.
sarahelsaig Jan 12, 2024
0c2bbcf
Use configuration to initialize the start URL.
sarahelsaig Jan 12, 2024
1d07bc8
Update HL nuget.
sarahelsaig Jan 12, 2024
7328baa
Add ShouldBeEmptyWhen extension method.
sarahelsaig Jan 13, 2024
ab5cd44
Refactor AddDisableRuleFilter,
sarahelsaig Jan 13, 2024
4b1b773
False positives should contain both the name and justification.
sarahelsaig Jan 13, 2024
2461d21
Add optional jsonSerializerOptions.
sarahelsaig Jan 13, 2024
573eacc
Update Lombiq.Tests.UI/SecurityScanning/SecurityScanConfiguration.cs
sarahelsaig Jan 13, 2024
3f1a389
Update SecurityScanWithCustomConfigurationShouldPass and its comments.
sarahelsaig Jan 13, 2024
fdb704c
Fix missing default parameter.
sarahelsaig Jan 13, 2024
16c5ca7
Fix docstrings.
sarahelsaig Jan 13, 2024
5151a15
Restore sample assertion and update expected count.
sarahelsaig Jan 13, 2024
b9d398e
Add extension method and use security scan forgiving app assertion in…
sarahelsaig Jan 13, 2024
0640fb2
Instead of suppressing logs, just suppress the error page's exception…
sarahelsaig Jan 13, 2024
dc737f6
Add GetAbsoluteUrlOfAction.
sarahelsaig Jan 13, 2024
2784993
Use requestor instead of second scan.
sarahelsaig Jan 13, 2024
35fb6e8
Update Lombiq.Tests.UI/SecurityScanning/SecurityScanConfiguration.cs
sarahelsaig Jan 13, 2024
74bae9c
Code formatting and organization.
sarahelsaig Jan 13, 2024
7397bb9
Update Lombiq.Tests.UI/SecurityScanning/SecurityScanningUITestContext…
sarahelsaig Jan 14, 2024
9852ab3
Various doc fixes.
sarahelsaig Jan 14, 2024
4bb9d42
unusing
sarahelsaig Jan 14, 2024
1fd80a3
Additional instructions.
sarahelsaig Jan 15, 2024
c6c1035
Remove this thing whatever it is.
sarahelsaig Jan 15, 2024
ffc674a
Make it a range.
sarahelsaig Jan 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions Lombiq.Tests.UI.Samples/Tests/CustomZapAutomationFrameworkPlan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,11 @@ jobs:
enableTags: false
disableAllRules: false
rules:
- id: 10035
name: "Strict-Transport-Security Header"
threshold: "off"
- id: 10038
name: "Content Security Policy (CSP) Header Not Set"
threshold: "off"
- id: 10020
name: "Anti-clickjacking Header"
threshold: "off"
- id: 10037
name: "Server Leaks Information via \"X-Powered-By\" HTTP Response Header Field(s)"
threshold: "off"
- id: 10021
name: "X-Content-Type-Options Header Missing"
threshold: "off"
# This is required for <script> blocks which OC uses extensively. The rule may be removed when OC starts to provide
# cryptographic nonce for these script blocks (see https://github.com/OrchardCMS/OrchardCore/issues/13389).
- id: 10055
name: "script-src includes unsafe-inline"
threshold: "off"
name: "passiveScan-config"
type: "passiveScan-config"
- parameters: {}
Expand Down
6 changes: 3 additions & 3 deletions Lombiq.Tests.UI.Samples/Tests/SecurityScanningTests.cs
Piedone marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public Task BasicSecurityScanShouldPass() =>
// usually not just unnecessary for a website that's not an SPA, but also slows the scan down by a lot. However,
// if you have an SPA, you need to use it.
// - Excludes certain URLs from the scan completely. Use this if you don't want ZAP to process certain URLs at all.
// - Disables the "Server Leaks Information via "X-Powered-By" HTTP Response Header Field(s)" alert of ZAP's passive
// scan for the whole scan. This is because by default, Orchard Core sends an "X-Powered-By: OrchardCore" header.
// - Disables the The response does not include either Content-Security-Policy with 'frame-ancestors' directive."
// alert of ZAP's passive scan for the whole scan. This is because by default, Orchard Core sends an "X-Powered-By: OrchardCore" header.
Piedone marked this conversation as resolved.
Show resolved Hide resolved
// If you want airtight security, you might want to turn this off, but for the sake of example we just ignore the
// alert here.
// - Also disables the "Content Security Policy (CSP) Header Not Set" rule but only for the /about page. Use this to
Expand All @@ -65,7 +65,7 @@ public Task SecurityScanWithCustomConfigurationShouldPass() =>
configuration => configuration
////.UseAjaxSpider() // This is quite slow so just showing you here but not running it.
.ExcludeUrlWithRegex(".*blog.*")
.DisablePassiveScanRule(10037, "Server Leaks Information via \"X-Powered-By\" HTTP Response Header Field(s)")
.DisablePassiveScanRule(10020, "The response does not include either Content-Security-Policy with 'frame-ancestors' directive.")
Piedone marked this conversation as resolved.
Show resolved Hide resolved
Piedone marked this conversation as resolved.
Show resolved Hide resolved
.DisableScanRuleForUrlWithRegex(".*/about", 10038, "Content Security Policy (CSP) Header Not Set")
.SignIn(),
sarifLog => sarifLog.Runs[0].Results.Count.ShouldBeLessThan(34)));
Expand Down
5 changes: 2 additions & 3 deletions Lombiq.Tests.UI.Shortcuts/Controllers/AccountController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ public AccountController(UserManager<IUser> userManager, SignInManager<IUser> us
[AllowAnonymous]
public async Task<IActionResult> SignInDirectly(string userName)
{
var user = await _userManager.FindByNameAsync(userName);

if (user == null) return NotFound();
if (string.IsNullOrWhiteSpace(userName)) userName = "admin";
if (await _userManager.FindByNameAsync(userName) is not { } user) return NotFound();

await _userSignInManager.SignInAsync(user, isPersistent: false);

Expand Down
2 changes: 1 addition & 1 deletion Lombiq.Tests.UI.Shortcuts/Lombiq.Tests.UI.Shortcuts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="8.1.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="8.1.1-alpha.4.tdeal-16" />
</ItemGroup>

</Project>
17 changes: 17 additions & 0 deletions Lombiq.Tests.UI/Docs/SecurityScanning.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ You can create detailed security scans of your app with [Zed Attack Proxy (ZAP)]
- While ZAP is fully managed for you, Docker needs to be available and running to host the ZAP instance. On your development machine, you can install [Docker Desktop](https://www.docker.com/products/docker-desktop/).
- The full scan of a website with even just 1-200 pages can take 5-10 minutes. So, be careful to fine-tune the ZAP configuration to make it suitable for your app.

## Limitations

On Windows-based GitHub runners the security tests always fail with the following error:

> The `docker.exe pull softwaresecurityproject/zap-stable:2.14.0 --quiet` command failed with the output below.
> no matching manifest for windows/amd64 10.0.20348 in the manifest list entries.

This is because the Docker installation is configured to use Windows images, while the [ZAP docker image](https://hub.docker.com/r/softwaresecurityproject/zap-stable/tags) is only available for Linux. If you rely on our [Lombiq GitHub Actions](https://github.com/Lombiq/GitHub-Actions) then you can configure it like this to disable a test, in this case `SecurityScanningTests`:
```
call-build-and-test-workflow-windows:
Piedone marked this conversation as resolved.
Show resolved Hide resolved
name: Build and Test
uses: Lombiq/GitHub-Actions/.github/workflows/build-and-test-orchard-core.yml@dev
with:
machine-types: '["windows-latest"]'
test-filter: "FullyQualifiedName!~SecurityScanningTests"
```
Piedone marked this conversation as resolved.
Show resolved Hide resolved

## Troubleshooting

- If you're unsure what happens in a scan, run the [ZAP desktop app](https://www.zaproxy.org/download/) and load the Automation Framework plan's YAML file into it. If you use the default scans, then these will be available under the build output directory (like _bin/Debug_) under _SecurityScanning/AutomationFrameworkPlans_. Then, you can open and run them as demonstrated [in this video](https://youtu.be/PnCbIAnauD8?si=u0vi63Uvv9wZINzb&t=1173).
Expand Down
31 changes: 31 additions & 0 deletions Lombiq.Tests.UI/Extensions/BrowserUITestContextExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,35 @@ public static async Task<T> FetchWithBrowserContextAsync<T>(

return await processResponseAsync(response);
}

/// <summary>
/// Performs a <paramref name="task"/> with app log assertion temporarily disabled. But first <see
/// cref="OrchardCoreUITestExecutorConfiguration.AssertAppLogsAsync"/> is used to ensure no unrelated errors are
/// masked by this activity. Afterwards it's used again to verify the results, and if it fails then the logs are
/// cleared out.
/// </summary>
/// <returns>A task indicating whether there were anything in the app logs that failed the assertion.</returns>
public static async Task<bool> DoWithoutAppLogAssertionAsync(this UITestContext context, Func<Task> task)
{
// Verify that the app logs are fine right now, then suppress logs for the duration of the task.
await context.Configuration.AssertAppLogsAsync(context.Application);
var assertAppLogsAsync = context.Configuration.AssertAppLogsAsync;
context.Configuration.AssertAppLogsAsync = _ => Task.CompletedTask;

await task();

// Restore the app log assertion and determine if it failed. Clear the logs if failure occurred.
context.Configuration.AssertAppLogsAsync = assertAppLogsAsync;
try
{
await context.Configuration.AssertAppLogsAsync(context.Application);
}
catch
{
context.ClearLogs();
return true;
}

return false;
}
}
20 changes: 19 additions & 1 deletion Lombiq.Tests.UI/Extensions/WebApplicationInstanceExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Lombiq.Tests.UI.Services;
using Shouldly;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;

Expand All @@ -12,19 +14,35 @@ public static class WebApplicationInstanceExtensions
/// Asserting that the logs should be empty. When they aren't the Shouldly exception will contain the logs'
/// contents.
/// </summary>
/// <param name="permittedErrorLines">
/// If not <see langword="null"/> or empty, each line is split and any lines containing <c>|ERROR|</c> will be
/// ignored if they contain any string from this collection (case-insensitive).
/// </param>
public static async Task LogsShouldBeEmptyAsync(
this IWebApplicationInstance webApplicationInstance,
bool canContainWarnings = false,
ICollection<string> permittedErrorLines = null,
CancellationToken cancellationToken = default)
{
if (cancellationToken == default) cancellationToken = CancellationToken.None;
permittedErrorLines ??= Array.Empty<string>();

var logOutput = await webApplicationInstance.GetLogOutputAsync(cancellationToken);

if (canContainWarnings)
{
logOutput.ShouldNotContain("|ERROR|");
logOutput.ShouldNotContain("|FATAL|");

var errorLines = logOutput
.SplitByNewLines()
.Where(line => line.Contains("|ERROR|"));

if (permittedErrorLines.Any())
{
errorLines = errorLines.Where(line => !permittedErrorLines.Any(line.ContainsOrdinalIgnoreCase));
}

errorLines.ShouldBeEmpty();
}
else
{
Expand Down
21 changes: 21 additions & 0 deletions Lombiq.Tests.UI/Helpers/DirectoryHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,25 @@ public static void SafelyDeleteDirectoryIfExists(string path, int maxTryCount =
}
}
}

/// <summary>
/// Creates a directory with the given path and a numeric suffix from 1 to <see cref="int.MaxValue"/>. This means if
/// the <paramref name="path"/> is <c>c:\MyDirectory</c> then it will first attempt to create <c>c:\MyDirectory1</c>
/// but if that already exists it will try to create <c>c:\MyDirectory2</c> instead, and so on.
/// </summary>
/// <param name="path">The base path to use when constructing the final path.</param>
/// <returns>The final path created.</returns>
public static string CreateEnumeratedDirectory(string path)
{
for (var i = 1; i < int.MaxValue; i++)
{
var newPath = path + i.ToTechnicalString();
if (Directory.Exists(newPath)) continue;

Directory.CreateDirectory(newPath);
return newPath;
}

throw new InvalidOperationException("Couldn't create a new directory within the integer space.");
}
}
6 changes: 3 additions & 3 deletions Lombiq.Tests.UI/Lombiq.Tests.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.Tests" Version="2.2.5" />
<PackageReference Include="Lombiq.HelpfulLibraries.Cli" Version="8.1.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="8.1.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.Refit" Version="8.1.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.Cli" Version="8.1.1-alpha.4.tdeal-16" />
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="8.1.1-alpha.4.tdeal-16" />
<PackageReference Include="Lombiq.HelpfulLibraries.Refit" Version="8.1.1-alpha.4.tdeal-16" />
<PackageReference Include="Lombiq.Npm.Targets" Version="1.4.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,24 @@ jobs:
enableTags: false
disableAllRules: false
rules:
# This needs to be disabled during UI testing, because a local app needn't use HSTS. It's also something commonly
# configured outside the app, like in Cloudflare.
- id: 10035
name: "Strict-Transport-Security Header"
threshold: "off"
# This is required for <script> blocks which OC uses extensively. The rule may be removed when OC starts to provide
# cryptographic nonce for these script blocks (see https://github.com/OrchardCMS/OrchardCore/issues/13389).
- id: 10055
name: "script-src includes unsafe-inline"
threshold: "off"
# This is a low-risk alert, enforcing it is undesirable for branding.
- id: 10037
name: "Server Leaks Information via 'X-Powered-By' HTTP Response Header Field(s)"
threshold: "off"
# This rule generates false positives on UUIDs or random numeric sequences.
Piedone marked this conversation as resolved.
Show resolved Hide resolved
- id: 10062
name: "The response contains Personally Identifiable Information, such as CC number, SSN and similar sensitive data."
threshold: "high"
name: "passiveScan-config"
type: "passiveScan-config"
- parameters: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,24 @@ jobs:
enableTags: false
disableAllRules: false
rules:
# This needs to be disabled during UI testing, because a local app needn't use HSTS. It's also something commonly
# configured outside the app, like in Cloudflare.
- id: 10035
name: "Strict-Transport-Security Header"
threshold: "off"
# This is required for <script> blocks which OC uses extensively. The rule may be removed when OC starts to provide
# cryptographic nonce for these script blocks (see https://github.com/OrchardCMS/OrchardCore/issues/13389).
- id: 10055
name: "script-src includes unsafe-inline"
threshold: "off"
# This is a low-risk alert, enforcing it is undesirable for branding.
- id: 10037
name: "Server Leaks Information via 'X-Powered-By' HTTP Response Header Field(s)"
threshold: "off"
# This rule generates false positives on UUIDs or random numeric sequences.
- id: 10062
name: "The response contains Personally Identifiable Information, such as CC number, SSN and similar sensitive data."
threshold: "high"
name: "passiveScan-config"
type: "passiveScan-config"
- parameters: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,24 @@ jobs:
enableTags: false
disableAllRules: false
rules:
# This needs to be disabled during UI testing, because a local app needn't use HSTS. It's also something commonly
# configured outside the app, like in Cloudflare.
- id: 10035
name: "Strict-Transport-Security Header"
threshold: "off"
# This is required for <script> blocks which OC uses extensively. The rule may be removed when OC starts to provide
# cryptographic nonce for these script blocks (see https://github.com/OrchardCMS/OrchardCore/issues/13389).
- id: 10055
name: "script-src includes unsafe-inline"
threshold: "off"
# This is a low-risk alert, enforcing it is undesirable for branding.
- id: 10037
name: "Server Leaks Information via 'X-Powered-By' HTTP Response Header Field(s)"
threshold: "off"
# This rule generates false positives on UUIDs or random numeric sequences.
- id: 10062
name: "The response contains Personally Identifiable Information, such as CC number, SSN and similar sensitive data."
threshold: "high"
name: "passiveScan-config"
type: "passiveScan-config"
- parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,24 @@ jobs:
enableTags: false
disableAllRules: false
rules:
# This needs to be disabled during UI testing, because a local app needn't use HSTS. It's also something commonly
# configured outside the app, like in Cloudflare.
- id: 10035
name: "Strict-Transport-Security Header"
threshold: "off"
# This is required for <script> blocks which OC uses extensively. The rule may be removed when OC starts to provide
# cryptographic nonce for these script blocks (see https://github.com/OrchardCMS/OrchardCore/issues/13389).
- id: 10055
name: "script-src includes unsafe-inline"
threshold: "off"
# This is a low-risk alert, enforcing it is undesirable for branding.
- id: 10037
name: "Server Leaks Information via 'X-Powered-By' HTTP Response Header Field(s)"
threshold: "off"
# This rule generates false positives on UUIDs or random numeric sequences.
- id: 10062
name: "The response contains Personally Identifiable Information, such as CC number, SSN and similar sensitive data."
threshold: "high"
name: "passiveScan-config"
type: "passiveScan-config"
- parameters: {}
Expand Down
Loading