Skip to content

Commit f31f24f

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 f31f24f

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-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: 16 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

@@ -15,13 +15,28 @@
1515
from cycode.cli.utils.scan_utils import is_cycodeignore_allowed_by_scan_config
1616

1717

18+
_SCA_RICH_HELP_PANEL = 'SCA options'
19+
20+
1821
def path_command(
1922
ctx: typer.Context,
2023
path: Annotated[
2124
Path,
2225
typer.Argument(exists=True, resolve_path=True, help='Path to generate SBOM report for.', show_default=False),
2326
],
27+
maven_settings_file: Annotated[
28+
Optional[Path],
29+
typer.Option(
30+
'--maven-settings-file',
31+
show_default=False,
32+
help='When specified, Cycode will use this settings.xml file when building the maven dependency tree.',
33+
dir_okay=False,
34+
rich_help_panel=_SCA_RICH_HELP_PANEL,
35+
),
36+
] = None,
2437
) -> None:
38+
ctx.obj['maven_settings_file'] = maven_settings_file
39+
2540
client = get_report_cycode_client(ctx)
2641
report_parameters = ctx.obj['report_parameters']
2742
output_format = report_parameters.output_format

0 commit comments

Comments
 (0)