Skip to main content

Comprehensive LLM security scanner - Palisade

Project description

๐Ÿฐ Palisade

Enterprise-grade ML model security scanner. Detects backdoors, supply chain attacks, and malicious payloads before they hit production.

Powered by a high-performance Rust core, Palisade delivers maximum speed and memory efficiency, enabling it to scan 70B+ parameter models on standard hardware.

โญ Key Capabilities

  • Blocks Pickle RCE - Completely prevents remote code execution via pickle files.
  • Detects Behavioral Backdoors - Identifies DoubleAgents, BadAgent, and fine-tuning attacks.
  • Validates Model Integrity - Verifies SafeTensors and GGUF formats against tampering.
  • Verifies Supply Chain - Enforces Sigstore signatures, SLSA provenance, and generates ML-BOMs.
  • Catches Injection Attacks - Prevents tokenizer hijacking, config manipulation, and metadata exploits.
  • Zero-Trust Architecture - Treats all models as potentially malicious until verified.

15 Security Validators provide multi-layered defense in depth (10 universal + 5 format-specific).

๐Ÿ“ฆ Installation

Requires Python 3.10-3.12 and Rust toolchain (cargo, rustc).

Quick Start (Recommended)

# Install UV (modern Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install Rust dependencies
sudo apt install cargo rustc rustup
rustup toolchain install nightly

# Clone and install
git clone https://github.com/highflame-ai/highflame-palisade.git
# Required when building palisade
git clone https://github.com/highflame-ai/highflame-policy.git
cd highflame-palisade

# Create virtual environment (Python 3.10-3.12 required)
uv python install 3.12  # If you don't have Python 3.12
uv venv --python 3.12 && source .venv/bin/activate
uv sync --group dev

# Install Palisade
uv pip install -e .

# Verify installation
palisade --help

Optional: Inference-Based Detection

For DoubleAgents and behavioral backdoor detection via runtime analysis:

# Full inference support (PyTorch + GGUF with CUDA)
uv pip install -e ".[inference]"

# Or install components separately:
uv pip install -e ".[inference-pytorch]"  # PyTorch/SafeTensors only
uv pip install -e ".[inference-gguf]"     # GGUF only (includes CUDA wheels)
Using pip instead of uv?
# For GGUF with CUDA support, specify the wheel index:
pip install palisade[inference-gguf] \
    --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu124

# For CPU-only GGUF:
pip install palisade[inference-gguf] \
    --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu

๐Ÿ› ๏ธ Usage Examples

Scan Models

Basic file scan:

palisade scan model.safetensors
# Scan a directory of models
palisade scan /path/to/models/

Recursive directory scan:

palisade scan /models --recursive --max-files 50

Policy-driven enforcement: Apply strict rules for production environments to block more threats:

palisade scan model.gguf --policy strict_production

JSON output for automation: Generate machine-readable reports for your pipeline:

palisade scan model.safetensors --format json --output report.json

SARIF output for tool integration: Export findings in SARIF 2.1.0 format for GitHub Code Scanning, VS Code, and other security tools:

# Generate SARIF report
palisade scan model.safetensors --format sarif --output results.sarif

# Directory scan with SARIF
palisade scan ./models --recursive --format sarif --output scan-results.sarif

SARIF (Static Analysis Results Interchange Format) enables:

  • ๐Ÿ”— GitHub Code Scanning - Automatically display findings in pull requests
  • ๐Ÿ” VS Code SARIF Viewer - Navigate findings directly in your IDE
  • ๐Ÿ“Š Centralized Dashboards - Aggregate results across multiple tools
  • ๐Ÿ›ก๏ธ Policy Integration - Findings include policy decisions (allow/deny/quarantine)

Inference-Based Backdoor Detection

Detect DoubleAgents-style attacks that fine-tune models to make covert malicious tool calls:

# Quick scan (~75 payloads, ~2 min)
palisade inference-scan model.gguf

# Deep scan with reference model for higher accuracy
palisade inference-scan suspect.gguf --reference clean-base.gguf --scan-type deep

