Skip to main content

No project description provided

Project description

Gatekeeper CDR (Python)

This package provides native Python bindings to the Gatekeeper CDR core, a zero-trust Content Disarm and Reconstruction engine. It sanitizes potentially malicious files by deeply inspecting and rebuilding them from raw pixel data, effectively stripping away any steganography, macros, or hidden exploits.

Installation

pip install gatekeeper-cdr

(Note: Pre-built wheels are provided for Linux, macOS, and Windows. You do not need Rust installed to use this package).

Usage

import gatekeeper_cdr

# 1. Read a suspicious file
with open("suspicious.jpg", "rb") as f:
    raw_payload = f.read()

# 2. Detect the true format of the file without fully parsing it
try:
    fmt = gatekeeper_cdr.sniff_format(raw_payload)
    print(f"Detected Format: {fmt}") # "Jpeg", "Png", etc.
except Exception as e:
    print(f"Unknown or invalid format: {e}")

# 3. Disarm the file (returns a clean bytes object)
try:
    clean_payload = gatekeeper_cdr.disarm(raw_payload)
    with open("clean.png", "wb") as f:
        f.write(clean_payload)
    print("File successfully sanitized and saved as clean.png!")
except Exception as e:
    print(f"Failed to sanitize file: {e}")

Security

If the file is malformed, structurally invalid, or contains an unknown format, Gatekeeper will intentionally raise an Exception rather than attempting to process it. This default-deny stance ensures that only provably safe files make it into your application's storage.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

gatekeeper_cdr-0.4.2-cp38-abi3-win_amd64.whl (1.4 MB view details)

Uploaded CPython 3.8+Windows x86-64

gatekeeper_cdr-0.4.2-cp38-abi3-manylinux_2_34_x86_64.whl (1.6 MB view details)

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

gatekeeper_cdr-0.4.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

gatekeeper_cdr-0.4.2-cp38-abi3-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

gatekeeper_cdr-0.4.2-cp38-abi3-macosx_10_12_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file gatekeeper_cdr-0.4.2-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for gatekeeper_cdr-0.4.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4529db575f465104473a4cfa60c44673792b67af09731299bd1d9a8957fe02e3
MD5 cdb70178b6769eba452ac6697a22da48
BLAKE2b-256 ff72f42dc1884eb1844dae003a9e1fb3c4b8e083e94b27b8d0d885aeed35fb39

See more details on using hashes here.

File details

Details for the file gatekeeper_cdr-0.4.2-cp38-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for gatekeeper_cdr-0.4.2-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ec9e2f09e4179d9f50600976c5f818e54efc681583019a84bcd5f552933e4d24
MD5 283c0654da60117ae106d9b2eaa0750b
BLAKE2b-256 b67a1a094a6103d0fe24396f28bc5644ed08b030d68de0b85348d8be86b21e3f

See more details on using hashes here.

File details

Details for the file gatekeeper_cdr-0.4.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for gatekeeper_cdr-0.4.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2bbf73906e93ace7619bb2dbfef793c93d039221a6879660ff6dec5e085782d6
MD5 6d94f33c3dfddfe701fa5431981eea68
BLAKE2b-256 ae3053954324c0e4031d389703811c91b80537879cd226c57ba5d271a70300a8

See more details on using hashes here.

File details

Details for the file gatekeeper_cdr-0.4.2-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for gatekeeper_cdr-0.4.2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd007b2a864c4833ed9d1fc83ec2ded3050f6413e8aa0c81a0ba38b91e836e1d
MD5 13f99ee19a8ce91bc44c0184df58dc7d
BLAKE2b-256 1ea47d450e938ac4f155c523c0e4126f43ae6149506fa97550df5a58e9b9623b

See more details on using hashes here.

File details

Details for the file gatekeeper_cdr-0.4.2-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for gatekeeper_cdr-0.4.2-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e5b77526af292fea2d6e3602fb834c4fadcf89568b199da219ab40a2a64d26d2
MD5 cf330bf22c5d89905efb2ee66ca9b7a2
BLAKE2b-256 13712a68148a951c7115ddf587e09c70dfdbeea0e652d972abcdaa386a645e53

See more details on using hashes here.

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