Skip to content

Commit

Permalink
Merge branch 'main' into feat/improve_validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsfoni authored Aug 11, 2024
2 parents bba8c04 + f43675e commit 2fb9678
Show file tree
Hide file tree
Showing 29 changed files with 313 additions and 52 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: .NET Core CI

on: [pull_request, workflow_dispatch]

env:
SNAPSHOOTER_STRICT_MODE: true

jobs:
# Fail if there are build warnings
#
Expand Down Expand Up @@ -49,7 +52,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# os: [ubuntu-latest, windows-latest, macos-latest]
# macos currently disabled. see issue https://github.com/SwissLife-OSS/snapshooter/issues/196.
os: [ubuntu-latest, windows-latest]
timeout-minutes: 30

steps:
Expand All @@ -58,6 +63,15 @@ jobs:
with:
dotnet-version: '6.0'

- name: SnapshooterHotfixSymlinkLinux
if: matrix.os == 'ubuntu-latest'
run: sudo ln -s "$GITHUB_WORKSPACE" /_
shell: bash
- name: SnapshooterHotfixSymlinkWindows
if: matrix.os == 'windows-latest'
run: New-Item -ItemType SymbolicLink -Path "/_" -Target "$env:GITHUB_WORKSPACE"
shell: pwsh

- name: Tests
run: |
dotnet restore
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ name: Release
on:
workflow_dispatch

env:
SNAPSHOOTER_STRICT_MODE: true

jobs:
release:
name: Release
Expand All @@ -35,6 +38,9 @@ jobs:
- uses: actions/setup-dotnet@v3.0.2
with:
dotnet-version: '6.0'
- name: SnapshooterHotfixSymlinkLinux
run: sudo ln -s "$GITHUB_WORKSPACE" /_
shell: bash
# The tests should have already been run during the PR workflow, so this is really just a sanity check
- name: Tests
run: dotnet test
Expand Down
5 changes: 5 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"MD013": {
"code_blocks": false
}
}
72 changes: 61 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Options:
--output-file <output-file> Output BOM filename, will write to stdout if no value provided.
--input-format <autodetect|csv|json|protobuf|spdxjson|xml> Specify input file format.
--output-format <autodetect|csv|json|protobuf|spdxjson|xml> Specify output file format.
--output-version <v1_0|v1_1|v1_2|v1_3|v1_4> Specify output BOM specification version. (ignored for CSV and SPDX formats)
--output-version <v1_0|v1_1|v1_2|v1_3|v1_4|v1_5> Specify output BOM specification version. (ignored for CSV and SPDX formats)
```

### Examples
Expand Down Expand Up @@ -192,14 +192,15 @@ Usage:
cyclonedx merge [options]
Options:
--input-files <input-files> Input BOM filenames (separate filenames with a space).
--output-file <output-file> Output BOM filename, will write to stdout if no value provided.
--input-format <autodetect|json|protobuf|xml> Specify input file format.
--output-format <autodetect|json|protobuf|xml> Specify output file format.
--hierarchical Perform a hierarchical merge.
--group <group> Provide the group of software the merged BOM describes.
--name <name> Provide the name of software the merged BOM describes (required for hierarchical merging).
--version <version> Provide the version of software the merged BOM describes (required for hierarchical merging).
--input-files <input-files> Input BOM filenames (separate filenames with a space).
--output-file <output-file> Output BOM filename, will write to stdout if no value provided.
--input-format <autodetect|json|protobuf|xml> Specify input file format.
--output-format <autodetect|json|protobuf|xml> Specify output file format.
--output-version <v1_0|v1_1|v1_2|v1_3|v1_4|v1_5> Specify output BOM specification version.
--hierarchical Perform a hierarchical merge.
--group <group> Provide the group of software the merged BOM describes.
--name <name> Provide the name of software the merged BOM describes (required for hierarchical merging).
--version <version> Provide the version of software the merged BOM describes (required for hierarchical merging).
```

Note: To perform a hierarchical merge all BOMs need the subject of the BOM
Expand All @@ -213,6 +214,55 @@ Merge two XML formatted BOMs:
Merging two BOMs and piping output to additional tools:
`cyclonedx-cli merge --input-files sbom1.xml sbom2.xml --output-format json | grep "something"`

## Rename Entity command

