Skip to content

Conversation

onmax
Copy link
Member

@onmax onmax commented Aug 22, 2025

This module implements a build-time link validation system that checks all external links against a whitelist.

What it does:

  • Scans HTML and JS files for external links during build
  • Validates links against a comprehensive whitelist of trusted domains
    • The checks are quite aggressive. For example, only allow x.com/nimiq, not any x.com account.
  • Blocks the build process on invalid links and provides detailed error reporting.
  • Warns about pages with HTTP (not HTTPS)
  • Provides usage statistics and detects unused patterns.
  • Keeps the whitelist clean by identifying unused regular expression (regex) patterns.

Why it's needed:

  • Prevents malicious or broken external links from reaching production.
  • Ensures that all external links point to trusted, verified sources.
  • Maintains security and user trust on the website

Technical details:

  • Runs only in production builds
  • Uses regular expressions for flexible domain matching
  • Tracks pattern usage to identify unused entries.
  • Integrates with the Nuxt build process via Nitro hooks.

…duction builds with a configurable whitelist
Copy link
Contributor

nuxthub-admin bot commented Aug 22, 2025

❌ Deployment failed nimiq-website

Failed to deploy nimiq-website 178225e to preview

📋 View deployment logs

@onmax
Copy link
Member Author

onmax commented Aug 22, 2025

Thanks for the review. I solve the issues and created new issues

@onmax onmax merged commit 2dcbb9a into main Aug 26, 2025
1 of 2 checks passed
@onmax onmax deleted the link-validation branch August 26, 2025 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants