Generic-secret triage (scanner false-positive filter)

PEFT QDoRA adapter (r=32, alpha=32) for google/gemma-4-E4B-it, which determines whether a generic secret is a real credential or a false positive. It triages findings produced by the Binarly Transparency Platform over scanned Docker image file systems. Only the language tower is adapted and no base weights are included, so the base model must be loaded underneath it.

The scan used to produce the dataset, how the adapter was trained and its accuracy on the test data are described in the Containers Don't Keep Secrets: Scanning Docker Hub for Leaked Credentials and Private Keys blog post.

The contract

Throughout the training process, one prompt shape and one output schema were used. Deviating from these may affect accuracy, so treat the three pieces below as fixed.

System message. system-prompt.txt β€” the exact bytes matter. It contains the decision rules used to generate the training labels. Editing them can change the scores; re-validate if you do so.

User message. One finding as tagged sections, closing with the question exactly as written here:

<finding>
<file>
path: opt/app/config/settings.py
name: settings.py
kind: source
magic_string: Python script, ASCII text executable
</file>
<secret>
value: 3f8a1c94e2b7d05f6a1e8c3b9d4f7028
entropy_per_char: 3.953
</secret>
<secret_match>
SECRET_KEY = "3f8a1c94e2b7d05f6a1e8c3b9d4f7028"
</secret_match>
<secret_context>
DEBUG = False
SECRET_KEY = "3f8a1c94e2b7d05f6a1e8c3b9d4f7028"
</secret_context>
</finding>

Is this a real secret or a false positive?

Assistant output. Strict JSON, one key, no prose and no code fence β€” {"verdict": "..."}, where verdict is exactly one of:

  • true_positive β€” a real credential, key, token, or password.
  • false_positive β€” an identifier, hash, public key, or a value appearing in documentation or an example section.

Decoding

  • Deterministic, temperature = 0 (do_sample = False). The verdict is based on a single token. Sampling only increases the chance of producing an incorrect result.
  • No thinking. An empty thought block in the output is expected.
  • A context window of at least 8192 tokens. If the prompt exceeds the size of the window, the model will truncate it from the beginning and provide an arbitrary response. Set the size explicitly β€” in Ollama, PARAMETER num_ctx 8192, as the bundled Modelfile does.

Serving

This is a standard PEFT DoRA adapter whose target modules match the base language tower, so it loads with any stack that supports PEFT DoRA over google/gemma-4-E4B-it:

  • The base is a multimodal Gemma4ForConditionalGeneration, so load the full base and apply the adapter on top. Gemma 4's vision and audio encoders use Gemma4ClippableLinear layers, which PEFT will not adapt.
  • Training used the 4-bit unsloth/gemma-4-e4b-it-unsloth-bnb-4bit base. The adapter loads onto either that or the 16-bit google/gemma-4-E4B-it.

Serving as GGUF

from unsloth import FastVisionModel

m, tok = FastVisionModel.from_pretrained(
    "generic-secret-triage-r32-c8",
    load_in_4bit=False,
)
m.save_pretrained_gguf("out", tok, quantization_method="q4_k_m")

Update the Modelfile to point to the generated GGUF located in the out_gguf/ directory, then run ollama create generic-secret-triage -f Modelfile. Requires Ollama v0.20.0 or newer.

Provenance & licence

  • Base: google/gemma-4-E4B-it, trained through unsloth/gemma-4-e4b-it-unsloth-bnb-4bit (4-bit, frozen) on a single NVIDIA L4.
  • Training and evaluation are described in this blog post.
  • The licence is inherited from the base model.
Downloads last month
12
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for binarly/generic-secret-triage-r32-c8

Adapter
(443)
this model