Text Classification
Transformers
Safetensors
English
deberta-v2
secret-detection
secrets
security
cybersecurity
devsecops
sast
code-security
code-analysis
supply-chain-security
pre-commit
ci-cd
github-actions
password-detection
api-key-detection
token-detection
credential-detection
secure-coding
deberta
deberta-v3
binary-classification
Eval Results (legacy)
text-embeddings-inference
Instructions to use hypn05/secrets-sentinel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hypn05/secrets-sentinel with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="hypn05/secrets-sentinel")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("hypn05/secrets-sentinel") model = AutoModelForSequenceClassification.from_pretrained("hypn05/secrets-sentinel", device_map="auto") - Notebooks
- Google Colab
- Kaggle
v5.0.0: Full fine-tune on data_v10 (1.14M lines, 195 negative patterns). Fixes CloudFormation Default: FNs (F1 0.0→1.0), Redis --requirepass FNs (F1 0.67→1.0), and all 14 confirmed FP categories from real-world scanner runs. F1=0.9999, Precision=1.0000, Recall=0.9998 on held-out eval.
Browse files- README.md +26 -21
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -60,28 +60,28 @@ model-index:
|
|
| 60 |
type: text-classification
|
| 61 |
name: Secret / Credential Detection
|
| 62 |
dataset:
|
| 63 |
-
name: Synthetic + Real-World Labeled (
|
| 64 |
type: custom
|
| 65 |
split: test
|
| 66 |
metrics:
|
| 67 |
- type: f1
|
| 68 |
-
value: 0.
|
| 69 |
name: F1 Score
|
| 70 |
- type: precision
|
| 71 |
-
value:
|
| 72 |
name: Precision
|
| 73 |
- type: recall
|
| 74 |
-
value:
|
| 75 |
name: Recall
|
| 76 |
- type: accuracy
|
| 77 |
-
value: 0.
|
| 78 |
name: Accuracy
|
| 79 |
---
|
| 80 |
|
| 81 |
-
# Secrets Sentinel —
|
| 82 |
|
| 83 |
> **Context-aware AI secret detection for CI/CD pipelines, pre-commit hooks, and code scanners.**
|
| 84 |
-
> Fine-tuned DeBERTa-v3-base · F1 = 0.
|
| 85 |
|
| 86 |
[](https://huggingface.co/hypn05/secrets-sentinel)
|
| 87 |
[](https://huggingface.co/hypn05/secrets-sentinel-cpu)
|
|
@@ -89,13 +89,19 @@ model-index:
|
|
| 89 |
|
| 90 |
---
|
| 91 |
|
| 92 |
-
## What's New in
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
|
| 95 |
-
and deliberate security testing repositories (OWASP WebGoat, OWASP juice-shop, OWASP wrongsecrets,
|
| 96 |
-
TruffleHog fixtures, Gitleaks testdata, Plazmaz/leaky-repo, and more):
|
| 97 |
|
| 98 |
-
| Pattern
|
| 99 |
|---|---|
|
| 100 |
| **GitHub Actions pinned SHAs** | `uses: docker/login-action@5e57cd118...ef # v3.6.0` |
|
| 101 |
| **`.env.example` placeholders** | `REDIS_PASSWORD=null`, `DB_PASSWORD=YOURPASSWORD` |
|
|
@@ -153,15 +159,13 @@ Secrets pushed to repositories create a critical, expensive security incident:
|
|
| 153 |
| **GPU memory** | ~800 MB (inference) |
|
| 154 |
| **License** | MIT |
|
| 155 |
|
| 156 |
-
### Training Data (
|
| 157 |
|
| 158 |
| Source | Lines | Label |
|
| 159 |
|---|---|---|
|
| 160 |
-
| Synthetic generator (
|
| 161 |
-
| Real-world
|
| 162 |
-
|
|
| 163 |
-
| Synthetic FP negatives (15 pattern categories) | ~2,700 | Negative |
|
| 164 |
-
| **Total** | **~144,000** | — |
|
| 165 |
|
| 166 |
### Evaluation History
|
| 167 |
|
|
@@ -170,9 +174,10 @@ Secrets pushed to repositories create a critical, expensive security incident:
|
|
| 170 |
| v1.0.0 | 0.9910 | 0.9905 | 0.9915 | 0.9920 | — |
|
| 171 |
| v2.0.0 | 0.9976 | 0.9975 | 0.9977 | 0.9977 | 0.0112 |
|
| 172 |
| v3.0.0 | 0.9994 | 0.9994 | 0.9994 | 0.9995 | 0.0051 |
|
| 173 |
-
|
|
|
|
|
| 174 |
|
| 175 |
-
|
| 176 |
|
| 177 |
---
|
| 178 |
|
|
@@ -564,7 +569,7 @@ A: No. Run the model locally or on your own infrastructure. Inference is fully o
|
|
| 564 |
A: `0.85` for pre-receive hooks (low FP, may miss some edge cases). `0.60` for retrospective scans where you want higher recall and can accept some FP for manual review.
|
| 565 |
|
| 566 |
**Q: How often is the model updated?**
|
| 567 |
-
A: Continuously — each version is trained on newly identified FP and FN patterns from real-world scanning.
|
| 568 |
|
| 569 |
---
|
| 570 |
|
|
|
|
| 60 |
type: text-classification
|
| 61 |
name: Secret / Credential Detection
|
| 62 |
dataset:
|
| 63 |
+
name: Synthetic + Real-World Labeled (data_v10 + labeled_data.jsonl)
|
| 64 |
type: custom
|
| 65 |
split: test
|
| 66 |
metrics:
|
| 67 |
- type: f1
|
| 68 |
+
value: 0.9999
|
| 69 |
name: F1 Score
|
| 70 |
- type: precision
|
| 71 |
+
value: 1.0000
|
| 72 |
name: Precision
|
| 73 |
- type: recall
|
| 74 |
+
value: 0.9998
|
| 75 |
name: Recall
|
| 76 |
- type: accuracy
|
| 77 |
+
value: 0.9999
|
| 78 |
name: Accuracy
|
| 79 |
---
|
| 80 |
|
| 81 |
+
# Secrets Sentinel — v5.0.0
|
| 82 |
|
| 83 |
> **Context-aware AI secret detection for CI/CD pipelines, pre-commit hooks, and code scanners.**
|
| 84 |
+
> Fine-tuned DeBERTa-v3-base · F1 = 0.9999 · Precision = 1.0 · <500ms inference · Runs fully on-prem.
|
| 85 |
|
| 86 |
[](https://huggingface.co/hypn05/secrets-sentinel)
|
| 87 |
[](https://huggingface.co/hypn05/secrets-sentinel-cpu)
|
|
|
|
| 89 |
|
| 90 |
---
|
| 91 |
|
| 92 |
+
## What's New in v5.0.0
|
| 93 |
+
|
| 94 |
+
v5 is a full fine-tune of all 184M parameters on data_v10 (1.14M training lines, 195 negative
|
| 95 |
+
patterns), fixing the remaining false negatives from v4 and further reducing false positives:
|
| 96 |
+
|
| 97 |
+
| Fix | Example |
|
| 98 |
+
|---|---|
|
| 99 |
+
| **CloudFormation `Default:` passwords** | `Default: MyS3cr3tPass!` now correctly flagged |
|
| 100 |
+
| **Redis `--requirepass` in docker-compose** | `command: redis-server --requirepass s3cr3t` now correctly flagged |
|
| 101 |
|
| 102 |
+
Combined with all v4 false-positive fixes:
|
|
|
|
|
|
|
| 103 |
|
| 104 |
+
| Pattern (safe, not flagged) | Example |
|
| 105 |
|---|---|
|
| 106 |
| **GitHub Actions pinned SHAs** | `uses: docker/login-action@5e57cd118...ef # v3.6.0` |
|
| 107 |
| **`.env.example` placeholders** | `REDIS_PASSWORD=null`, `DB_PASSWORD=YOURPASSWORD` |
|
|
|
|
| 159 |
| **GPU memory** | ~800 MB (inference) |
|
| 160 |
| **License** | MIT |
|
| 161 |
|
| 162 |
+
### Training Data (v5)
|
| 163 |
|
| 164 |
| Source | Lines | Label |
|
| 165 |
|---|---|---|
|
| 166 |
+
| Synthetic generator (data_v10, 162 positive + 195 negative patterns) | ~1,106,000 | Mixed |
|
| 167 |
+
| Real-world labeled examples (OWASP apps, scanner fixtures, vuln repos) | ~37,900 | Labeled |
|
| 168 |
+
| **Total** | **~1,144,000** | — |
|
|
|
|
|
|
|
| 169 |
|
| 170 |
### Evaluation History
|
| 171 |
|
|
|
|
| 174 |
| v1.0.0 | 0.9910 | 0.9905 | 0.9915 | 0.9920 | — |
|
| 175 |
| v2.0.0 | 0.9976 | 0.9975 | 0.9977 | 0.9977 | 0.0112 |
|
| 176 |
| v3.0.0 | 0.9994 | 0.9994 | 0.9994 | 0.9995 | 0.0051 |
|
| 177 |
+
| v4.0.0 | 0.9992 | 0.9983 | 1.0000 | 0.9992 | ~0.001 |
|
| 178 |
+
| **v5.0.0** | **0.9999** | **1.0000** | **0.9998** | **0.9999** | **~0.000** |
|
| 179 |
|
| 180 |
+
v5 achieves **Precision = 1.0** (zero false positives on the held-out eval set) with near-perfect recall, trained as a full fine-tune on data_v10 which incorporates all confirmed real-world FP and FN patterns at scale.
|
| 181 |
|
| 182 |
---
|
| 183 |
|
|
|
|
| 569 |
A: `0.85` for pre-receive hooks (low FP, may miss some edge cases). `0.60` for retrospective scans where you want higher recall and can accept some FP for manual review.
|
| 570 |
|
| 571 |
**Q: How often is the model updated?**
|
| 572 |
+
A: Continuously — each version is trained on newly identified FP and FN patterns from real-world scanning. v5 specifically addresses CloudFormation `Default:` password lines and Redis `--requirepass` docker-compose commands, while v4 addressed GitHub Actions workflow files, PHP config templates, and Laravel test fixtures.
|
| 573 |
|
| 574 |
---
|
| 575 |
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 737719272
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:932fcb4d9809efec148bb0a1a89f4ad60e78d741d786e79aa932f05545003372
|
| 3 |
size 737719272
|