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

Fix: remove core31 and regex timeout #299

Merged
merged 6 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ jobs:
runs-on: windows-latest
steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 1.11
distribution: 'temurin'
java-version: 17
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@main

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
uses: codacy/codacy-analysis-cli-action@master
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/securitycodescan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
SCS:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: nuget/setup-nuget@04b0c2b8d1b97922f67eca497d7cf0bf17b8ffe1
- uses: actions/checkout@master
- uses: nuget/setup-nuget@v1
- uses: microsoft/[email protected]

- name: Set up projects for analysis
uses: security-code-scan/security-code-scan-add-action@f8ff4f2763ed6f229eded80b1f9af82ae7f32a0d
uses: security-code-scan/security-code-scan-add-action@main

- name: Restore dependencies
run: dotnet restore src
Expand All @@ -35,7 +35,7 @@ jobs:
run: dotnet build --no-restore src

- name: Convert sarif for uploading to GitHub
uses: security-code-scan/security-code-scan-results-action@cdb3d5e639054395e45bf401cba8688fcaf7a687
uses: security-code-scan/security-code-scan-results-action@main

- name: Upload sarif
uses: github/codeql-action/upload-sarif@v2
2 changes: 1 addition & 1 deletion src/ConsoleApplication/ConsoleApplication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net462;net47;net48;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;net47;net48;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">net8.0</TargetFrameworks>
<ImplicitUsings>disable</ImplicitUsings>
<SignAssembly>True</SignAssembly>
Expand Down
4 changes: 2 additions & 2 deletions src/System.Net.IPNetwork/IPNetwork2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,8 @@

if (sanitanize)
{
network = Regex.Replace(network, @"[^0-9a-fA-F\.\/\s\:]+", string.Empty);
network = Regex.Replace(network, @"\s{2,}", " ");
network = Regex.Replace(network, @"[^0-9a-fA-F\.\/\s\:]+", string.Empty, RegexOptions.None, TimeSpan.FromMilliseconds(100));
network = Regex.Replace(network, @"\s{2,}", " ", RegexOptions.None, TimeSpan.FromMilliseconds(100));
network = network.Trim();
}

Expand Down Expand Up @@ -1429,7 +1429,7 @@
/// Gets 10.0.0.0/8.
/// </summary>
/// <returns>The IANA reserved IPNetwork 10.0.0.0/8.<returns>
public static IPNetwork2 IANA_ABLK_RESERVED1

Check warning on line 1432 in src/System.Net.IPNetwork/IPNetwork2.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'Expected an end tag for element 'returns'.'
{
get
{
Expand All @@ -1453,7 +1453,7 @@
/// Gets 192.168.0.0/16.
/// </summary>
/// <returns>The IANA reserved IPNetwork 192.168.0.0/16.<returns>
public static IPNetwork2 IANA_CBLK_RESERVED1

Check warning on line 1456 in src/System.Net.IPNetwork/IPNetwork2.cs

View workflow job for this annotation

GitHub Actions / build

XML comment has badly formed XML -- 'Expected an end tag for element 'returns'.'
{
get
{
Expand Down Expand Up @@ -2338,9 +2338,9 @@
#region ISerializable
internal struct IPNetworkInteral
{
public BigInteger IPAddress;

Check warning on line 2341 in src/System.Net.IPNetwork/IPNetwork2.cs

View workflow job for this annotation

GitHub Actions / build

Field 'IPNetwork2.IPNetworkInteral.IPAddress' is never assigned to, and will always have its default value
public byte Cidr;

Check warning on line 2342 in src/System.Net.IPNetwork/IPNetwork2.cs

View workflow job for this annotation

GitHub Actions / build

Field 'IPNetwork2.IPNetworkInteral.Cidr' is never assigned to, and will always have its default value 0
public AddressFamily AddressFamily;

Check warning on line 2343 in src/System.Net.IPNetwork/IPNetwork2.cs

View workflow job for this annotation

GitHub Actions / build

Field 'IPNetwork2.IPNetworkInteral.AddressFamily' is never assigned to, and will always have its default value
}

private IPNetwork2(SerializationInfo info, StreamingContext context)
Expand Down
4 changes: 2 additions & 2 deletions src/System.Net.IPNetwork/System.Net.IPNetwork.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net462;net47;net48;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netstandard2.0;netstandard2.1;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net462;net47;net48;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netstandard2.0;netstandard2.1;net6.0;net8.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageId>IPNetwork2</PackageId>
<PackageVersion>3.0.0</PackageVersion>
Expand Down
12 changes: 1 addition & 11 deletions src/TestProject/TestProject.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net47;net48;netcoreapp3.1;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net462;net47;net48;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">net8.0</TargetFrameworks>


<IsPackable>false</IsPackable>


<SignAssembly>True</SignAssembly>
<SignAssembly Condition="'$(OS)' != 'Windows_NT'">false</SignAssembly>

Expand All @@ -32,14 +30,6 @@
<DefineConstants>$(DefineConstants)TRACE;TRAVISCI</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp3.1|AnyCPU'">
<DefineConstants>$(DefineConstants)TRACE;TRAVISCI</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netcoreapp3.1|AnyCPU'">
<DefineConstants>$(DefineConstants)TRACE;TRAVISCI</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0|AnyCPU'">
<DefineConstants>$(DefineConstants)TRACE;TRAVISCI</DefineConstants>
</PropertyGroup>
Expand Down
Loading