Downloads · 30 days
15
13% of all-time downloads
colemei/IntelliSA-220m
IntelliSA-220m is a text classification model from colemei. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
IntelliSA-220m is a fine-tuned Salesforce/codet5p-220m model for detecting security vulnerabilities in Infrastructure as Code (IaC) configurations across Chef, Ansible, and Puppet.
Downloads · 30 days
15
13% of all-time downloads
All-time downloads
119
Public
Parameters
223M
896 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors894 MB · 100%
From the Hugging Face model README
IntelliSA-220m is a fine-tuned Salesforce/codet5p-220m model for detecting security vulnerabilities in Infrastructure as Code (IaC) configurations across Chef, Ansible, and Puppet.
| Technology | F1 Score |
|---|---|
| Ansible | 0.884 |
| Puppet | 0.756 |
| Chef | 0.698 |
| Combined | 0.779 |
from transformers import T5ForSequenceClassification, RobertaTokenizer
import torch
model = T5ForSequenceClassification.from_pretrained("colemei/IntelliSA-220m")
tokenizer = RobertaTokenizer.from_pretrained("colemei/IntelliSA-220m")
THRESHOLD = 0.61 # Classification threshold
def predict_vulnerability(code_snippet):
inputs = tokenizer(code_snippet, return_tensors="pt", max_length=512,
truncation=True, padding=True)
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
score = predictions[0][1].item()
is_vulnerable = score >= THRESHOLD
return score, is_vulnerable
# Example
code = """
cookbook_file '/tmp/file' do
mode '0777'
end
"""
score, is_vulnerable = predict_vulnerability(code)
print(f"Vulnerability score: {score:.3f}, Vulnerable: {is_vulnerable}")
Training data is maintained in a separate repository for transparency and reusability:
For complete dataset information including oracle ground truth and detailed statistics, see the dataset repository.
PLACEHOLDER