Feature Extraction
Transformers
static_canary
ctf
model-scanning
supply-chain-canary
static-analysis
custom_code
Instructions to use WWTCyberLab/static-canary-pt-loader-risk with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WWTCyberLab/static-canary-pt-loader-risk with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="WWTCyberLab/static-canary-pt-loader-risk", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("WWTCyberLab/static-canary-pt-loader-risk", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
| """No-op remote-code canary for model scanning CTFs. | |
| This module is intentionally inert. Importing it has no filesystem, | |
| subprocess, or network side effects. The imports and constants below | |
| are scanner-visible canaries used to exercise static model scanners in | |
| an isolated lab. | |
| """ | |
| from __future__ import annotations | |
| import base64 | |
| import os | |
| import subprocess | |
| import sys | |
| from pathlib import Path | |
| REPO_ID = 'WWTCyberLab/static-canary-pt-loader-risk' | |
| CTF_MODEL_CANARY = 'CTF_MODEL_CANARY' | |
| ENCODED_CANARY = 'Q1RGX01PREVMX0NBTkFSWQ==' | |
| SINK_FRAGMENTS = ("http://", "twinshadow-exfil", ".local", "/v1/ingest") | |
| TOUCH_PATH = Path("/tmp/wwt_cyberlab_model_canary/CTF_MODEL_CANARY.txt") | |
| class StaticCanaryModel: | |
| """Tiny stand-in model used only to make HF auto_map resolvable.""" | |
| config_class = None | |
| def __init__(self, config=None): | |
| self.config = config | |
| def from_pretrained(cls, *args, **kwargs): | |
| return cls(kwargs.get("config")) | |
| def __call__(self, *args, **kwargs): | |
| return {"canary": CTF_MODEL_CANARY, "static_only": True} | |
| def decode_canary() -> str: | |
| return base64.b64decode(ENCODED_CANARY.encode("ascii")).decode("utf-8") | |