From 167da5c11bd0e3fd75e025b6ebad15cef601acb3 Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Sat, 4 Jul 2026 05:08:04 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20CLI=20=EA=B2=BD?= =?UTF-8?q?=EA=B3=A0=20=EB=A9=94=EC=8B=9C=EC=A7=80=20=EC=A0=91=EA=B7=BC?= =?UTF-8?q?=EC=84=B1=20=EA=B0=9C=EC=84=A0=20(=ED=85=8D=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 경고 메시지에 `⚠️ ` 이모지와 함께 `Warning: ` 텍스트를 명시적으로 추가했습니다. - 스크린 리더와 같은 접근성 도구를 사용하는 사용자가 경고 메시지를 더 잘 인식할 수 있도록 개선했습니다. - 테스트 스크립트에서도 변경된 경고 메시지에 맞춰 assert 문을 업데이트했습니다. --- scanner/cli/appguardrail.py | 12 ++++++------ tests/test_appguardrail.py | 2 +- tests/test_coverage_edge_cases.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scanner/cli/appguardrail.py b/scanner/cli/appguardrail.py index 9314ee4..866a3bc 100644 --- a/scanner/cli/appguardrail.py +++ b/scanner/cli/appguardrail.py @@ -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( @@ -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( @@ -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( @@ -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( @@ -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: diff --git a/tests/test_appguardrail.py b/tests/test_appguardrail.py index 3d1a633..4500d67 100644 --- a/tests/test_appguardrail.py +++ b/tests/test_appguardrail.py @@ -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): diff --git a/tests/test_coverage_edge_cases.py b/tests/test_coverage_edge_cases.py index 9aa7cb2..1e0530f 100644 --- a/tests/test_coverage_edge_cases.py +++ b/tests/test_coverage_edge_cases.py @@ -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():