Rename an entity identified by "bom-ref" (formally a "refType") in the document
and/or back-references to such entity (formally a "refLinkType", typically as
a "ref" property; or certain lists' items).

```
rename-entity
Rename an entity identified by a "bom-ref" (including back-references to it) in the BOM document
Usage:
cyclonedx [options] rename-entity
Options:
--input-file <input-file> Input BOM filename.
--output-file <output-file> Output BOM filename, will write to stdout if no value provided.
--old-ref <old-ref> Old value of "bom-ref" entity identifier (or "ref" values or certain list items pointing to it).
--new-ref <new-ref> New value of "bom-ref" entity identifier (or "ref" values or certain list items pointing to it).
--input-format <autodetect|json|protobuf|xml> Specify input file format.
--output-format <autodetect|json|protobuf|xml> Specify output file format.
```

Keep in mind that these identifiers are arbitrary strings that have a meaning
within the Bom document (and should uniquely identify one entity in its scope).
While in some cases these identifiers are meaningful (e.g. "purl" values used
as "bom-ref" by the cyclonedx-maven-plugin), they may also validly be random
UUIDs or collision-prone strings like "1", "2", "3"...

They may be opportunistically used as anchors for cross-document references,
so in some cases a back-reference may point to a string for which there is no
"bom-ref" in the same document (see relevant CycloneDX specification version
for details).

This renaming operation also modifies the output document metadata, to reflect
the modification compared to the input document.

Basic error-checking, such as attempt to re-use an already existing identifier,
is performed.

### Examples

Rename an entity:
```
cyclonedx rename-entity --input-file sbom.json --output-format xml \
--oldref "pkg:maven/org.yaml/snakeyaml@1.33?type=jar" \
--newref "thirdpartylibs:org.yaml:snakeyaml:1.33:jar" \
| grep "thirdparty"
```

## Sign Command

Sign a BOM or file
Expand Down Expand Up @@ -262,7 +312,7 @@ Usage:
Options:
--input-file <input-file> Input BOM filename, will read from stdin if no value provided.
--input-format <autodetect|json|xml> Specify input file format.
--input-version <v1_0|v1_1|v1_2|v1_3|v1_4> Specify input file specification version (defaults to v1.4)
--input-version <v1_0|v1_1|v1_2|v1_3|v1_4|v1_5> Specify input file specification version (defaults to v1.5)
--fail-on-errors Fail on validation errors (return a non-zero exit code)
```

Expand Down Expand Up @@ -295,7 +345,7 @@ Options:

```
file
Verifies a PKCS1 RSA SHA256 signature file for an abritrary file
Verifies a PKCS1 RSA SHA256 signature file for an arbitrary file
Usage:
cyclonedx verify file <file> [options]
Expand Down
2 changes: 1 addition & 1 deletion semver.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.25.0
0.25.1
4 changes: 2 additions & 2 deletions src/cyclonedx/CliUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public static async Task<int> OutputBomHelper(Bom bom, CycloneDXBomFormat format
}
}

using var stream = filename == null ? Console.OpenStandardOutput() : File.OpenWrite(filename);
using var stream = filename == null ? Console.OpenStandardOutput() : File.Create(filename);

switch (format)
{
Expand Down Expand Up @@ -193,7 +193,7 @@ public static async Task<int> OutputBomHelper(Bom bom, ConvertFormat format, Spe

bom.SpecVersion = outputVersion.HasValue ? outputVersion.Value : SpecificationVersionHelpers.CurrentVersion;

using var stream = filename == null ? Console.OpenStandardOutput() : File.OpenWrite(filename);
using var stream = filename == null ? Console.OpenStandardOutput() : File.Create(filename);

switch (format)
{
Expand Down
1 change: 1 addition & 0 deletions src/cyclonedx/Commands/Add/AddFilesCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public static async Task<int> AddFiles(AddFilesCommandOptions options)
var thisTool = new Component
{
Name = "CycloneDX CLI",
Type = Component.Classification.Application,
Version = Assembly.GetExecutingAssembly().GetName().Version.ToString(),
};

Expand Down
3 changes: 2 additions & 1 deletion src/cyclonedx/Commands/MergeCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static void Configure(RootCommand rootCommand)
subCommand.Add(new Option<string>("--output-file", "Output BOM filename, will write to stdout if no value provided."));
subCommand.Add(new Option<CycloneDXBomFormat>("--input-format", "Specify input file format."));
subCommand.Add(new Option<CycloneDXBomFormat>("--output-format", "Specify output file format."));
subCommand.Add(new Option<SpecificationVersion>("--output-version", "Specify output BOM specification version."));
subCommand.Add(new Option<bool>("--hierarchical", "Perform a hierarchical merge."));
subCommand.Add(new Option<string>("--group", "Provide the group of software the merged BOM describes."));
subCommand.Add(new Option<string>("--name", "Provide the name of software the merged BOM describes (required for hierarchical merging)."));
Expand Down Expand Up @@ -110,7 +111,7 @@ public static async Task<int> Merge(MergeCommandOptions options)
Console.WriteLine($" Total {outputBom.Components?.Count ?? 0} components");
}

return await CliUtils.OutputBomHelper(outputBom, options.OutputFormat, options.OutputFile).ConfigureAwait(false);
return await CliUtils.OutputBomHelper(outputBom, (ConvertFormat)options.OutputFormat, options.OutputVersion, options.OutputFile).ConfigureAwait(false);
}

private static async Task<IEnumerable<Bom>> InputBoms(IEnumerable<string> inputFilenames, CycloneDXBomFormat inputFormat, bool outputToConsole)
Expand Down
5 changes: 3 additions & 2 deletions src/cyclonedx/Commands/MergeCommandOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is part of CycloneDX CLI Tool
// This file is part of CycloneDX CLI Tool
//
// Licensed under the Apache License, Version 2.0 (the “License”);
// you may not use this file except in compliance with the License.
Expand All @@ -24,9 +24,10 @@ public class MergeCommandOptions
public string OutputFile { get; set; }
public CycloneDXBomFormat InputFormat { get; set; }
public CycloneDXBomFormat OutputFormat { get; set; }
public SpecificationVersion? OutputVersion { get; set; }
public bool Hierarchical { get; set; }
public string Group { get; set; }
public string Name { get; set; }
public string Version { get; set; }
}
}
}
101 changes: 101 additions & 0 deletions src/cyclonedx/Commands/RenameEntityCommand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// This file is part of CycloneDX CLI Tool
//
// Licensed under the Apache License, Version 2.0 (the “License”);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an “AS IS” BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) OWASP Foundation. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.CommandLine;
using System.CommandLine.Invocation;
using System.Threading.Tasks;
using CycloneDX.Models;
using CycloneDX.Utils;
using System.IO;
using System.Collections.Immutable;

