Refs #576: Harden static GitHub links#590
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 (3)
📝 WalkthroughWalkthroughTemplates now add rel="nofollow noopener" to external GitHub anchor tags in the base and docs templates. Tests were added to assert those attributes appear in the rendered HTML for the home (under ltclab.site) and /docs routes. ChangesExternal GitHub link security attributes
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a08b9cae-bd25-4a94-8738-a9b04d8e6913
📒 Files selected for processing (3)
app/templates/base.htmlapp/templates/docs.htmltests/test_public_routes.py
GHX5T-SOL
left a comment
There was a problem hiding this comment.
Reviewed current head f1b0205 and approve.
Evidence: inspected app/templates/base.html, app/templates/docs.html, and tests/test_public_routes.py. The change adds rel="nofollow noopener" to static GitHub links on the LTC Lab header and docs page without changing internal navigation, and the new tests cover the docs links plus the LTC Lab header link.
Validation: /tmp/mergework-pr590-review-venv/bin/python -m pytest tests/test_public_routes.py -q -> 3 passed; ruff check tests/test_public_routes.py -> pass; ruff format --check tests/test_public_routes.py -> already formatted; mypy app/main.py app/public_routes.py -> success; scripts/docs_smoke.py -> docs smoke ok; git diff --check upstream/main...HEAD -> clean; git merge-tree --write-tree upstream/main HEAD -> clean; gitleaks git over the PR commit -> no leaks. Hosted Quality/readiness/docs/image check is successful. I did not run the full suite because this is a narrow template/public-route change.
|
Follow-up for CodeRabbit's coverage warning: pushed
Validation after the follow-up:
|
|
Actionable comments posted: 0 |
|
Bounty-focus clarification after the latest automated summary: the current GitHub PR diff is limited to the intended three files for Bounty #576. Verified against the current upstream base after fetching No CSS styling, admin docs, claim-inventory script, or unrelated test files are present in the current PR diff. The follow-up commit only broadened |
eliasx45
left a comment
There was a problem hiding this comment.
Reviewed current head dfaf527643814c38cbe3158c2dcfb9fb7c05390e.
Verdict: approve.
The current PR diff is limited to the intended three files: app/templates/base.html, app/templates/docs.html, and tests/test_public_routes.py. The earlier automated scope warning about unrelated files is not present against the current base after fetching origin/main. The change consistently adds rel="nofollow noopener" to the static GitHub links in the LTC Lab header and docs page, and the follow-up assertions cover all six static docs GitHub links plus the header link. This remains scoped to public-link hygiene under Bounty #576.
Validation:
git diff --name-only origin/main...HEAD-> only the three intended files.PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe -m pytest tests\test_public_routes.py -q->3 passed.PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe -m pytest tests\test_public_routes.py tests\test_hub.py -q->7 passed..\.venv\Scripts\python.exe -m ruff check tests\test_public_routes.py-> passed..\.venv\Scripts\python.exe -m ruff format --check tests\test_public_routes.py-> already formatted.PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 .\.venv\Scripts\python.exe scripts\docs_smoke.py-> docs smoke ok.git diff --check origin/main...HEAD-> clean.git merge-tree --write-tree origin/main HEAD-> clean merge tree.- Hosted quality/readiness/docs/image check is successful.
dfaf527 to
081573f
Compare
|
Rebased this PR onto current Current diff scope after the rebase is still the intended three files: Rebased head: Validation after the rebase:
If the automated bounty-focus warning still mentions CSS/admin/claim-inventory files, that is stale relative to the current PR diff above. No unrelated files are present in the live diff. |
|
Actionable comments posted: 0 |
eliasx45
left a comment
There was a problem hiding this comment.
Re-reviewed rebased head 081573f.
Verdict: approve.
The rebase resolved the prior dirty/conflicting state and preserved the intended scope. The live diff is still limited to app/templates/base.html, app/templates/docs.html, and tests/test_public_routes.py. The public-link hygiene behavior from my earlier review remains intact: static GitHub links in the header/docs templates include rel="nofollow noopener", and the tests cover the header plus all six docs GitHub links.
Validation on the rebased head:
- git diff --name-only origin/main...HEAD -> only the three intended files
- git merge-tree --write-tree origin/main HEAD -> clean merge tree
- git diff --check origin/main...HEAD -> clean
- PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ..venv\Scripts\python.exe -m pytest tests\test_public_routes.py tests\test_hub.py -q -> 8 passed
- ..venv\Scripts\python.exe -m ruff check tests\test_public_routes.py -> passed
- ..venv\Scripts\python.exe -m ruff format --check tests\test_public_routes.py -> 1 file already formatted
- PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 ..venv\Scripts\python.exe scripts\docs_smoke.py -> docs smoke ok
- Hosted quality/readiness/docs/image check is successful
Summary
Refs #576.
This adds the existing public-link hygiene treatment (
rel="nofollow noopener") to static GitHub links that are rendered from the public shell/docs templates.Evidence / Distinctness
Current public templates already apply
rel="nofollow noopener"on several dynamic GitHub issue links, for example bounty detail/list links. A fresh check found static GitHub links in these surfaces did not have the same treatment:app/templates/base.html/docsGitHub discussion and repository-document links inapp/templates/docs.htmlThis is intentionally distinct from the current account/activity link PR #586: this PR does not touch dynamic account/activity links or the failing account-page assertions in that branch. It only covers static public navigation/docs links that remain unmodified on
main.Scope
rel="nofollow noopener"to the static GitHub nav link shown in the LTC Lab header.rel="nofollow noopener"to static GitHub documentation/discussion links on/docs./docsand the LTC Lab host header path.Validation
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest tests/test_public_routes.py -q-> 3 passedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest tests/test_public_routes.py tests/test_hub.py -q-> 7 passedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m pytest -q-> 450 passeduv run --extra dev python -m ruff check tests/test_public_routes.py-> passeduv run --extra dev python -m ruff format --check tests/test_public_routes.py-> passedPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python scripts/docs_smoke.py-> docs smoke okPYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --extra dev python -m mypy app/public_routes.py app/main.py-> successgit diff --check-> cleanSafety
No private keys, wallet material, cookies, tokens, OAuth state, signatures, private vulnerability details, deployment credentials, MRWK price claims, exchange claims, bridge claims, liquidity claims, off-ramp claims, or fabricated payout claims are included.
Summary by CodeRabbit
Updates
Tests