fix: Use GitHub URL instead of local one#297
Conversation
When the assessment is generated, it adds the URL configured in the user's local copy of the repo, which can be an SSH URL. This then gets rendered as is in the leaderboard, causing broken URLs. Since submissions can only be created for GitHub URLs, add an explicit URL using https in the generated leaderboard. Signed-off-by: Martin Prpič <mprpic@redhat.com>
📈 Test Coverage Report
Coverage calculated from unit tests only |
🤖 AgentReady Code ReviewPR Status: 2 issues found (0 🔴 Critical, 1 🟡 Major, 1 🔵 Minor) ✅ Summary: APPROVED with RecommendationsThis PR successfully fixes a real production issue (broken SSH URLs in the leaderboard) with a clean, minimal change. The fix actually improves security by using validated data instead of user-provided URLs. However, the review identified pre-existing validation gaps that should be addressed in a follow-up PR. 🟡 Major Issues (Pre-existing, not introduced by this PR)1. URL Construction Lacks Input ValidationAttribute: Security Best Practices (Tier 2) Issue Details: Potential failure scenarios:
Note: The AgentReady codebase has comprehensive security utilities in src/agentready/utils/security.py (including validate_url(), validate_path(), sanitize_for_html()) that could be leveraged here. Remediation: Add validation before URL construction (follow-up PR recommended) 🔵 Minor Issues2. Script Lacks Unit TestsAttribute: Test Coverage (Tier 2) Issue Details: PR Author's Note: The author acknowledged this in the PR description: "Tests seem to currently be broken, I can submit a fix for that as a secondary PR" This is acceptable because:
✅ What This PR Does Well
📊 Detailed AnalysisHistorical Context:
Code Change: Why This Is Safe:
Summary
Recommendation: ✅ Approve and merge. Consider adding validation and tests in follow-up PR as mentioned by the author. 🤖 Generated with Claude Code If this review was useful, react with 👍. Otherwise, react with 👎. |
|
🎉 This PR is included in version 2.28.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
When the assessment is generated, it adds the URL configured in the user's local copy of the repo, which can be an SSH URL. This then gets rendered as is in the leaderboard, causing broken URLs.
Since submissions can only be created for GitHub URLs, add an explicit URL using https in the generated leaderboard.
Description
When the assessment is generated, it adds the URL configured in the user's local copy of the repo, which can be an SSH URL. This then gets rendered as is in the leaderboard, causing broken URLs.
Since submissions can only be created for GitHub URLs, add an explicit URL using https in the generated leaderboard.
This fixes the currently broken links in the top 10 view at https://ambient-code.github.io/agentready/.
Type of Change
Changes Made
Testing
Ran the leaderboard generation script and it correctly fixed the URLs: