Skip to content
Piuskay-huePublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 

Repository files navigation

πŸ”— LinkGuard β€” Open-Source URL Security Analysis

Detect suspicious links. Understand the risks. Browse more safely.

LinkGuard combines URL heuristics, domain intelligence and threat-intel integrations into transparent, explainable risk reports β€” before you click.

License: MIT Node.js β‰₯ 22 TypeScript strict PRs welcome Status

🌐 Live preview (landing page + interactive demo): https://<piuskay-hue>.github.io/linkguard/ deployed from this repo via GitHub Pages.


⚠️ The problem

Every day, millions of links are designed to deceive. Suspicious URLs arrive through email, messaging apps, social networks, ads and websites β€” and most people have no reliable way to tell them apart from legitimate ones.

Threat Why it matters
🏠 Malicious links are everywhere Phishing and malware distribution rely on one simple trick: a URL that looks trustworthy. They spread through inboxes, chats, social feeds and sponsored results.
🎭 Impersonation is easy Homograph domains, raw IP hosts, deep subdomains and punycode can make a hostile address look exactly like a service you trust β€” or hide it completely.
🧩 Existing tools fall short Many checkers give a bare verdict with no evidence, require paid access, or offer no developer-friendly integration. LinkGuard is built to be transparent, extensible and open.

✨ What LinkGuard will do

A modular platform in active early development β€” each capability below is specified in the project documentation and on the public roadmap.

πŸ” URL analysis scanner

  • Parsing & normalization that preserve the intended destination
  • Suspicious pattern & IP-based URL detection
  • Misleading subdomain identification
  • Punycode / internationalized domain analysis
  • Suspicious URL-encoding detection

πŸ›‘οΈ Threat intelligence threat-intel

  • Google Safe Browsing integration
  • Optional VirusTotal integration
  • Domain reputation checks
  • Known malicious URL identification
  • Provider response caching

πŸ“Š Explainable assessment scanner

  • Risk scoring with visible evidence, not a black box
  • Phishing indicator analysis
  • Controlled redirect inspection
  • Domain & certificate info where available
  • Detailed, structured security reports

πŸ–₯️ User platform apps/web

  • Responsive web dashboard
  • Fast URL scanning interface
  • Authenticated scan history
  • Shareable reports
  • Visual risk breakdowns

βš™οΈ Developer platform apps/api

  • Documented REST API with OpenAPI schemas
  • Consistent JSON errors & request IDs
  • Docker deployment
  • Automated testing & CI/CD
  • Built for extension & contribution

πŸ‘οΈ Transparency first philosophy

  • Findings separated from confirmed intel matches
  • Confidence reported alongside evidence
  • Missing intel never treated as proof of safety
  • Honest status communication

πŸ§ͺ Live preview

The landing page (index.html, served at the repo Pages URL) includes an interactive demo that runs a simplified set of the planned heuristics β€” entirely in your browser. Nothing is submitted anywhere; the production engine adds threat-intel lookups on top.

Example of what the preview reports:

URL: http://paypal.com.secure-login.verify-account.tk/signin
CRITICAL  Punycode (IDN) hostname          β€” labels that can visually imitate ASCII domains
HIGH      Sensitive keyword "paypal"       β€” frequently abused for credential-harvesting
MODERATE  Deep subdomain chain (6 levels)  β€” pushes the real destination out of view
MODERATE  High-abuse TLD ".tk"             β€” heavily abused in phishing campaigns
HIGH      Credentials embedded in URL      β€” the part before "@" is decoration

Risk score: 62/100 β†’ HIGH RISK

βš™οΈ How it works

From submission to explainable verdict β€” every scan follows the same disciplined pipeline, specified in ARCHITECTURE.md, with strict validation and network isolation at each stage.

Stage Step Description
01 Submit A URL arrives through the web dashboard or the REST API.
02 Validate Strict scheme allowlist and input validation reject malformed requests.
03 Parse & normalize The scanner normalizes safely while preserving the original evidence.
04 Local heuristics Detection rules inspect structure, hosts, encoding and punycode.
05 Domain intel DNS and domain information is collected where supported.
06 Threat intel Configured providers are queried; failures never crash the scan.
07 Score & explain Findings are weighted into a transparent risk assessment.
08 Report A structured report is stored under retention policy and returned.

🎯 Risk model

Scoring that shows its work β€” weighted, deduplicated, and always traceable back to the evidence behind it.

Score Risk level
0 – 24 🟒 Low
25 – 49 🟑 Moderate
50 – 74 🟠 High
75 – 100 πŸ”΄ Critical

Anatomy of a finding β€” every score is the sum of individually documented findings, each carrying its full context:

  • Detection ID β€” stable identifier for rules & docs
  • Description β€” what was detected, in plain language
  • Severity & weight β€” contribution to the total score
  • Evidence β€” the exact part of the URL that triggered it

