Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SafetyQuincyF committed Jan 11, 2025
1 parent 6a28ead commit 8ca1f3f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions safety/scan/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class ScannableEcosystems(Enum):
def process_report(
obj: Any, console: Console, report: ReportModel, output: str,
save_as: Optional[Tuple[str, Path]], detailed_output: bool = False,
filter_keys: Optional[List[str]] = None,
filter_keys: Optional[List[str]] = None, use_server_matching: bool = False,
**kwargs
) -> Optional[str]:
"""
Expand Down Expand Up @@ -202,7 +202,7 @@ def process_report(
report_to_export)
report_url = None

if obj.platform_enabled:
if obj.platform_enabled and not use_server_matching:
status.update(f"{ICON_UPLOAD} {MSG_UPLOADING_REPORT.format(SAFETY_PLATFORM_URL)}")
try:
result = obj.auth.client.upload_report(json_format)
Expand Down Expand Up @@ -1216,6 +1216,7 @@ def sort_vulns_by_score(vuln: Vulnerability) -> int:
save_as=save_as if save_as and all(save_as) else None,
detailed_output=detailed_output,
filter_keys=filter_keys,
use_server_matching=use_server_matching
**{k: v for k, v in ctx.params.items() if k not in {"detailed_output", "output", "save_as", "filter_keys"}}
)

Expand Down Expand Up @@ -1536,7 +1537,7 @@ def system_scan(ctx: typer.Context,
console.print(f"[bold]{prj}[/bold] at {data['path']}")
for detail in [f"{prj} dashboard: {data['project_url']}"]:
console.print(Padding(detail, (0, 0, 0, 1)), emoji=True, overflow="crop")

process_report(ctx.obj, console, report, **{**ctx.params})

def get_vulnerability_summary(report: Dict[str, Any]) -> Tuple[int, int]:
Expand Down

0 comments on commit 8ca1f3f

Please sign in to comment.