Skip to content
Closed
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
1 change: 1 addition & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
## 2026-06-30 - Added Emojis to CLI Output Messages
**Learning:** Adding subtle emojis to informative CLI output headers (like "Created/updated files" and "Next steps") provides clearer visual cues for developers scanning long CLI output.
**Action:** Always include relevant emojis in summary output text to make success and informational messages more visually distinguishable from routine command logs.
## 2026-07-05 - AppGuardrail CLI Emoji Formatting\n**Learning:** CLI output is significantly more scannable and accessible when Errors, Warnings, and file lists consistently use semantic prefixing combined with emojis (e.g. '❌ Error', '⚠️ Warning'). Adding 'πŸ’‘ Hint:' lines to errors reduces user friction.\n**Action:** Ensure all future CLI text changes or additions follow these exact structural and visual guidelines.
25 changes: 13 additions & 12 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 @@ -1652,11 +1652,11 @@ def cmd_org_bundle(args):

summary = manifest["summary"]
print(f"\nβœ… Buyer evidence bundle written: {bundle_dir}\n")
print("Files:")
print(" - org-readiness.md")
print(" - buyer-evidence.json")
print(" - manifest.json")
print(" - README.md")
print("πŸ“„ Files:")
print("πŸ“„ - org-readiness.md")
print("πŸ“„ - buyer-evidence.json")
print("πŸ“„ - manifest.json")
print("πŸ“„ - README.md")
print()
print(f"Open PRs analyzed: {summary['open_pull_requests']}")
print(f"Buyer evidence status: {summary['buyer_evidence_status']}")
Expand Down Expand Up @@ -2634,13 +2634,14 @@ 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.")
print(f"\n❌ Error: Critical {issue_word} found. Fix before deploying.")
print("πŸ’‘ Hint: Review the critical issues and apply fixes 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
4 changes: 2 additions & 2 deletions tests/test_appguardrail.py
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ def test_print_scan_results_critical(capsys):
assert "Found a critical issue" in captured.out
assert "Code: const secret = 'abc';" in captured.out
assert "πŸ”΄ 1 critical issue" in captured.out
assert "❌ Critical issue found. Fix before deploying." in captured.out
assert "❌ Error: Critical issue found. Fix before deploying." in captured.out
assert (
"πŸ’‘ Run 'appguardrail review' to get an AI prompt for fixing this issue."
in captured.out
Expand All @@ -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
Loading