Skip to content

Commit 08ca4d0

Browse files
ronens88cursoragent
andcommitted
CM-59712: add --maven-settings-file to report sbom path command
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent e4cc4b5 commit 08ca4d0

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,12 @@ To create an SBOM report for a path:\
13071307
For example:\
13081308
`cycode report sbom --format spdx-2.3 --include-vulnerabilities --include-dev-dependencies path /path/to/local/project`
13091309
1310+
The `path` subcommand supports the following additional options:
1311+
1312+
| Option | Description |
1313+
|-------------------------|----------------------------------------------------------------------------------------------------------------------------------|
1314+
| `--maven-settings-file` | For Maven only, allows using a custom [settings.xml](https://maven.apache.org/settings.html) file when building the dependency tree |
1315+
13101316
# Import Command
13111317
13121318
## Importing SBOM

cycode/cli/apps/report/sbom/path/path_command.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import time
22
from pathlib import Path
3-
from typing import Annotated
3+
from typing import Annotated, Optional
44

55
import typer
66

@@ -14,14 +14,28 @@
1414
from cycode.cli.utils.progress_bar import SbomReportProgressBarSection
1515
from cycode.cli.utils.scan_utils import is_cycodeignore_allowed_by_scan_config
1616

17+
_SCA_RICH_HELP_PANEL = 'SCA options'
18+
1719

1820
def path_command(
1921
ctx: typer.Context,
2022
path: Annotated[
2123
Path,
2224
typer.Argument(exists=True, resolve_path=True, help='Path to generate SBOM report for.', show_default=False),
2325
],
26+
maven_settings_file: Annotated[
27+
Optional[Path],
28+
typer.Option(
29+
'--maven-settings-file',
30+
show_default=False,
31+
help='When specified, Cycode will use this settings.xml file when building the maven dependency tree.',
32+
dir_okay=False,
33+
rich_help_panel=_SCA_RICH_HELP_PANEL,
34+
),
35+
] = None,
2436
) -> None:
37+
ctx.obj['maven_settings_file'] = maven_settings_file
38+
2539
client = get_report_cycode_client(ctx)
2640
report_parameters = ctx.obj['report_parameters']
2741
output_format = report_parameters.output_format

0 commit comments

Comments
 (0)