Saved in:
Bibliographic Details
Main Author: Soltaniani, Farnaz
Format: Recurso digital
Language:English
Published: Zenodo 2025
Subjects:
Online Access:https://doi.org/10.5281/zenodo.17669970
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866902289189437440
author Soltaniani, Farnaz
author_facet Soltaniani, Farnaz
contents <p>Numerous tools have been developed to uncover secrets and credentials in source code. However, they often rely on predefined rules that yield a high rate of false positives. We conduct an in-depth investigation into the performance of different AI models in secret detection. In non-generative models, we found that the choice of feature set greatly influences the performance in secret detection. These models demonstrated the best performance using the context feature, i.e., code surrounding the secret value.  Particularly, CodeBERT outperforms other models with an MCC and F1-scores of 88% and 89%, respectively.<br>When we applied the models to an unseen dataset of secrets, the top models were RF and CodeBERT, achieving an MCC score of around 65%. In generative models, we observed moderate performance (a maximum MCC of 63\%) and a high number of false positives, most of which occurred in the test path files. Our manual investigation of incorrect predictions revealed that LLMs tend to be cautious, flagging potential secrets to promote secure coding practices.</p>
format Recurso digital
id zenodo_https___doi_org_10_5281_zenodo_17669970
institution Zenodo
language eng
publishDate 2025
publisher Zenodo
record_format zenodo
spellingShingle Learning to Detect Hardcoded Secrets
Soltaniani, Farnaz
Hardcoded secrets
Credential leakage
AI for security
<p>Numerous tools have been developed to uncover secrets and credentials in source code. However, they often rely on predefined rules that yield a high rate of false positives. We conduct an in-depth investigation into the performance of different AI models in secret detection. In non-generative models, we found that the choice of feature set greatly influences the performance in secret detection. These models demonstrated the best performance using the context feature, i.e., code surrounding the secret value.  Particularly, CodeBERT outperforms other models with an MCC and F1-scores of 88% and 89%, respectively.<br>When we applied the models to an unseen dataset of secrets, the top models were RF and CodeBERT, achieving an MCC score of around 65%. In generative models, we observed moderate performance (a maximum MCC of 63\%) and a high number of false positives, most of which occurred in the test path files. Our manual investigation of incorrect predictions revealed that LLMs tend to be cautious, flagging potential secrets to promote secure coding practices.</p>
title Learning to Detect Hardcoded Secrets
topic Hardcoded secrets
Credential leakage
AI for security
url https://doi.org/10.5281/zenodo.17669970