# PyTorch/SafeTensors models
palisade inference-scan ./fine-tuned-model/ --reference ./base-model/

How it works:

  • Perplexity Gap Analysis: Compares suspect model's "confidence" on malicious payloads vs. a clean reference. A fine-tuned model will be suspiciously confident on attack strings it was trained on.
  • Functional Trap Testing: Prompts the model to use legitimate tools and watches for injected malicious tool calls.

Verify Supply Chain

Sigstore signature verification (verify-sigstore): Answers: "Who signed this model?" โ€” Validates cryptographic signatures to ensure the model came from a trusted source.

palisade verify-sigstore /models/llama-7b --public-key publisher.pub

SLSA provenance verification (verify-slsa): Answers: "How was this model built?" โ€” Validates build attestations to ensure supply chain integrity.

palisade verify-slsa /models/mistral-7b --strictness high

โš ๏ธ Cosign Requirement: Cryptographic verification with --public-key requires the cosign CLI to be installed. Without --public-key, only structural validation is performed (SLSA) or verification will fail (Sigstore).

Provenance tracking & ML-BOM (track-provenance): Answers: "What provenance exists?" โ€” Discovers all provenance documentation and generates ML-BOM inventory.

palisade track-provenance /models/gemma --generate-mlbom --format json

๐Ÿ“– See Model Signing Guide for detailed instructions on signing models, creating SLSA attestations, and understanding CoSAI maturity levels.

๐Ÿ–ฅ๏ธ Example Output

Clean Scan:

$ palisade scan test_models/performance/tiny/model.safetensors
โœ“ Using built-in default policy
 Scanning: test_models/performance/tiny/model.safetensors
   Size: 2098.20 MB
   Policy: Default security policy

2025-12-08 11:25:47,537 - INFO - Pattern compilation success rate: 100.0% (66/66)
Using streaming validation ...
๐Ÿ” Running security validators...
โœ… Metadata - Clean (0.28s)
โœ… ModelGenealogy - Clean (0.24s)
โœ… Provenance - Clean (0.25s)
โœ… BufferOverflow - Clean (13.34s)
โœ… Tokenizer - Clean (0.00s)
โœ… DecompressionBomb - Clean (0.00s)
โœ… Model - Clean (16.73s)
โœ… SupplyChain - Clean (16.55s)
โœ… Behavior - Clean (8.75s)
โœ… ToolCall - Clean (14.86s)
โœ… Backdoor - Clean (10.40s)
โœ… LoRAAdapter - Clean (1.09s)
โœ… Safetensors - Clean (16.25s)
๐Ÿ“Š Validation complete - No issues found (62.5 MB/s)
2025-12-08 11:26:21,110 - INFO - Applying policy evaluation (environment: default)
2025-12-08 11:26:21,110 - INFO - Policy evaluation complete - Overall effect: allow

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ“„ Palisade Security Scan โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ model.safetensors                                                                                                                                                             โ”‚
โ”‚ test_models/performance/tiny/model.safetensors                                                                                                                                โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

โœ… CLEAN: model.safetensors

 Scan Time             33.58s  
 Validators            13      
 Memory Used           35.1 MB 
 Warnings              0       

โœ… No security threats detected

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ›ก๏ธ Policy Decision โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โœ… ALLOWED                                                                                                                                                                    โ”‚
โ”‚                                                                                                                                                                               โ”‚
โ”‚ Environment: default                                                                                                                                                          โ”‚
โ”‚ Model passed policy checks.                                                                                                                                                   โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

โœ… Model passed all security checks

Malicious Scan (Blocked):

$ palisade scan examples/models/gemma-3-270m/model_metadata_injection.safetensors 
โœ“ Using built-in default policy
 Scanning: examples/models/gemma-3-270m/model_metadata_injection.safetensors
   Size: 511.38 MB
   Policy: Default security policy