namespace CycloneDX.Cli.Commands
{
public static class RenameEntityCommand
{
public static void Configure(RootCommand rootCommand)
{
Contract.Requires(rootCommand != null);
var subCommand = new System.CommandLine.Command("rename-entity", "Rename an entity identified by a \"bom-ref\" (including back-references to it) in the BOM document");
subCommand.Add(new Option<string>("--input-file", "Input BOM filename."));
subCommand.Add(new Option<string>("--output-file", "Output BOM filename, will write to stdout if no value provided."));
subCommand.Add(new Option<string>("--old-ref", "Old value of \"bom-ref\" entity identifier (or \"ref\" values or certain list items pointing to it)."));
subCommand.Add(new Option<string>("--new-ref", "New value of \"bom-ref\" entity identifier (or \"ref\" values or certain list items pointing to it)."));
subCommand.Add(new Option<CycloneDXBomFormat>("--input-format", "Specify input file format."));
subCommand.Add(new Option<CycloneDXBomFormat>("--output-format", "Specify output file format."));
subCommand.Handler = CommandHandler.Create<RenameEntityCommandOptions>(RenameEntity);
rootCommand.Add(subCommand);
}

public static async Task<int> RenameEntity(RenameEntityCommandOptions options)
{
Contract.Requires(options != null);
var outputToConsole = string.IsNullOrEmpty(options.OutputFile);

if (options.OutputFormat == CycloneDXBomFormat.autodetect)
{
options.OutputFormat = CliUtils.AutoDetectBomFormat(options.OutputFile);
if (options.OutputFormat == CycloneDXBomFormat.autodetect)
{
Console.WriteLine($"Unable to auto-detect output format");
return (int)ExitCode.ParameterValidationError;
}
}

Console.WriteLine($"Loading input document...");
if (!outputToConsole) Console.WriteLine($"Processing input file {options.InputFile}");
var bom = await CliUtils.InputBomHelper(options.InputFile, options.InputFormat).ConfigureAwait(false);

if (bom is null)
{
Console.WriteLine($"Empty or absent input document");
return (int)ExitCode.ParameterValidationError;
}

Console.WriteLine($"Beginning Bom walk to discover all identifiers (this can take a while)");
BomWalkResult bwr = bom.WalkThis();

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-x64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-x64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-x64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-x64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-musl-x64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-musl-x64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-musl-x64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-musl-x64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x86)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x86)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x86)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x86)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-arm64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-arm64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-arm64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-arm64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-x64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-x64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-x64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-x64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Build warnings check

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Build warnings check

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Build warnings check

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Build warnings check

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm64)

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm64)

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Tests for .NET on ubuntu-latest

The type or namespace name 'BomWalkResult' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 72 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Tests for .NET on ubuntu-latest

'Bom' does not contain a definition for 'WalkThis' and no accessible extension method 'WalkThis' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Console.WriteLine($"Beginning Bom walk rename processing (this can take a while)");
if (bom.RenameBomRef(options.OldRef, options.NewRef, bwr))

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-x64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-x64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-musl-x64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-musl-x64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x86)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x86)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-arm64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-arm64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-x64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-x64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Build warnings check

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Build warnings check

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm64)

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 75 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Tests for .NET on ubuntu-latest

