Skip to content

Commit

Permalink
Setting up quickbuild setup for dotnet as i could not sleep OWASP/wro…
Browse files Browse the repository at this point in the history
  • Loading branch information
commjoen committed Feb 27, 2024
1 parent 8f621a6 commit 688d523
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ wrongsecrets-golang
wrongsecrets-golang-*
wrongsecrets-rust
wrongsecrets-rust-*
wrongsecrets-dotnet
wrongsecrets-dotnet-*

dockcross/
.vscode/
Expand All @@ -84,3 +86,5 @@ target/

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
dotnet/dotnetproject/bin/
dotnet/dotnetproject/obj/Release/
6 changes: 3 additions & 3 deletions dotnet/dotnetproject/dotnetproject.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RuntimeIdentifiers>osx-x64;osx-arm64;win-x64;win-arm64;linux-x64;linux-arm64;linux-musl-x64;linux-musl-arm64</RuntimeIdentifiers>
<Runtime>osx-x64;osx-arm64;win-x64;win-arm64;linux-x64;linux-arm64;linux-musl-x64;linux-musl-arm64</Runtime>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<RuntimeIdentifiers>osx-x64;osx-arm64;win-x64;win-arm64;linux-x64;linux-arm64;linux-musl-x64;linux-musl-arm64</RuntimeIdentifiers>
<self-contained>True</self-contained>
</PropertyGroup>


Expand Down
112 changes: 112 additions & 0 deletions dotnet/dotnetproject/obj/dotnetproject.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,125 @@
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Runtime.linux-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.AspNetCore.App.Runtime.linux-musl-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.AspNetCore.App.Runtime.linux-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.AspNetCore.App.Runtime.osx-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.AspNetCore.App.Runtime.win-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.AspNetCore.App.Runtime.win-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.linux-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.linux-musl-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.linux-musl-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.linux-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.osx-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.win-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.win-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.linux-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.linux-musl-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.linux-musl-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.linux-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.osx-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.win-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.win-x64",
"version": "[8.0.1, 8.0.1]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/local/Cellar/dotnet/8.0.1/libexec/sdk/8.0.101/PortableRuntimeIdentifierGraph.json"
}
},
"runtimes": {
"linux-arm64": {
"#import": []
},
"linux-musl-arm64": {
"#import": []
},
"linux-musl-x64": {
"#import": []
},
"linux-x64": {
"#import": []
},
"osx-arm64": {
"#import": []
},
"osx-x64": {
"#import": []
},
"win-arm64": {
"#import": []
},
"win-x64": {
"#import": []
}
}
}
}
Expand Down
122 changes: 121 additions & 1 deletion dotnet/dotnetproject/obj/project.assets.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{
"version": 3,
"targets": {
"net8.0": {}
"net8.0": {},
"net8.0/linux-arm64": {},
"net8.0/linux-musl-arm64": {},
"net8.0/linux-musl-x64": {},
"net8.0/linux-x64": {},
"net8.0/osx-arm64": {},
"net8.0/osx-x64": {},
"net8.0/win-arm64": {},
"net8.0/win-x64": {}
},
"libraries": {},
"projectFileDependencyGroups": {
Expand Down Expand Up @@ -54,13 +62,125 @@
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Runtime.linux-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.AspNetCore.App.Runtime.linux-musl-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.AspNetCore.App.Runtime.linux-musl-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.AspNetCore.App.Runtime.linux-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.AspNetCore.App.Runtime.osx-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.AspNetCore.App.Runtime.win-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.AspNetCore.App.Runtime.win-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.linux-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.linux-musl-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.linux-musl-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.linux-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.osx-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.win-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Host.win-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.linux-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.linux-musl-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.linux-musl-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.linux-x64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.osx-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.win-arm64",
"version": "[8.0.1, 8.0.1]"
},
{
"name": "Microsoft.NETCore.App.Runtime.win-x64",
"version": "[8.0.1, 8.0.1]"
}
],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/local/Cellar/dotnet/8.0.1/libexec/sdk/8.0.101/PortableRuntimeIdentifierGraph.json"
}
},
"runtimes": {
"linux-arm64": {
"#import": []
},
"linux-musl-arm64": {
"#import": []
},
"linux-musl-x64": {
"#import": []
},
"linux-x64": {
"#import": []
},
"osx-arm64": {
"#import": []
},
"osx-x64": {
"#import": []
},
"win-arm64": {
"#import": []
},
"win-x64": {
"#import": []
}
}
}
}
26 changes: 24 additions & 2 deletions dotnet/dotnetproject/obj/project.nuget.cache
Original file line number Diff line number Diff line change
@@ -1,8 +1,30 @@
{
"version": 2,
"dgSpecHash": "tRJ7SIqS9FMsvuRREHAlXZMqluhlTHesoYKXRjL/saJEWE98MzyLF4PZGQTSdVmajUwh/fft4gL50VXD/y3ESw==",
"dgSpecHash": "IOJduASDn1lomXmrl+zyr/UVvNs5YH5go9hR8aKy8suOqBNIZwkauUgBNvR4rmvzVJUFGn7unM7FJ3WkFiuFLg==",
"success": true,
"projectFilePath": "/Users/razr/workspace/owasp/wrongsecrets-binaries/dotnet/dotnetproject/dotnetproject.csproj",
"expectedPackageFiles": [],
"expectedPackageFiles": [
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.win-x64/8.0.1/microsoft.netcore.app.runtime.win-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.osx-arm64/8.0.1/microsoft.netcore.app.runtime.osx-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.win-arm64/8.0.1/microsoft.netcore.app.runtime.win-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.linux-x64/8.0.1/microsoft.netcore.app.runtime.linux-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.linux-arm64/8.0.1/microsoft.netcore.app.runtime.linux-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.linux-musl-x64/8.0.1/microsoft.netcore.app.runtime.linux-musl-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.linux-musl-arm64/8.0.1/microsoft.netcore.app.runtime.linux-musl-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.win-x64/8.0.1/microsoft.aspnetcore.app.runtime.win-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.osx-arm64/8.0.1/microsoft.aspnetcore.app.runtime.osx-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.win-arm64/8.0.1/microsoft.aspnetcore.app.runtime.win-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.linux-x64/8.0.1/microsoft.aspnetcore.app.runtime.linux-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.linux-arm64/8.0.1/microsoft.aspnetcore.app.runtime.linux-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.linux-musl-x64/8.0.1/microsoft.aspnetcore.app.runtime.linux-musl-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.linux-musl-arm64/8.0.1/microsoft.aspnetcore.app.runtime.linux-musl-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.win-x64/8.0.1/microsoft.netcore.app.host.win-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.osx-arm64/8.0.1/microsoft.netcore.app.host.osx-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.win-arm64/8.0.1/microsoft.netcore.app.host.win-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.linux-x64/8.0.1/microsoft.netcore.app.host.linux-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.linux-arm64/8.0.1/microsoft.netcore.app.host.linux-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.linux-musl-x64/8.0.1/microsoft.netcore.app.host.linux-musl-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.linux-musl-arm64/8.0.1/microsoft.netcore.app.host.linux-musl-arm64.8.0.1.nupkg.sha512"
],
"logs": []
}
24 changes: 24 additions & 0 deletions quickbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,27 @@ echo "Please run this on Mac OS-X with GCC support for 'arm64-apple-macos12' and

