Skip to content
Open
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
12 changes: 6 additions & 6 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '8.0'
dotnet-version: '10.0'

- name: Build
run: dotnet build /WarnAsError
Expand All @@ -34,20 +34,20 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
runtime: [linux-x64, linux-musl-x64, linux-arm, linux-arm64, win-x64, win-x86, win-arm64, osx-x64, osx-arm64]
runtime: [linux-x64, linux-musl-x64, linux-arm, linux-arm64, linux-musl-arm, win-x64, win-x86, win-arm64, osx-x64, osx-arm64]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '8.0'
dotnet-version: '10.0'

- name: Build
run: dotnet build src/cyclonedx/cyclonedx.csproj -r ${{ matrix.runtime }}

# Fail if there are any failed tests
#
# We support .NET 8.0 on Windows, Mac and Linux.
# We support .NET 10.0 on Windows, Mac and Linux.
#
# To check for failing tests locally run `dotnet test`.
test:
Expand All @@ -64,7 +64,7 @@ jobs:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '8.0'
dotnet-version: '10.0'

- name: SnapshooterHotfixSymlinkLinux
if: matrix.os == 'ubuntu-latest'
Expand All @@ -78,4 +78,4 @@ jobs:
- name: Tests
run: |
dotnet restore
dotnet test --framework net8.0
dotnet test --framework net10.0
16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 #v3.11.1
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '8.0'
dotnet-version: '10.0'
- name: SnapshooterHotfixSymlinkLinux
run: sudo ln -s "$GITHUB_WORKSPACE" /_
shell: bash
Expand All @@ -62,7 +62,7 @@ jobs:
REPO=cyclonedx/cyclonedx-cli
dotnet build --configuration Release
mkdir bin
for runtime in linux-x64 linux-musl-x64 linux-arm linux-arm64 win-x64 win-x86 win-arm64 osx-x64
for runtime in linux-x64 linux-musl-x64 linux-arm linux-arm64 linux-musl-arm win-x64 win-x86 win-arm64 osx-x64
do
dotnet publish src/cyclonedx/cyclonedx.csproj -r $runtime --configuration Release /p:Version=$VERSION --self-contained true /p:PublishSingleFile=true /p:IncludeNativeLibrariesInSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true --output bin/$runtime
done
Expand Down Expand Up @@ -133,6 +133,16 @@ jobs:
asset_name: cyclonedx-linux-arm64
asset_content_type: application/octet-stream

- name: Upload binary to github release
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: bin/linux-musl-arm/cyclonedx
asset_name: cyclonedx-linux-musl-arm
asset_content_type: application/octet-stream

- name: Upload binary to github release
uses: actions/upload-release-asset@v1.0.2
env:
Expand Down Expand Up @@ -186,7 +196,7 @@ jobs:
- uses: actions/checkout@v4.2.2
- uses: actions/setup-dotnet@v4.3.1
with:
dotnet-version: '8.0'
dotnet-version: '10.0'

- name: Create binary
run: |
Expand Down
3 changes: 2 additions & 1 deletion src/cyclonedx/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
[assembly:System.CLSCompliant(false)]
[assembly:System.CLSCompliant(false)]
[assembly:System.Runtime.CompilerServices.InternalsVisibleTo("cyclonedx.tests")]
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/Add/AddFilesCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

