Skip to content

fix: Suppress bare .svc hostnames and pin lychee version#25

Merged
rubambiza merged 2 commits into
rossoctl:mainfrom
rubambiza:fix/link-health-false-positives
Jul 15, 2026
Merged

fix: Suppress bare .svc hostnames and pin lychee version#25
rubambiza merged 2 commits into
rossoctl:mainfrom
rubambiza:fix/link-health-false-positives

Conversation

@rubambiza

Copy link
Copy Markdown
Contributor

Summary

Fixes two false-positive classes in the link-health scanner reported by @esnible
(rossoctl/cortex#532, #533).

  1. Bare .svc suppression gap. Cluster-local Kubernetes URLs such as
    http://keycloak-service.keycloak.svc:8080/realms/ were flagged as broken. They
    matched none of the existing suppression clauses (no .svc.cluster.local suffix,
    non-numeric so not RFC1918, resolve to nothing so --exclude-all-private misses
    them). Added a bare-.svc clause before the cluster-local one.

  2. lychee version pin (defensive). Verified lychee 0.23.0 already excludes
    URLs inside code blocks by default (--include-verbatim opts them back in). Pinned
    a minimum version and documented the dependency so this cannot regress.

Changes

  • Added the bare-.svc suppression clause in
    skills/link-health-scanner/scripts/link-health-scanner.sh.
  • Pinned lychee >= 0.23.0 in skills/link-health-scanner/SKILL.md with a note on the
    code-block-exclusion dependency.

Testing

  • shellcheck clean; bash -n passes.
  • Manual jq verification of the suppression clauses: bare .svc, .svc.cluster.local,
    .local, and RFC1918 all suppressed; a genuine dead external link still passes
    through.

Note: the equivalent extraction + unit test lives in rossoctl/automation#25; this repo
has no test harness, so the one-clause fix is applied inline here (scope-proportionate).

Fixes #23
Fixes #24

Assisted-By: Claude Code

Cluster-local Kubernetes service URLs such as
http://keycloak-service.keycloak.svc:8080/realms/ were reported as
broken links. They matched none of the existing suppression clauses:
no .svc.cluster.local suffix, non-numeric so not RFC1918, and they
resolve to nothing so lychee --exclude-all-private does not catch them.

Add a bare-.svc suppression clause before the cluster-local one.

Assisted-By: Claude Code (Anthropic AI) <noreply@anthropic.com>

Signed-off-by: Gloire Rubambiza <gloire@ibm.com>
The scanner depends on lychee's default exclusion of URLs inside code
blocks. Pin a known-good minimum version and document the dependency
so a version change cannot silently reintroduce code-block false
positives.

Assisted-By: Claude Code (Anthropic AI) <noreply@anthropic.com>

Signed-off-by: Gloire Rubambiza <gloire@ibm.com>
@rubambiza rubambiza self-assigned this Jul 14, 2026
@rubambiza rubambiza added the ready-for-ai-review Request automated AI code review from clawgenti label Jul 14, 2026

@clawgenti clawgenti left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minimal, targeted fix — adds the bare .svc suppression clause and pins lychee >= 0.23.0 in SKILL.md, consistent with the companion change in rossoctl/automation#25. All checks pass. Ready for human review.


Reviewed by clawgenti using github:pr-review

@rubambiza rubambiza added ready-for-human-review AI review passed, ready for human reviewer and removed ready-for-ai-review Request automated AI code review from clawgenti labels Jul 15, 2026
@rubambiza

Copy link
Copy Markdown
Contributor Author

Note: the TMPDIR shadowing nit raised on rossoctl/automation#25 does not apply here — this PR is an inline one-clause fix with no test harness, so there is no test-local TMPDIR variable to rename.

@rubambiza
rubambiza merged commit 01277c0 into rossoctl:main Jul 15, 2026
3 checks passed
@rubambiza
rubambiza deleted the fix/link-health-false-positives branch July 15, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human-review AI review passed, ready for human reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pin minimum lychee version to keep code-block URLs excluded Scanner does not suppress bare .svc (cluster-local) hostnames

3 participants