echo "compiling for .net: requires 'brew install dotnet' on MacOS"
cd dotnet/dotnetproject
dotnet build dotnetproject.csproj --runtime osx-x64 --self-contained true
dotnet publish dotnetproject.csproj --runtime osx-x64 /p:PublishSingleFile=true
cp ./bin/Release/net8.0/osx-x64/publish/dotnetproject ../../wrongsecrets-dotnet
dotnet build dotnetproject.csproj --runtime osx-arm64 --self-contained true
dotnet publish dotnetproject.csproj --runtime osx-arm64 /p:PublishSingleFile=true
cp ./bin/Release/net8.0/osx-arm64/publish/dotnetproject ../../wrongsecrets-dotnet-arm
dotnet build dotnetproject.csproj --runtime win-x64 --self-contained true
dotnet publish dotnetproject.csproj --runtime win-x64 /p:PublishSingleFile=true
cp ./bin/Release/net8.0/win-x64/publish/dotnetproject ../../wrongsecrets-dotnet-windows
dotnet build dotnetproject.csproj --runtime win-arm64 --self-contained true
dotnet publish dotnetproject.csproj --runtime win-arm64 /p:PublishSingleFile=true
cp ./bin/Release/net8.0/win-arm64/publish/dotnetproject ../../wrongsecrets-dotnet-windows-arm
dotnet build dotnetproject.csproj --runtime linux-x64 --self-contained true
dotnet publish dotnetproject.csproj --runtime linux-x64 /p:PublishSingleFile=true
cp ./bin/Release/net8.0/linux-x64/publish/dotnetproject ../../wrongsecrets-dotnet-linux
dotnet build dotnetproject.csproj --runtime linux-arm64 --self-contained true
dotnet publish dotnetproject.csproj --runtime linux-arm64 /p:PublishSingleFile=true
cp ./bin/Release/net8.0/linux-arm64/publish/dotnetproject ../../wrongsecrets-dotnet-linux-arm
dotnet build dotnetproject.csproj --runtime linux-musl-x64 --self-contained true
dotnet publish dotnetproject.csproj --runtime linux-musl-x64 /p:PublishSingleFile=true
cp ./bin/Release/net8.0/linux-musl-x64/publish/dotnetproject ../../wrongsecrets-dotnet-linux-musl
dotnet build dotnetproject.csproj --runtime linux-musl-arm64 --self-contained true
dotnet publish dotnetproject.csproj --runtime linux-musl-arm64 /p:PublishSingleFile=true
cp ./bin/Release/net8.0/linux-musl-arm64/publish/dotnetproject ../../wrongsecrets-dotnet-linux-musl-arm

0 comments on commit 688d523

Please sign in to comment.