Skip to content
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,12 @@ To create an SBOM report for a path:\
For example:\
`cycode report sbom --format spdx-2.3 --include-vulnerabilities --include-dev-dependencies path /path/to/local/project`

The `path` subcommand supports the following additional options:

| Option | Description |
|-------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| `--maven-settings-file` | For Maven only, allows using a custom [settings.xml](https://maven.apache.org/settings.html) file when building the dependency tree |

# Import Command

## Importing SBOM
Expand Down
16 changes: 15 additions & 1 deletion cycode/cli/apps/report/sbom/path/path_command.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import time
from pathlib import Path
from typing import Annotated
from typing import Annotated, Optional

import typer

Expand All @@ -14,14 +14,28 @@
from cycode.cli.utils.progress_bar import SbomReportProgressBarSection
from cycode.cli.utils.scan_utils import is_cycodeignore_allowed_by_scan_config

_SCA_RICH_HELP_PANEL = 'SCA options'


def path_command(
ctx: typer.Context,
path: Annotated[
Path,
typer.Argument(exists=True, resolve_path=True, help='Path to generate SBOM report for.', show_default=False),
],
maven_settings_file: Annotated[
Optional[Path],
typer.Option(
'--maven-settings-file',
show_default=False,
help='When specified, Cycode will use this settings.xml file when building the maven dependency tree.',
dir_okay=False,
rich_help_panel=_SCA_RICH_HELP_PANEL,
),
] = None,
) -> None:
ctx.obj['maven_settings_file'] = maven_settings_file

client = get_report_cycode_client(ctx)
report_parameters = ctx.obj['report_parameters']
output_format = report_parameters.output_format
Expand Down