Skip to content
Open
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
12 changes: 6 additions & 6 deletions scanner/cli/appguardrail.py
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ def cmd_scan(args):
findings.extend(_run_bandit_scan(scan_path))
except RuntimeError as exc:
if external_plan.bandit.auto_selected and not external_plan.bandit.forced:
print(f"⚠️ Skipping Bandit auto integration: {exc}\n")
print(f"⚠️ Warning: Skipping Bandit auto integration: {exc}\n")
else:
print(f"❌ Error: {exc}", file=sys.stderr)
print(
Expand All @@ -1437,7 +1437,7 @@ def cmd_scan(args):
findings.extend(_run_ruff_security_scan(scan_path))
except RuntimeError as exc:
if external_plan.ruff.auto_selected and not external_plan.ruff.forced:
print(f"⚠️ Skipping Ruff auto integration: {exc}\n")
print(f"⚠️ Warning: Skipping Ruff auto integration: {exc}\n")
else:
print(f"❌ Error: {exc}", file=sys.stderr)
print(
Expand All @@ -1455,7 +1455,7 @@ def cmd_scan(args):
external_plan.semgrep.auto_selected
and not external_plan.semgrep.forced
):
print(f"⚠️ Skipping Semgrep auto integration: {exc}\n")
print(f"⚠️ Warning: Skipping Semgrep auto integration: {exc}\n")
else:
print(f"❌ Error: {exc}", file=sys.stderr)
print(
Expand All @@ -1470,7 +1470,7 @@ def cmd_scan(args):
findings.extend(_run_zap_baseline(zap_baseline_url))
except RuntimeError as exc:
if external_plan.zap.auto_selected and not external_plan.zap.forced:
print(f"⚠️ Skipping ZAP auto integration: {exc}\n")
print(f"⚠️ Warning: Skipping ZAP auto integration: {exc}\n")
else:
print(f"❌ Error: {exc}", file=sys.stderr)
print(
Expand Down Expand Up @@ -2634,13 +2634,13 @@ def _print_scan_results(findings, files_scanned):
)

if files_scanned == 0:
print("\n⚠️ No files were scanned. Are you in the right directory?")
print("\n⚠️ Warning: No files were scanned. Are you in the right directory?")
elif counts["CRITICAL"] > 0:
issue_word = "issue" if counts["CRITICAL"] == 1 else "issues"
print(f"\n❌ Critical {issue_word} found. Fix before deploying.")
elif counts["HIGH"] > 0:
issue_word = "issue" if counts["HIGH"] == 1 else "issues"
print(f"\n⚠️ High-severity {issue_word} found. Review before deploying.")
print(f"\n⚠️ Warning: High-severity {issue_word} found. Review before deploying.")
elif not findings:
print("\nβœ… No issues found in this scan.")
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_appguardrail.py
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ def test_print_scan_results_high(capsys):

assert "[🟠 HIGH] app/api/route.ts:5" in captured.out
assert "🟠 1 high issue" in captured.out
assert "⚠️ High-severity issue found. Review before deploying." in captured.out
assert "⚠️ Warning: High-severity issue found. Review before deploying." in captured.out


def test_print_scan_results_warnings_only(capsys):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_coverage_edge_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def __init__(self, path):

out = capsys.readouterr().out
assert "indexed" in out
assert "No files were scanned" in out
assert "Warning: No files were scanned" in out


def test_trivy_severity():
Expand Down