arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.05605cs.SE
收藏

一种识别源代码中安全控制措施的新方法

A Novel Approach to Identify Security Controls in Source Code

Ahmet Okutan, Ali Shokri, Viktoria Koscinski, Mohamad Fazelinia, Mehdi Mirakhorli

AI总结:

本文利用 StackOverflow 代码片段构建安全控制数据集,并结合 BERT 与 Tactic Detector 识别源代码中的安全战术实现,F-Measure 超过 0.9。

摘要:

“设计即安全”(Secure by Design)已成为确保软件系统不易遭受网络攻击的主流开发方法。在整个软件开发生命周期中,需要谨慎监控架构层面的安全控制措施,以避免严重的设计缺陷。遗憾的是,功能性需求通常会妨碍安全特性,开发团队可能无法正确处理关键的安全需求。识别软件项目中与安全战术相关的代码片段,有助于高效审查安全控制措施的实现,并构建具有韧性的软件架构。本文列举了一份全面的常用安全控制措施清单,并通过从 StackOverflow 问答平台的开放 API 提取相关及不相关的代码片段,为其中每一项安全控制措施创建数据集。研究采用最先进的 NLP 技术 Bidirectional Encoder Representations from Transformers(BERT,来自 Transformer 的双向编码器表示)以及我们先前工作中的 Tactic Detector(战术检测器),证明实现安全控制措施的代码片段能够以高置信度被识别出来。结果表明,我们在源自 StackOverflow 的战术相关与不相关代码片段上训练的模型,能够识别与战术相关的代码片段,其 F-Measure 值高于 0.9。

英文摘要:

Secure by Design has become the mainstream development approach ensuring that software systems are not vulnerable to cyberattacks. Architectural security controls need to be carefully monitored over the software development life cycle to avoid critical design flaws. Unfortunately, functional requirements usually get in the way of the security features, and the development team may not correctly address critical security requirements. Identifying tactic-related code pieces in a software project enables an efficient review of the security controls' implementation as well as a resilient software architecture. This paper enumerates a comprehensive list of commonly used security controls and creates a dataset for each one of them by pulling related and unrelated code snippets from the open API of the StackOverflow question and answer platform. It uses the state-of-the-art NLP technique Bidirectional Encoder Representations from Transformers (BERT) and the Tactic Detector from our prior work to show that code pieces that implement security controls could be identified with high confidence. The results show that our model trained on tactic-related and unrelated code snippets derived from StackOverflow is able to identify tactic-related code pieces with F-Measure values above 0.9.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