2025-12-08 11:37:36,052 - INFO - Pattern compilation success rate: 100.0% (66/66)
Using streaming validation ...
๐Ÿ” Running security validators...
โœ… Metadata - Clean (0.24s)
โœ… ModelGenealogy - Clean (0.13s)
โœ… Provenance - Clean (0.07s)
โœ… BufferOverflow - Clean (2.28s)
โœ… Tokenizer - Clean (0.00s)
โœ… DecompressionBomb - Clean (0.00s)
โœ… Model - Clean (2.51s)
โœ… SupplyChain - 1 warnings found (2.47s)
โœ… Safetensors - 1 warnings found (0.00s)
2025-12-08 11:37:38,966 - INFO - Suspicious patterns detected in model header (score: 0.300)
2025-12-08 11:37:38,977 - INFO -   Found 5 textual pattern matches in chunk 0
2025-12-08 11:37:38,977 - INFO -     Match 0: code_injection - eval\s*\( -> 'eval('
2025-12-08 11:37:38,977 - INFO -     Match 1: code_injection - os\.system -> 'os.system'
2025-12-08 11:37:38,977 - INFO -     Match 2: code_injection - system\s*\( -> 'system('
โœ… Behavior - 1 warnings found (1.79s)
โœ… Backdoor - 2 warnings found (1.46s)
โœ… LoRAAdapter - Clean (0.35s)
โœ… ToolCall - 1 warnings found (2.05s)
๐Ÿ“Š Validation complete - 6 warnings found (112.1 MB/s)
2025-12-08 11:37:40,616 - INFO - Applying policy evaluation (environment: default)
2025-12-08 11:37:40,618 - INFO - Policy evaluation complete - Overall effect: deny

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ“„ Palisade Security Scan โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ model_metadata_injection.safetensors                                                                                                                                          โ”‚
โ”‚ examples/models/gemma-3-270m/model_metadata_injection.safetensors                                                                                                             โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

๐Ÿ” SUSPICIOUS: model_metadata_injection.safetensors

 Scan Time             4.58s   
 Validators            13      
 Memory Used           38.8 MB 
 Warnings              6       

๐Ÿ” Security Analysis (6 warnings)

๐Ÿ”ด HIGH (2)
   1. supply_chain_malicious_functions
      Malicious functions detected: eval, os_system, system
   2. privilege_escalation_detected
      Privilege escalation patterns detected: enhanced_capabilities

๐ŸŸก MEDIUM (4)
   1. safetensors_streaming_header_error
      Failed to parse JSON header: EOF while parsing a string at line 1 column 26696
   2. backdoor_suspicious_header_patterns
      Suspicious patterns detected in model header (score: 0.300)
   3. backdoor_textual_patterns_in_chunk
      Suspicious textual patterns found in chunk at offset 0
   4. toolcall_suspicious_parameters
      Suspicious parameters: pipe_to_sh (1 matches in 511.4MB model)

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ๐Ÿ›ก๏ธ Policy Decision โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ›” BLOCKED BY POLICY                                                                                                                                                          โ”‚
โ”‚                                                                                                                                                                               โ”‚
โ”‚ Environment: default                                                                                                                                                          โ”‚
โ”‚ This model violates security policy and cannot be used.                                                                                                                       โ”‚
โ”‚ Review the warnings above to understand why.                                                                                                                                  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

๐Ÿ“‹ Recommendations
   โ€ข โ›” BLOCKED BY POLICY - Do not use this model
   โ€ข This model violates security policy requirements
   โ€ข Investigate the source and re-download from trusted source

Inference Scan (BETA):

๐Ÿ”ฌ INFERENCE-BASED BEHAVIORAL ANALYSIS

โ•โ•โ• PERPLEXITY GAP ANALYSIS โ•โ•โ•
Testing 53 suspicious payloads...
๐Ÿšจ CRITICAL: 2 memorized payload(s) detected
   โ€ข http://192.168.1.100:8080/c2 (ratio: 342.5x)
   โ€ข tool_call(name='log_activity'...) (ratio: 215.8x)

โ•โ•โ• FUNCTIONAL TRAP TESTING โ•โ•โ•  
Testing 39 tool-use prompts...
โš ๏ธ  WARNING: 1 suspicious tool call(s) detected
   โ€ข Unexpected call to 'exfil_data' during web_browser task

Risk Score: 0.85 (HIGH)
Recommendation: Model shows signs of DoubleAgents-style fine-tuning

โšก Performance

Palisade uses a native Rust core to handle massive models efficiently without OOM errors. It employs smart streaming and memory mapping to validate models larger than available RAM.

Model Size Format Scan Time Memory Usage Validators
511.38 (250M) SafeTensors 3.7s 115.4MB 13
2.09GB SafeTensors 14.3s 115.4MB 13
3.8GB (7B Q4_K_M) GGUF 29.4s 140MB 11
9.4GB Safetensors 74.3s 119.4MB 13

All scans use memory-efficient streaming and include behavioral backdoor detection.

๐Ÿ”’ CoSAI Support

Palisade is designed to align with the Coalition for Secure AI (CoSAI) standards for software supply chain security.

  • Compliant Artifacts: Generates standard ML-BOMs and transparency logs.
  • Integrity Verification: Implements CoSAI guidelines for model integrity and provenance.
  • Risk Management: Maps findings to industry-standard threat categories.

๐Ÿ”„ CI/CD Integration

Palisade is built for pipelines. Use exit codes to gate deployments.

Exit Codes:

  • 0 - Clean: No issues found.
  • 1 - Warning: Non-critical issues (review recommended).
  • 2 - Critical: Security threat detected (BLOCK DEPLOYMENT).

Example: Secure Pipeline Script

#!/bin/bash
MODEL_DIR="./models/release"

echo "๐Ÿ›ก๏ธ Starting Palisade Security Scan..."

# 1. Supply Chain Verification
# Ensure the model is signed and comes from a trusted builder
palisade verify-sigstore "$MODEL_DIR" --format json -o sigstore.json
if [ $? -ne 0 ]; then
    echo "โŒ Supply chain verification failed (exit code $?) - BLOCKING"
    exit 1
fi

# 2. Deep Security Scan
# Run all validators with strict production policy
palisade scan "$MODEL_DIR" \
    --recursive \
    --policy strict_production \
    --format json \
    --output scan_results.json

# 3. Check for blocking failures
if [ $? -eq 2 ]; then
    echo "๐Ÿšจ CRITICAL THREAT DETECTED - Deployment Blocked"
    exit 1
fi

echo "โœ… Security checks passed"

๐Ÿ›ก๏ธ Security Validators

Palisade runs 10 universal validators on all formats, plus format-specific validators for deeper analysis.

Universal Validators (All Formats)

Validator What it catches
Behavior Analysis Static patterns of behavioral backdoors in model weights
Tool Call Security Malicious tool schemas, privilege escalation via tool use
Buffer Overflow Format string vulns (%n), integer overflows in binaries
Tokenizer Hygiene Injection via control chars, Unicode confusables, prompt injection
Decompression Bomb ZIP/GZIP bombs, nested compression resource exhaustion
Model Genealogy Architecture spoofing, steganographic hiding (ShadowGenes)
Model Integrity Binary tampering, malware patterns, format corruption
Provenance Security Fine-tuning artifacts, signature validation, supply chain gaps
Metadata Security Config injection, path traversal, malicious URLs
Supply Chain Exfiltration patterns, untrusted sources, high-entropy anomalies

Format-Specific Validators

Validator Formats What it catches
SafeTensors Integrity .safetensors Tampering, corruption, missing tensors, format anomalies
Backdoor Detection .safetensors Multi-signal backdoor analysis, weight statistics, LSB stego
LoRA Adapter Security .safetensors, .pt Unauthorized adapters, model hijacking via fine-tunes
GGUF Safety .gguf Header/metadata manipulation, malicious quantization tags
Pickle Security .pt, .pkl, .joblib Remote Code Execution (RCE) via pickle deserialization

Inference-Based Detection (Separate Command)

Validator What it catches
Inference Scan โšก DoubleAgents, BadAgent via runtime perplexity analysis

Use palisade inference-scan for runtime behavioral analysis.

Interactive Demo

See Palisade in action catching real threats:

cd examples
uv sync --group examples
marimo run palisade_security_demo.py

๐Ÿ—๏ธ Development Guide

Setup Development Environment

# Clone with dependencies
git clone https://github.com/highflame-ai/highflame-palisade.git
git clone https://github.com/highflame-ai/highflame-policy.git

cd highflame-palisade

# Install with dev dependencies
uv venv --python 3.12 && source .venv/bin/activate
uv pip install -e ".[dev]"

# Run tests
make test        # Python + Rust tests
make test-quick  # Python only (faster)

Adding New Warning Types

Palisade uses a YAML-based warning catalog for consistent SARIF output. When adding detection logic to a validator, you should also add the warning metadata to the catalog.

1. Add detection logic (Python validator):

# src/palisade/validators/my_validator.py
class MyValidator(BaseValidator):
    def validate(self, data: bytes) -> List[Dict[str, Any]]:
        if suspicious_pattern_detected:
            return [self.create_standard_warning(
                "my_custom_warning_type",  # โ† Warning ID
                "Suspicious pattern detected",
                Severity.HIGH,
            )]

2. Add warning metadata (YAML catalog):

# src/palisade/warnings/warning_catalog.yaml
warnings:
  my_custom_warning_type:
    sarif:
      id: PALISADE-CUSTOM-001
      name: MyValidator
      help_uri: https://docs.palisade.dev/rules/my-validator
    short_description: Suspicious pattern detected
    full_description: >
      Detailed explanation of what this warning means and why it matters.
    severity: high
    tags: [security, custom, pattern-detection]
    recommendation: >
      Steps to remediate this issue.
    validator: MyValidator

3. Use type-safe constants (optional but recommended):

from palisade.warnings import WarningIds

# IDE autocomplete works!
self.create_standard_warning(
    WarningIds.MY_CUSTOM_WARNING_TYPE,
    "Message here",
    Severity.HIGH,
)

The YAML catalog ensures:

  • โœ… Consistent SARIF output across all findings
  • โœ… Single source of truth for warning metadata
  • โœ… Easy to review all warnings in one place
  • โœ… Automatic documentation generation (future)

Release Guide

Check here


๐Ÿฐ Built with โค๏ธ by highflame โ€ข Securing the LLM supply chain

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

palisade-0.1.3.tar.gz (420.5 kB view details)

Uploaded Source

Built Distributions

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

palisade-0.1.3-cp312-cp312-manylinux_2_34_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

palisade-0.1.3-cp312-cp312-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

palisade-0.1.3-cp312-cp312-macosx_10_12_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

palisade-0.1.3-cp311-cp311-manylinux_2_34_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

palisade-0.1.3-cp311-cp311-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

palisade-0.1.3-cp311-cp311-macosx_10_12_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

palisade-0.1.3-cp310-cp310-manylinux_2_34_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

palisade-0.1.3-cp310-cp310-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

palisade-0.1.3-cp310-cp310-macosx_10_12_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file palisade-0.1.3.tar.gz.

File metadata

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

File hashes

Hashes for palisade-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d0817f3dc6c54ef566fee9c0637f88e286ef09e45a22cb05615b09eb1287d56d
MD5 3f26310cd7adfce85a68ae530f4f38c7
BLAKE2b-256 3d2c8f9ca913b020fd2c05b46ca9eb820ec1b818163b1a54bfed36db1c26caa5

See more details on using hashes here.

Provenance

The following attestation bundles were made for palisade-0.1.3.tar.gz:

Publisher: release.yml on highflame-ai/highflame-palisade

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

File details

Details for the file palisade-0.1.3-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for palisade-0.1.3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a1ca953ad8d963b942b5c52d1ae9985504181245ab33b36d0483ca11e75f7f80
MD5 4f3113a48c57ef0b3e8e0ac8ccc04efb
BLAKE2b-256 6e34a0dc2c3bd9d5f95eeebe22f3f3612d7051421b284b9fdadbd64ec2b5afaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for palisade-0.1.3-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: release.yml on highflame-ai/highflame-palisade

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

File details

Details for the file palisade-0.1.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for palisade-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3d3225dd607067ef7c8dd00648b274feae7f148f7d1d93749abeb9d0b210ed6a
MD5 991b7c23938a46c901cb9c47b9b8c360
BLAKE2b-256 318a04a061cbb67e6f229f9fcbfd4f511725177d0f6e86a15c6afec86412d9b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for palisade-0.1.3-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on highflame-ai/highflame-palisade

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

File details

Details for the file palisade-0.1.3-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for palisade-0.1.3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 562119c30e594cb92d7f9329544e17038b07d5cbfb2adbd4efcbe0f0c4a865f8
MD5 d5015b7263f13ec332100da55b1f4d54
BLAKE2b-256 ad861afac5731b0bf65135df713e55d82f2625bd68cc77f6dcde98d2629689d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for palisade-0.1.3-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: release.yml on highflame-ai/highflame-palisade

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

File details

Details for the file palisade-0.1.3-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for palisade-0.1.3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b952ecbd567d678252adbeba056b2a742250064213bdc38eb3682140fafcaaa8
MD5 93f63bdc946623f11f311be596b4b0b4
BLAKE2b-256 7ba45d8539ea265c35daed8288ad233cef17be4522452a6887ab8c4779a927f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for palisade-0.1.3-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: release.yml on highflame-ai/highflame-palisade

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

File details

Details for the file palisade-0.1.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for palisade-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3cd806d7ab5c54d718c74cb31b450d557de8d10014642c410d4ae7c3ff4fe89e
MD5 15891a1455d7005c1e54bc43eb221809
BLAKE2b-256 4204839e544f604c74967317e0bda8d0a0a0b03ea72c90cb64578556d0315869

See more details on using hashes here.

Provenance

The following attestation bundles were made for palisade-0.1.3-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on highflame-ai/highflame-palisade

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

File details

Details for the file palisade-0.1.3-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for palisade-0.1.3-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1387d2db1b0451342920978215e7e428a16cdeb0cb9872a34a980c59ef13dc03
MD5 2c220cc406d4c1ac6fa0a60c1633ba9c
BLAKE2b-256 fb4eb1db5e0a579b7fe82c4ef64e429da17207a8608c3310e7823fb13cfdeff0

See more details on using hashes here.

Provenance

The following attestation bundles were made for palisade-0.1.3-cp311-cp311-macosx_10_12_x86_64.whl:

Publisher: release.yml on highflame-ai/highflame-palisade

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

File details

Details for the file palisade-0.1.3-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for palisade-0.1.3-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2bf7987a96ea29f0f7971c627173a286024846cd52ffa9cc6f199c7b9b6b2ccc
MD5 a13a7fbae3549ddbeb51e06cba35e65e
BLAKE2b-256 9d5eeee8081a4d82af4f6910c47160c903900dfa0a8b336b1444a3a949ce22ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for palisade-0.1.3-cp310-cp310-manylinux_2_34_x86_64.whl:

Publisher: release.yml on highflame-ai/highflame-palisade

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

File details

Details for the file palisade-0.1.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for palisade-0.1.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2244a17c7af762cc7cd32fb98b24f87a175867c7d88961d812a56fccd217ddf2
MD5 d3cbae22f3fca9747bc6b0e480f057d7
BLAKE2b-256 5ddb543ccd6a233dec32a5a50ecc79c3fd2fe8cdff5ab757f258880094e2c072

See more details on using hashes here.

Provenance

The following attestation bundles were made for palisade-0.1.3-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on highflame-ai/highflame-palisade

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

File details

Details for the file palisade-0.1.3-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for palisade-0.1.3-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4a0e97849baf2964e11f77cabed362887c96be86c6e7feffc53c9cd030d560bc
MD5 04bfcacd9535823901b63a4e06583c9a
BLAKE2b-256 ee403702e4466a3ed3de1e0f831de4d7609e2b2ec26de752e46298e8bd0cb6f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for palisade-0.1.3-cp310-cp310-macosx_10_12_x86_64.whl:

Publisher: release.yml on highflame-ai/highflame-palisade

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