Skip to content

Commit

Permalink
Audit: Fix wrong length
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 24, 2024
1 parent 99a9f3e commit 2611706
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions github_app_geo_project/module/audit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ async def snyk(
logs_url,
result,
env_no_debug,
fixable_vulnerabilities,
fixable_vulnerabilities_summary,
)
npm_audit_fix_message, npm_audit_fix_success = await _npm_audit_fix(fixable_files_npm, result)
Expand Down Expand Up @@ -394,12 +393,11 @@ async def _snyk_fix(
logs_url: str,
result: list[module_utils.Message],
env_no_debug: dict[str, str],
fixable_vulnerabilities: dict[str, int],
fixable_vulnerabilities_summary: dict[str, str],
) -> tuple[bool, module_utils.HtmlMessage | None]:
snyk_fix_success = True
snyk_fix_message = None
if fixable_vulnerabilities:
if fixable_vulnerabilities_summary:
subprocess.run(["git", "reset", "--hard"], timeout=30) # nosec # pylint: disable=subprocess-run-check

command = [
Expand Down Expand Up @@ -433,7 +431,7 @@ async def _snyk_fix(
]
)
)
message.title = f"Unable to fix {len(fixable_vulnerabilities)} vulnerabilities"
message.title = f"Unable to fix {len(fixable_vulnerabilities_summary)} vulnerabilities"
_LOGGER.error(message)

await module_utils.run_timeout(
Expand Down

0 comments on commit 2611706

Please sign in to comment.