Skip to content

feat(audit): implement human-readable color-coded console reporter (closes #77) - #163

Open
MehulSehgal wants to merge 16 commits into
sidd190:mainfrom
MehulSehgal:feat/audit-human-reporter
Open

MehulSehgal wants to merge 16 commits into
sidd190:mainfrom
MehulSehgal:feat/audit-human-reporter

Conversation

@MehulSehgal

Copy link
Copy Markdown

Summary

Closes #77

Implements the human-readable, color-coded console reporter for auth.audit(). It transforms findings into a structured, badge-highlighted console report with remediation advice.

Key Changes

  1. formatHumanReport (backend/audit/reporters/human.js):

    • Formats audit findings with clear status banners (PASSED / FAILED), counts breakdown, and numbered finding entries.
    • ANSI color highlighting ([ERROR] in red, [WARN] in yellow, [INFO] in blue).
    • Graceful fallback when terminal does not support colors or when NO_COLOR is present.
    • Includes specific remediation guidance for each flagged issue.
  2. Integration into audit() Runner:

    • Added support for audit(app, { format: 'human' }).
    • Comprehensive unit test coverage (__tests__/auditHumanReporter.test.js).
    • Documentation update in README.md.

Verification

  • npm test: 8 test suites passed, 57 tests passed.
  • npm run lint: Clean (0 errors, 0 warnings).

@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 8 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0c856130-cb8d-4a68-a870-e07900dbb762
Commits

Reviewing files that changed from the base of the PR and between 805e9f4 and 8bc1a0e.

Files selected for processing: 13

  • CONTRIBUTING.md
  • README.md
  • SECURITY.md
  • __tests__/auditCorsOrigin.test.js
  • __tests__/auditHumanReporter.test.js
  • __tests__/auditJwtSecrets.test.js
  • backend/audit/checks/corsOrigin.js
  • backend/audit/checks/jwtSecrets.js
  • backend/audit/index.js
  • backend/audit/reporters/human.js
  • backend/index.js
  • index.js
  • package.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

auth.audit() human-readable reporter

1 participant