Add rel attributes to public GitHub links#586
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR adds ChangesLink security attributes
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
Actionable comments posted: 0 |
Zejia
left a comment
There was a problem hiding this comment.
Reviewed current head 3beecaf19649d686e32e21edb542de132ebdb223.
The rel-attribute change itself is narrow, but this PR currently breaks the full test suite. Two existing account-page assertions in tests/test_api_mcp.py still expect the GitHub profile link without the new rel="nofollow noopener" attribute.
Reproduced locally:
pytest tests/test_api_mcp.py::test_explorer_links_ledger_proof_and_account tests/test_api_mcp.py::test_github_account_views_normalize_mixed_case_logins -q-> 2 failed
The failure matches GitHub CI. The focused account/activity tests pass (tests/test_activity.py tests/test_account_routes.py -> 7 passed), so the likely fix is to update the existing tests/test_api_mcp.py assertions to include the rel attribute, or make them less brittle while still checking the GitHub profile link and rel behavior.
|
Holding with |
eliasx45
left a comment
There was a problem hiding this comment.
Reviewed current head 3beecaf19649d686e32e21edb542de132ebdb223.
Verdict: request changes.
The template change itself is directionally fine: it adds rel="nofollow noopener" to public GitHub profile/submission/issue links on the account and activity pages, and the newly touched focused tests pass. However, the broader existing account/MCP tests were not updated and the hosted quality check is failing for the same reason locally. As submitted, the PR cannot be merged with the test suite red.
Evidence:
- Current diff is scoped to
app/templates/account.html,app/templates/activity.html,tests/test_account_routes.py, andtests/test_activity.py. PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe -m pytest tests\test_account_routes.py tests\test_activity.py -q->7 passed..\.venv\Scripts\python.exe -m ruff check tests\test_account_routes.py tests\test_activity.py-> passed..\.venv\Scripts\python.exe -m ruff format --check tests\test_account_routes.py tests\test_activity.py-> already formatted.git diff --check origin/main...HEAD-> clean.git merge-tree --write-tree origin/main HEAD-> clean merge tree.- Hosted
Quality, readiness, docs, and image checksis failing. - Reproduced the hosted failures locally:
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe -m pytest tests\test_api_mcp.py::test_explorer_links_ledger_proof_and_account tests\test_api_mcp.py::test_github_account_views_normalize_mixed_case_logins -q->2 failed.
Blocking issue:
tests/test_api_mcp.pystill expects the account page GitHub profile anchor without the newrelattribute:href="https://github.com/alice">@alice</a>. After this PR the rendered anchor includesrel="nofollow noopener", so both broader account-page regressions fail.
Required fix: update the existing tests/test_api_mcp.py assertions for the new safe-link markup (or use a parser-based assertion) and rerun the broader quality suite so the hosted check is green.
Summary
rel="nofollow noopener"to public account/activity GitHub linksRefs #576
Checks
python -m pytest tests/test_activity.py tests/test_account_routes.pypython -m ruff format --check app testspython -m ruff check app testspython -m mypy appSummary by CodeRabbit
Release Notes
Bug Fixes
Tests