namespace CycloneDX.Cli.Commands.Add
{
public static class AddFilesCommand
internal static class AddFilesCommand
{
public static void Configure(System.CommandLine.Command rootCommand)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/Add/AddFilesCommandOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace CycloneDX.Cli.Commands.Add
{
public class AddFilesCommandOptions
internal class AddFilesCommandOptions
{
public string InputFile { get; set; }
public bool NoInput { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/AddCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace CycloneDX.Cli.Commands
{
public static class AddCommand
internal static class AddCommand
{
public static void Configure(RootCommand rootCommand)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/AnalyzeCommandOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace CycloneDX.Cli.Commands
{
public class AnalyzeCommandOptions
internal class AnalyzeCommandOptions
{
public string InputFile { get; set; }
public CycloneDXBomFormat InputFormat { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/CommandOutputFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Copyright (c) OWASP Foundation. All Rights Reserved.
namespace CycloneDX.Cli.Commands
{
public enum CommandOutputFormat
internal enum CommandOutputFormat
{
text,
json
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/ConvertCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace CycloneDX.Cli.Commands
{
public static class ConvertCommand
internal static class ConvertCommand
{
internal static void Configure(RootCommand rootCommand)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/ConvertCommandOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace CycloneDX.Cli.Commands
{
public class ConvertCommandOptions
internal class ConvertCommandOptions
{
public string InputFile { get; set; }
public string OutputFile { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions src/cyclonedx/Commands/ConvertFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
namespace CycloneDX.Cli.Commands
{
// WARNING: keep this in sync with BomFormat
#pragma warning disable CA1515 // Used as public test method parameters
public enum ConvertFormat
{
autodetect,
Expand All @@ -26,4 +27,5 @@ public enum ConvertFormat
csv,
spdxjson,
}
#pragma warning restore CA1515
}
2 changes: 2 additions & 0 deletions src/cyclonedx/Commands/CycloneDXBomFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
// Copyright (c) OWASP Foundation. All Rights Reserved.
namespace CycloneDX.Cli.Commands
{
#pragma warning disable CA1515 // Used as public test method parameters
public enum CycloneDXBomFormat
{
autodetect,
xml,
json,
protobuf,
}
#pragma warning restore CA1515
}
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/DiffCommandOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace CycloneDX.Cli.Commands
{
public class DiffCommandOptions
internal class DiffCommandOptions
{
public string FromFile { get; set; }
public string ToFile { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/KeyGenCommandOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace CycloneDX.Cli.Commands
{
public class KeyGenCommandOptions
internal class KeyGenCommandOptions
{
public string PrivateKeyFile { get; set; }
public string PublicKeyFile { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/MergeCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace CycloneDX.Cli.Commands
{
public static class MergeCommand
internal static class MergeCommand
{
public static void Configure(RootCommand rootCommand)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/MergeCommandOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace CycloneDX.Cli.Commands
{
public class MergeCommandOptions
internal class MergeCommandOptions
{
public IList<string> InputFiles { get; set; }
public string OutputFile { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/Sign/SignBomCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace CycloneDX.Cli.Commands.Sign
{
public static class SignBomCommand
internal static class SignBomCommand
{
public static void Configure(Command rootCommand)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/Sign/SignBomCommandOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace CycloneDX.Cli.Commands.Sign
{
public class SignBomCommandOptions
internal class SignBomCommandOptions
{
public string BomFile { get; set; }
public string KeyFile { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/Sign/SignFileCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace CycloneDX.Cli.Commands.Sign
{
public static class SignFileCommand
internal static class SignFileCommand
{
public static void Configure(Command rootCommand)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/Sign/SignFileCommandOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace CycloneDX.Cli.Commands.Sign
{
public class SignFileCommandOptions
internal class SignFileCommandOptions
{
public string File { get; set; }
public string KeyFile { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/SignCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace CycloneDX.Cli.Commands
{
public static class SignCommand
internal static class SignCommand
{
public static void Configure(RootCommand rootCommand)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/ValidateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace CycloneDX.Cli.Commands
{
public static class ValidateCommand
internal static class ValidateCommand
{

public static void Configure(RootCommand rootCommand)
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/ValidateCommandOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace CycloneDX.Cli.Commands
{
public class ValidateCommandOptions
internal class ValidateCommandOptions
{
public string InputFile { get; set; }
public ValidationBomFormat InputFormat { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions src/cyclonedx/Commands/ValidationBomFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
// Copyright (c) OWASP Foundation. All Rights Reserved.
namespace CycloneDX.Cli.Commands
{
#pragma warning disable CA1515 // Used as public test method parameters
public enum ValidationBomFormat
{
autodetect,
xml,
json,
}
#pragma warning restore CA1515
}
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/Verify/VerifyAllCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace CycloneDX.Cli.Commands.Verify
{
public static class VerifyAllCommand
internal static class VerifyAllCommand
{
public static void Configure(Command rootCommand)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/Verify/VerifyAllCommandOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace CycloneDX.Cli.Commands.Verify
{
public class VerifyAllCommandOptions
internal class VerifyAllCommandOptions
{
public string BomFile { get; set; }
public string KeyFile { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/Verify/VerifyFileCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

namespace CycloneDX.Cli.Commands.Verify
{
public static class VerifyFileCommand
internal static class VerifyFileCommand
{
public static void Configure(Command rootCommand)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/Verify/VerifyFileCommandOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace CycloneDX.Cli.Commands.Verify
{
public class VerifyFileCommandOptions
internal class VerifyFileCommandOptions
{
public string File { get; set; }
public string KeyFile { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/VerifyCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace CycloneDX.Cli.Commands
{
public static class VerifyCommand
internal static class VerifyCommand
{
public static void Configure(RootCommand rootCommand)
{
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/ExitCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace CycloneDX.Cli
{
public enum ExitCode
internal enum ExitCode
{
Ok,
OkFail,
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Models/AnalyzeResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

namespace CycloneDX.Cli.Models
{
public class AnalyzeResult
internal class AnalyzeResult
{
public Dictionary<string,List<Component>> MultipleComponentVersions { get; set; }
}
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Models/DiffResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

namespace CycloneDX.Cli.Models
{
public class DiffResult
internal class DiffResult
{
public Dictionary<string,DiffItem<Component>> ComponentVersions { get; set; }
}
Expand Down
2 changes: 1 addition & 1 deletion src/cyclonedx/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace CycloneDX.Cli
{
public static class Program
internal static class Program
{
private const string CycloneDx = @"
______ __ ____ _ __ ________ ____
Expand Down
Loading
Loading