'Bom' does not contain a definition for 'RenameBomRef' and no accessible extension method 'RenameBomRef' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)
{
Console.WriteLine($"Did not encounter any issues during the rename operation");
}
else
{
Console.WriteLine($"Rename operation failed non-fatally (e.g. old ref name not mentioned in the Bom document)");
}

// Ensure that the modified document has its own identity
// (new SerialNumber, Version=1, Timestamp...) and its Tools
// collection refers to this library and the program/tool
// like cyclonedx-cli which consumes it:
bom.BomMetadataUpdate(true);

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-x64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-x64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-musl-x64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-musl-x64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x86)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x86)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-arm64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-arm64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-x64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-x64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Build warnings check

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Build warnings check

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm64)

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 88 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Tests for .NET on ubuntu-latest

'Bom' does not contain a definition for 'BomMetadataUpdate' and no accessible extension method 'BomMetadataUpdate' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)
bom.BomMetadataReferThisToolkit();

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-x64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-x64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-musl-x64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-musl-x64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x86)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x86)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-arm64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (osx-arm64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-x64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-x64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Build warnings check

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Build warnings check

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-x64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (win-arm)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Runtime build check (linux-arm64)

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 89 in src/cyclonedx/Commands/RenameEntityCommand.cs

View workflow job for this annotation

GitHub Actions / Tests for .NET on ubuntu-latest

'Bom' does not contain a definition for 'BomMetadataReferThisToolkit' and no accessible extension method 'BomMetadataReferThisToolkit' accepting a first argument of type 'Bom' could be found (are you missing a using directive or an assembly reference?)

if (!outputToConsole)
{
Console.WriteLine("Writing output file...");
Console.WriteLine($" Total {bom.Components?.Count ?? 0} components, {bom.Dependencies?.Count ?? 0} dependencies");
}

int res = await CliUtils.OutputBomHelper(bom, options.OutputFormat, options.OutputFile).ConfigureAwait(false);
return res;
}
}
}
30 changes: 30 additions & 0 deletions src/cyclonedx/Commands/RenameEntityCommandOptions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// This file is part of CycloneDX CLI Tool
//
// Licensed under the Apache License, Version 2.0 (the “License”);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an “AS IS” BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) OWASP Foundation. All Rights Reserved.
using System.Collections.Generic;

namespace CycloneDX.Cli.Commands
{
public class RenameEntityCommandOptions
{
public string InputFile { get; set; }
public string OutputFile { get; set; }
public string OldRef { get; set; }
public string NewRef { get; set; }
public CycloneDXBomFormat InputFormat { get; set; }
public CycloneDXBomFormat OutputFormat { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/cyclonedx/Commands/ValidateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static void Configure(RootCommand rootCommand)
var subCommand = new System.CommandLine.Command("validate", "Validate a BOM");
subCommand.Add(new Option<string>("--input-file", "Input BOM filename, will read from stdin if no value provided."));
subCommand.Add(new Option<ValidationBomFormat>("--input-format", "Specify input file format."));
subCommand.Add(new Option<SpecificationVersion?>("--input-version", "Specify input file specification version (defaults to v1.4)"));
subCommand.Add(new Option<SpecificationVersion?>("--input-version", "Specify input file specification version (defaults to v1.5)"));
subCommand.Add(new Option<bool>("--fail-on-errors", "Fail on validation errors (return a non-zero exit code)"));
subCommand.Handler = CommandHandler.Create<ValidateCommandOptions>(Validate);
rootCommand.Add(subCommand);
Expand Down
1 change: 1 addition & 0 deletions src/cyclonedx/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public static async Task<int> Main(string[] args)
DiffCommand.Configure(rootCommand);
KeyGenCommand.Configure(rootCommand);
MergeCommand.Configure(rootCommand);
RenameEntityCommand.Configure(rootCommand);
SignCommand.Configure(rootCommand);
ValidateCommand.Configure(rootCommand);
VerifyCommand.Configure(rootCommand);
Expand Down
4 changes: 2 additions & 2 deletions src/cyclonedx/cyclonedx.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<ItemGroup>
<PackageReference Include="CoderPatros.AntPathMatching" Version="0.1.1" />
<PackageReference Include="CsvHelper" Version="29.0.0" />
<PackageReference Include="CycloneDX.Utils" Version="6.0.0" />
<PackageReference Include="CycloneDX.Spdx.Interop" Version="6.0.0" />
<PackageReference Include="CycloneDX.Utils" Version="7.1.0" />
<PackageReference Include="CycloneDX.Spdx.Interop" Version="7.1.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="6.0.1" />
</ItemGroup>
Expand Down
Loading

0 comments on commit 2fb9678

Please sign in to comment.