Анализ методов и инструментов обнаружения чувствительной информации в исходном коде
проблемы точности и полноты
Аннотация
В условиях повсеместного внедрения DevOps-практик и роста сложности программных систем, проблема утечки чувствительной информации (секретов), такой как API-ключи, пароли и токены, непосредственно из исходного кода и конфигурационных файлов, приобретает критическую важность. Утечка секретов может привести к серьезным инцидентам безопасности, финансовым и репутационным потерям. Статья посвящена анализу проблемы обнаружения секретов в коде. Рассматриваются типы секретов, места их возможного обнаружения и риски, связанные с их компрометацией. Проводится детальный обзор и критический анализ существующих методов поиска секретов, включая сопоставление с образцом (регулярные выражения), анализ информационной энтропии и базовые подходы семантического анализа. Обсуждаются их принципы работы, преимущества и существенные ограничения, в частности проблемы ложных срабатываний (False Positives) и пропуска реальных секретов (False Negatives). Представлены результаты сравнительного тестирования популярных инструментов с открытым исходным кодом (Gitleaks, TruffleHog, DeepSecrets) на наборе из 50 репозиториев, демонстрирующие различия в их точности и уровне ложных срабатываний. Делается вывод о недостаточной эффективности существующих подходов и необходимости разработки более интеллектуальных и точных решений для надежного обнаружения секретов в коде.
Литература
2. Kulenovic M., Donko D. A survey of static code analysis methods for security vulnerabilities detection. In: 2014 37th International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO). Opatija, Croatia: IEEE Press; 2014. p. 1381-1386. https://doi.org/10.1109/MIPRO.2014.6859783
3. Chess B., McGraw G. Static analysis for security. IEEE Security & Privacy. 2004;2(6):76-79. https://doi.org/10.1109/MSP.2004.111
4. Kubrin G.S., Zegzhda D.P. Vulnerability detection with an ensemble of analysis algorithms for code graph representation. Information Security Problems. Computer Systems. 2023;S2(55):145-158. (In Russ., abstract in Eng.) https://doi.org/10.48612/jisp/n27u-p87u-uugp
5. Wahab Z., Ahmed S., Rahman N., Shahriyar R., Uddin G. Secret Breach Prevention in Software Issue Reports. arXiv:2410.23657. 2024. https://doi.org/10.48550/arXiv.2410.23657
6. Gimatdinov D.M., Gerasimov A.Y., Privalov P.A., et al. An Automated Framework for Testing Source Code Static Analysis Tools. Trudy ISP RAN = Proceedings of the Institute for System Programming of the RAS. 2021;33(3):41-50. https://doi.org/10.15514/ISPRAS-2021-33(3)-3
7. AlBreiki H.H., Mahmoud Q.H. Evaluation of static analysis tools for software security. In: 2014 10th International Conference on Innovations in Information Technology (IIT). Al Ain, United Arab Emirates: IEEE Press; 2014. p. 93-98. https://doi.org/10.1109/INNOVATIONS.2014.6987569
8. Hao G., et al. Constructing Benchmarks for Supporting Explainable Evaluations of Static Application Security Testing Tools. In: 2019 International Symposium on Theoretical Aspects of Software Engineering (TASE). Guilin, China: IEEE Press; 2019. p. 65-72. https://doi.org/10.1109/TASE.2019.00-18
9. Nikolić D., Stefanović D., Dakić D., Sladojević S., Ristić S. Analysis of the Tools for Static Code Analysis. In: 2021 20th International Symposium INFOTEH-JAHORINA (INFOTEH). East Sarajevo, Bosnia and Herzegovina: IEEE Press; 2021. p. 1-6. https://doi.org/10.1109/INFOTEH51037.2021.9400688
10. Shannon C.E. A Mathematical Theory of Communication. The Bell System Technical Journal. 1948;27(3):379-423. https://doi.org/10.1002/j.1538-7305.1948.tb01338.x
11. Basak S.K., Cox J., Reaves B., Williams L. A Comparative Study of Software Secrets Reporting by Secret Detection Tools. In: 2023 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM). New Orleans, LA, USA: IEEE Press; 2023. p. 1-12. https://doi.org/10.1109/ESEM56168.2023.10304853
12. Yadmani S.E., Gadyatskaya O., Zhauniarovich Y. The File That Contained the Keys Has Been Removed: An Empirical Analysis of Secret Leaks in Cloud Buckets and Responsible Disclosure Outcomes. In: 2025 IEEE Symposium on Security and Privacy (SP). San Francisco, CA, USA: IEEE Press; 2025. p. 3180-3198. https://doi.org/10.1109/SP61157.2025.00009
13. Rahman M.R., Imtiaz N., Storey M.A. et al. Why secret detection tools are not enough: It s not just about false positives An industrial case study. Empirical Software Engineering. 2022;27:59. https://doi.org/10.1007/s10664-021-10109-y
14. Saha A., Denning T., Srikumar V., Kasera S.K. Secrets in Source Code: Reducing False Positives using Machine Learning. In: 2020 International Conference on COMmunication Systems & NETworkS (COMSNETS). Bengaluru, India: IEEE Press; 2020. p. 168-175. https://doi.org/10.1109/COMSNETS48256.2020.9027350
15. Xu G., Qi C., Yu H., Xu S., Zhao C., Yuan J. Detecting Sensitive Information of Unstructured Text Using Convolutional Neural Network. In; 2019 International Conference on Cyber-Enabled Distributed Computing and Knowledge Discovery (CyberC). Guilin, China: IEEE Press; 2019. p. 474-479. https://doi.org/10.1109/CyberC.2019.00087
16. Aslan Ö., Aktuğ S.S., Ozkan-Okay M., Yilmaz A.A., Akin E. A Comprehensive Review of Cyber Security Vulnerabilities, Threats, Attacks, and Solutions. Electronics. 2023;12(6):1333. https://doi.org/10.3390/electronics12061333
17. Jebreel N.M., Domingo-Ferrer J., Sánchez D., Blanco-Justicia A. KeyNet: An Asymmetric Key-Style Framework for Watermarking Deep Learning Models. Applied Sciences. 2021;11(3):999. https://doi.org/10.3390/app11030999
18. D'Antoni L., Veanes M. Automata modulo theories. Communications of the ACM. 2021;64(5):86-95. https://doi.org/10.1145/3419404
19. Sadowski C., van Gogh J., Jaspan C., Söderberg E., Winter C. Tricorder: Building a Program Analysis Ecosystem. In: 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering. Florence, Italy: IEEE Press; 2015. p. 598-608. https://doi.org/10.1109/ICSE.2015.76
20. Bi T., Liang P., Tang A., Yang C. A systematic mapping study on text analysis techniques in software architecture. Journal of Systems and Software. 2018;144:533-558. https://doi.org/10.1016/j.jss.2018.07.055
21. Lebed S.V., Namiot D.E., Zubareva E.V., Khenkin P.V., Vorobeva A.A., Svichkar D.A. Large Language Models in Cyberattacks. Doklady Mathematics. 2024;110(Suppl2):S510-S520. https://doi.org/10.1134/S1064562425700012
22. Garbuzov G.V. Problems of definitions and setting goals for data leaks protection. International Journal of Open Information Technologies. 2024;12(5):185-191. (In Russ., abstract in Eng.) EDN: ZXVIYQ
23. Garbuzov G.V. Issues in Detecting Confidential Information Leaks in Unstructured Data. International Journal of Open Information Technologies. 2025;13(4):26-32. (In Russ., abstract in Eng.) EDN: HJLUXD
24. Babak N.G. Personal Data Recognition Using a Deep Learning Model. Modern Information Technologies and IT-Education. 2024;20(1):13-26. (In Russ., abstract in Eng.) https://doi.org/10.25559/SITITO.020.202401.13-26
25. Allamanis M., Barr E.T., Devanbu P., Sutton C. A Survey of Machine Learning for Big Code and Naturalness. ACM Computing Surveys. 2018;51(4):81. https://doi.org/10.1145/3212695

Это произведение доступно по лицензии Creative Commons «Attribution» («Атрибуция») 4.0 Всемирная.
Редакционная политика журнала основывается на традиционных этических принципах российской научной периодики и строится с учетом этических норм работы редакторов и издателей, закрепленных в Кодексе поведения и руководящих принципах наилучшей практики для редактора журнала (Code of Conduct and Best Practice Guidelines for Journal Editors) и Кодексе поведения для издателя журнала (Code of Conduct for Journal Publishers), разработанных Комитетом по публикационной этике - Committee on Publication Ethics (COPE). В процессе издательской деятельности редколлегия журнала руководствуется международными правилами охраны авторского права, нормами действующего законодательства РФ, международными издательскими стандартами и обязательной ссылке на первоисточник.
Журнал позволяет авторам сохранять авторское право без ограничений. Журнал позволяет авторам сохранить права на публикацию без ограничений.
Издательская политика в области авторского права и архивирования определяются «зеленым цветом» в базе данных SHERPA/RoMEO.
Все статьи распространяются на условиях лицензии Creative Commons «Attribution» («Атрибуция») 4.0 Всемирная, которая позволяет другим использовать, распространять, дополнять эту работу с обязательной ссылкой на оригинальную работу и публикацию в этом журналe.