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 passblocked_domains: domains that should always failallowed_patterns: regexes that bypass broader blocking rulesblocked_patterns: regexes that force rejectionuse_heuristic_check: enable phishing-style hostname heuristicsentropy_threshold: threshold for heuristic blocking of random-looking hostnamesblock_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6eaf01cfb4d8b2a511e6b8e79bc8d12aedc02f2dda94b42c3b9d8070e7b3f461
|
|
| MD5 |
3d2936735ca5b98f46925958aa61b5ee
|
|
| BLAKE2b-256 |
fe107826762608bfe73cb7166b9c2b8a0e108ea7eaeee3e8558af9c701861da3
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpex_url_reputation-0.1.1.tar.gz -
Subject digest:
6eaf01cfb4d8b2a511e6b8e79bc8d12aedc02f2dda94b42c3b9d8070e7b3f461 - Sigstore transparency entry: 1262725920
- Sigstore integration time:
-
Permalink:
IBM/cpex-plugins@522a086f698f4ae386d803aac91350e22c60dab2 -
Branch / Tag:
refs/tags/url-reputation-v0.1.1 - Owner: https://github.com/IBM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-rust-python-package.yaml@522a086f698f4ae386d803aac91350e22c60dab2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cpex_url_reputation-0.1.1-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: cpex_url_reputation-0.1.1-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 95.3 kB
- Tags: CPython 3.11+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6f74f768da503d0b83591402507cf12bceb4cc000e2bb56a2e3df6439fdfd04
|
|
| MD5 |
b3ac2e23e3ae3d80c2b835e7ef97d928
|
|
| BLAKE2b-256 |
4da97b49b8d736aafa835f870dc720c474db3cdd6793b3f6a8048df1701bffc3
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpex_url_reputation-0.1.1-cp311-abi3-win_amd64.whl -
Subject digest:
d6f74f768da503d0b83591402507cf12bceb4cc000e2bb56a2e3df6439fdfd04 - Sigstore transparency entry: 1262726005
- Sigstore integration time:
-
Permalink:
IBM/cpex-plugins@522a086f698f4ae386d803aac91350e22c60dab2 -
Branch / Tag:
refs/tags/url-reputation-v0.1.1 - Owner: https://github.com/IBM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-rust-python-package.yaml@522a086f698f4ae386d803aac91350e22c60dab2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 190.0 kB
- Tags: CPython 3.11+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34896493b4a23e0439d30d4055423b669f7b03262d393aef9f129b287697ac43
|
|
| MD5 |
68b35d8d46b263f84a5fd36ecde7c842
|
|
| BLAKE2b-256 |
55b274835033f839ba70b8f8bf2a14f47714876b8b985aad17e64ac31bbb9640
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl -
Subject digest:
34896493b4a23e0439d30d4055423b669f7b03262d393aef9f129b287697ac43 - Sigstore transparency entry: 1262726067
- Sigstore integration time:
-
Permalink:
IBM/cpex-plugins@522a086f698f4ae386d803aac91350e22c60dab2 -
Branch / Tag:
refs/tags/url-reputation-v0.1.1 - Owner: https://github.com/IBM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-rust-python-package.yaml@522a086f698f4ae386d803aac91350e22c60dab2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_s390x.whl.
File metadata
- Download URL: cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_s390x.whl
- Upload date:
- Size: 219.0 kB
- Tags: CPython 3.11+, manylinux: glibc 2.34+ s390x
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c580cca81920d0a1c2e41d74c26a486e7347bdacdb220b603e6029714d37d777
|
|
| MD5 |
5ef846c7f6f01e8d1055c7caa3eac181
|
|
| BLAKE2b-256 |
fccc49f5f522e19ba57ae1922286c6e7d1ebb02d07a11d8660f6509256ef1b5a
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_s390x.whl -
Subject digest:
c580cca81920d0a1c2e41d74c26a486e7347bdacdb220b603e6029714d37d777 - Sigstore transparency entry: 1262726136
- Sigstore integration time:
-
Permalink:
IBM/cpex-plugins@522a086f698f4ae386d803aac91350e22c60dab2 -
Branch / Tag:
refs/tags/url-reputation-v0.1.1 - Owner: https://github.com/IBM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-rust-python-package.yaml@522a086f698f4ae386d803aac91350e22c60dab2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_ppc64le.whl.
File metadata
- Download URL: cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_ppc64le.whl
- Upload date:
- Size: 212.2 kB
- Tags: CPython 3.11+, manylinux: glibc 2.34+ ppc64le
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf8180b3cec0aa57997fd7cef41efa575c2be49172e308d6efe7e2f031f60b2f
|
|
| MD5 |
1d5774d26c9b4195d63b121746e59b09
|
|
| BLAKE2b-256 |
fe39babbe46352c5bcb40bd02eb5e4f89ef830b5e784dfe8f5cef0bcc66bd503
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_ppc64le.whl -
Subject digest:
cf8180b3cec0aa57997fd7cef41efa575c2be49172e308d6efe7e2f031f60b2f - Sigstore transparency entry: 1262726036
- Sigstore integration time:
-
Permalink:
IBM/cpex-plugins@522a086f698f4ae386d803aac91350e22c60dab2 -
Branch / Tag:
refs/tags/url-reputation-v0.1.1 - Owner: https://github.com/IBM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-rust-python-package.yaml@522a086f698f4ae386d803aac91350e22c60dab2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl.
File metadata
- Download URL: cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl
- Upload date:
- Size: 183.4 kB
- Tags: CPython 3.11+, manylinux: glibc 2.34+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
024c1ce4d0c1898799891e46e7b1485cd811ee93b607f9d6d42e8b63620c4fc4
|
|
| MD5 |
05ce4201654dc006c20187ded7f8ba42
|
|
| BLAKE2b-256 |
734270edae434946c44aab9a587de0ac951a344555d6373291f882adb6e4f955
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpex_url_reputation-0.1.1-cp311-abi3-manylinux_2_34_aarch64.whl -
Subject digest:
024c1ce4d0c1898799891e46e7b1485cd811ee93b607f9d6d42e8b63620c4fc4 - Sigstore transparency entry: 1262725966
- Sigstore integration time:
-
Permalink:
IBM/cpex-plugins@522a086f698f4ae386d803aac91350e22c60dab2 -
Branch / Tag:
refs/tags/url-reputation-v0.1.1 - Owner: https://github.com/IBM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-rust-python-package.yaml@522a086f698f4ae386d803aac91350e22c60dab2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cpex_url_reputation-0.1.1-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: cpex_url_reputation-0.1.1-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 170.7 kB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac3ad2b0b1c992f061898475449f6780a298ab2fcc59149ce3f65613afc43f73
|
|
| MD5 |
85bca74708e228f5f2f47caf5cb67803
|
|
| BLAKE2b-256 |
a26072783e07ce7a8ec3adcca0ff8b294f7c14755607755971e18c120105f75c
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cpex_url_reputation-0.1.1-cp311-abi3-macosx_11_0_arm64.whl -
Subject digest:
ac3ad2b0b1c992f061898475449f6780a298ab2fcc59149ce3f65613afc43f73 - Sigstore transparency entry: 1262726103
- Sigstore integration time:
-
Permalink:
IBM/cpex-plugins@522a086f698f4ae386d803aac91350e22c60dab2 -
Branch / Tag:
refs/tags/url-reputation-v0.1.1 - Owner: https://github.com/IBM
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-rust-python-package.yaml@522a086f698f4ae386d803aac91350e22c60dab2 -
Trigger Event:
push
-
Statement type: