
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
github.com/rhamdeew/sitemap-checker
A high-performance Go tool to validate all URLs in a website's sitemap.xml, with comprehensive error detection and redirect validation.
# Clone the repository
git clone https://github.com/yourusername/sitemap_checker.git
cd sitemap_checker
# Build the binary
go build -o sitemap_checker
# Optional: Install system-wide
go install
# Basic usage
./sitemap_checker -u https://example.com/sitemap.xml
# With custom timeout between requests (default: 1000ms)
./sitemap_checker -u https://example.com/sitemap.xml -t 500
# Specify a custom directory for log files
./sitemap_checker -u https://example.com/sitemap.xml -logdir ./logs
# Run with 10 parallel requests
./sitemap_checker -u https://example.com/sitemap.xml -c 10
# Skip SSL certificate validation
./sitemap_checker -u https://example.com/sitemap.xml -k
# Combine options
./sitemap_checker -u https://example.com/sitemap.xml -t 200 -c 5 -logdir ./logs -k
Flag | Description | Default |
---|---|---|
-u | URL of the sitemap.xml file (required) | None (Required) |
-t | Timeout in milliseconds between check requests | 1000 (1 second) |
-logdir | Directory to store log files | Current directory |
-c | Number of parallel requests to execute | 1 (Sequential) |
-k | Skip SSL certificate validation | false |
Log files are automatically created with a naming format of:
hostname-YYYY-MM-DD-HH-MM-SS.log
Example: example-com-2025-03-14-14-30-45.log
Each log file contains:
This tool specifically detects and flags redirects (status codes 3xx) without following them. For each redirect, it:
Location
headerRetrieving URLs from sitemap...
Found sitemap index with 3 sitemaps
Processing referenced sitemap: https://example.com/post-sitemap.xml
Processing referenced sitemap: https://example.com/page-sitemap.xml
Processing referenced sitemap: https://example.com/category-sitemap.xml
Found 845 URLs to check
Checking URLs...
[==================================================>] 845/845 (100%)
REDIRECT: https://example.com/old-page/ -> https://example.com/new-page/ (Status: 301)
INVALID STATUS: https://example.com/missing-page/ - 404
ERROR: https://example.com/timeout-page/ - Get "https://example.com/timeout-page/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
Summary: Found 37 problematic URLs out of 845 total URLs
Redirects: 12 URLs
-c
flag) to check multiple URLs in parallel-t
flag) based on the server's capacity-c 5 -t 500
-c 10 -t 1000
-c 20 -t 2000
MIT License
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.