test: expand migration assessor coverage + SonarCloud config#134
Conversation
Migration assessor tests: 40 → 81 tests (+41 new) - collectSecurityFindings: eval(), XSS (innerHTML/dangerouslySetInnerHTML), SQL injection, unrestricted CORS, AWS access key, exec() injection, private key, no .gitignore + .env present, missing SECURITY.md - collectQualityFindings: missing linter/type-checker/formatter/CI, high empty-catch count (>5 → high), TODO flooding, low test ratio (<10%) - collectArchitectureFindings: god file (>1000 lines → critical), high coupling (>15 imports), function sprawl (>20), flat structure, high avg size - collectReadinessFindings: TS-less JS projects, missing docs, global state pollution (window./global. assignments), missing CI, missing test framework - collectDependencyFindings: no package.json, excessive deps (50-100 medium, >100 high), no engine constraint, no devDependencies, yarn.lock/pnpm-lock acceptance, multiple legacy packages SonarCloud: add sonar-project.properties to resolve advisory CI failure - Configure project key, org, sources, tests, exclusions, lcov path
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
Project Scorecard |
|


Summary
Two improvements in one PR:
Migration Assessor Tests: 40 → 81 (+41 new tests)
collectSecurityFindings
eval()usage detection (high)dangerouslySetInnerHTMLXSS risk (high)innerHTMLassignment XSS risk (high)cors()(medium)AKIA...(critical)child_process.exec()command injection (high).envpresent but no.gitignore(critical)SECURITY.md(low)collectQualityFindings
collectArchitectureFindings
collectReadinessFindings
docs/directory satisfies doc checkwindow./global.(high)collectDependencyFindings
package.jsonreturns 100 (graceful)devDependencies(medium)yarn.lockaccepted as valid lockfilepnpm-lock.yamlaccepted as valid lockfileSonarCloud
Add
sonar-project.properties:Metrics