πŸ—οΈ Architecture

linkguard/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ web/              # React dashboard
β”‚   └── api/              # Fastify REST API
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ scanner/          # analysis engine
β”‚   β”œβ”€β”€ threat-intel/     # providers
β”‚   β”œβ”€β”€ shared/           # types & schemas
β”‚   └── config/           # shared configs
β”œβ”€β”€ docs/                 # 9 technical documents
β”œβ”€β”€ tests/                # three test suites
└── .github/              # templates & workflows

Infrastructure: PostgreSQL 17 Β· Redis 7 Β· BullMQ Β· Prisma Β· Docker Compose Β· GitHub Actions Β· pnpm + Turborepo


πŸ” Security by design

A URL scanner is a high-risk surface β€” treated like one. Fetching untrusted destinations is dangerous by definition, so LinkGuard's threat model (SECURITY_DESIGN.md) demands verifiable controls before any remote fetching is enabled.

Control What it does
SSRF prevention Strict protocol allowlisting and resolution validation on every request.
DNS rebinding defense All resolved addresses re-checked at connection time, not just first lookup.
Private IP blocking Loopback, link-local, private and reserved ranges are always denied.
Redirect revalidation Every hop is re-resolved and independently re-checked, with hard limits.
No script execution Submitted websites are never rendered or executed by the scanner.
Rate limiting Public endpoints are protected from abuse with configurable quotas.
Credential redaction Sensitive query parameters are excluded from persistent storage by default.
Hard limits Timeouts, response-size caps and isolated workers for all fetch jobs.

βœ… Verified before launch: security testing must cover SSRF, DNS rebinding, redirect chains, private-IP access, malformed input and resource exhaustion β€” controls are verified before arbitrary remote URL fetching is enabled.


🧰 Tech stack

Layer Tools
Frontend React Β· Vite Β· TypeScript Β· Tailwind CSS
Backend Node.js 22 Β· Fastify Β· Zod
Data PostgreSQL Β· Prisma Β· Redis Β· BullMQ
Quality Vitest Β· OpenAPI Β· Turborepo Β· pnpm
Ops Docker Β· Compose Β· GitHub Actions

Chosen for type safety, performance and a contributor-friendly developer experience.


πŸ”Œ Developer-first REST API

Submit scans, poll results and integrate LinkGuard into your own tooling β€” with schema-based validation, consistent errors and request IDs throughout.

Method Endpoint Description
POST /api/v1/scans Submit a URL for analysis
GET /api/v1/scans/:id Retrieve a scan report
GET /api/v1/scans Authenticated scan history
GET /api/v1/providers Provider availability
GET /api/v1/health Service health check
POST /api/v1/scans HTTP/1.1
Content-Type: application/json

{ "url": "https://example.com/login" }
{
  "id": "scan_8f14e45f",
  "status": "queued",
  "riskScore": null,
  "report": null,
  "links": { "self": "/api/v1/scans/scan_8f14e45f" }
}

πŸ—ΊοΈ Roadmap

From foundation to first stable release β€” tracked publicly in ROADMAP.md. Items are only marked complete after implementation and verification.

  • 01 β€” Foundation (in progress): repository structure Β· product specification Β· documentation foundation
  • 02 β€” Scanner engine: parsing & normalization Β· hostname/IP/punycode analysis Β· suspicious pattern rules Β· initial scoring + tests
  • 03 β€” Backend API: Fastify application Β· validation & orchestration Β· rate limiting Β· OpenAPI documentation
  • 04 β€” Persistence & jobs: PostgreSQL + Prisma Β· scan persistence Β· Redis + BullMQ workers Β· retention policies
  • 05 β€” Threat intelligence: provider interface Β· Google Safe Browsing Β· VirusTotal Β· caching & failure handling
  • 06 β€” Frontend: React application Β· scanner interface Β· results dashboard Β· scan history
  • 07 β€” Security hardening: SSRF & DNS rebinding controls Β· redirect validation Β· network isolation Β· security testing
  • 08 β€” Release: Docker deployment Β· CI/CD pipelines Β· integration testing Β· first public release

🀝 Contributing

Help make URL security transparent β€” LinkGuard is MIT-licensed and built for contributors. Bug reports Β· documentation Β· detection rules Β· code β€” every contribution counts. See CONTRIBUTING.md to get started, and ⭐ star the repository to follow development.


πŸ“„ License

MIT Β© LinkGuard Contributors β€” "Built with transparency, not fear."


Disclaimer: LinkGuard provides security assessments based on available indicators and threat-intelligence sources. A low-risk result does not guarantee that a URL is safe β€” coverage varies and new malicious sites may not yet be identified. Always exercise caution with unfamiliar links. This repository describes a project in early development; capabilities marked "planned" are not yet implemented.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors