Skip to main content

High-performance URL reputation and phishing detection for MCP Gateway

Project description

URL Reputation (Rust)

High-performance URL reputation and phishing detection for ContextForge and MCP Gateway.

Features

  • Domain allowlists and blocklists
  • Regex allow and block patterns for path-level control
  • Optional heuristic phishing checks for suspicious domains
  • Entropy-based screening for machine-generated or deceptive hostnames
  • Optional blocking of non-secure http:// URLs
  • Resource pre-fetch enforcement with fail-safe blocking on internal validation errors

Build

make install

Usage

The plugin validates URLs during resource_pre_fetch.

Typical uses:

  • block known bad domains before fetch
  • permit trusted domains even when broader rules would block them
  • catch suspicious lookalike or high-entropy hostnames
  • reject non-TLS HTTP fetches by default

Configuration

  • whitelist_domains: trusted domains and parent domains that should always pass
  • blocked_domains: domains that should always fail
  • allowed_patterns: regexes that bypass broader blocking rules
  • blocked_patterns: regexes that force rejection
  • use_heuristic_check: enable phishing-style hostname heuristics
  • entropy_threshold: threshold for heuristic blocking of random-looking hostnames
  • block_non_secure_http: reject plain HTTP URLs

Validation Notes

  • Domain matching is normalized to lowercase.
  • Whitelist entries win over blocked-domain rules.
  • Invalid regex patterns fail fast during configuration.
  • Invalid URLs are blocked.
  • If the Rust core throws unexpectedly, the plugin blocks the URL rather than allowing it through silently.

Returned Violations

Blocked URLs use URL_REPUTATION_BLOCK and include basic context such as the URL being rejected.

Testing

make ci

Security Notes

  • Heuristic checks are intentionally conservative and should complement explicit allow/block rules rather than replace them.
  • IDN and lookalike-domain scenarios are best handled with a whitelist for critical providers plus heuristic checks for the long tail.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpex_url_reputation-0.1.1.tar.gz (38.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

cpex_url_reputation-0.1.1-cp311-abi3-win_amd64.whl (95.3 kB view details)

Uploaded CPython 3.11+Windows x86-64

cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl (190.0 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.34+ x86-64

cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_s390x.whl (219.0 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.34+ s390x

cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_ppc64le.whl (212.2 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.34+ ppc64le

cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl (183.4 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.34+ ARM64

cpex_url_reputation-0.1.1-cp311-abi3-macosx_11_0_arm64.whl (170.7 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

Details for the file cpex_url_reputation-0.1.1.tar.gz.

File metadata

  • Download URL: cpex_url_reputation-0.1.1.tar.gz
  • Upload date:
  • Size: 38.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cpex_url_reputation-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6eaf01cfb4d8b2a511e6b8e79bc8d12aedc02f2dda94b42c3b9d8070e7b3f461
MD5 3d2936735ca5b98f46925958aa61b5ee
BLAKE2b-256 fe107826762608bfe73cb7166b9c2b8a0e108ea7eaeee3e8558af9c701861da3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cpex_url_reputation-0.1.1.tar.gz:

Publisher: release-rust-python-package.yaml on IBM/cpex-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cpex_url_reputation-0.1.1-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for cpex_url_reputation-0.1.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d6f74f768da503d0b83591402507cf12bceb4cc000e2bb56a2e3df6439fdfd04
MD5 b3ac2e23e3ae3d80c2b835e7ef97d928
BLAKE2b-256 4da97b49b8d736aafa835f870dc720c474db3cdd6793b3f6a8048df1701bffc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for cpex_url_reputation-0.1.1-cp311-abi3-win_amd64.whl:

Publisher: release-rust-python-package.yaml on IBM/cpex-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 34896493b4a23e0439d30d4055423b669f7b03262d393aef9f129b287697ac43
MD5 68b35d8d46b263f84a5fd36ecde7c842
BLAKE2b-256 55b274835033f839ba70b8f8bf2a14f47714876b8b985aad17e64ac31bbb9640

See more details on using hashes here.

Provenance

The following attestation bundles were made for cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl:

Publisher: release-rust-python-package.yaml on IBM/cpex-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_s390x.whl.

File metadata

File hashes

Hashes for cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_s390x.whl
Algorithm Hash digest
SHA256 c580cca81920d0a1c2e41d74c26a486e7347bdacdb220b603e6029714d37d777
MD5 5ef846c7f6f01e8d1055c7caa3eac181
BLAKE2b-256 fccc49f5f522e19ba57ae1922286c6e7d1ebb02d07a11d8660f6509256ef1b5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_s390x.whl:

Publisher: release-rust-python-package.yaml on IBM/cpex-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_ppc64le.whl.

File metadata

File hashes

Hashes for cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_ppc64le.whl
Algorithm Hash digest
SHA256 cf8180b3cec0aa57997fd7cef41efa575c2be49172e308d6efe7e2f031f60b2f
MD5 1d5774d26c9b4195d63b121746e59b09
BLAKE2b-256 fe39babbe46352c5bcb40bd02eb5e4f89ef830b5e784dfe8f5cef0bcc66bd503

See more details on using hashes here.

Provenance

The following attestation bundles were made for cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_ppc64le.whl:

Publisher: release-rust-python-package.yaml on IBM/cpex-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl.

File metadata

File hashes

Hashes for cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl
Algorithm Hash digest
SHA256 024c1ce4d0c1898799891e46e7b1485cd811ee93b607f9d6d42e8b63620c4fc4
MD5 05ce4201654dc006c20187ded7f8ba42
BLAKE2b-256 734270edae434946c44aab9a587de0ac951a344555d6373291f882adb6e4f955

See more details on using hashes here.

Provenance

The following attestation bundles were made for cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl:

Publisher: release-rust-python-package.yaml on IBM/cpex-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cpex_url_reputation-0.1.1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cpex_url_reputation-0.1.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ac3ad2b0b1c992f061898475449f6780a298ab2fcc59149ce3f65613afc43f73
MD5 85bca74708e228f5f2f47caf5cb67803
BLAKE2b-256 a26072783e07ce7a8ec3adcca0ff8b294f7c14755607755971e18c120105f75c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cpex_url_reputation-0.1.1-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: release-rust-python-package.yaml on IBM/cpex-plugins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page