軟體組成分析

軟體組成分析(英語:Software composition analysis;簡稱SCA)是針對軟體的分析,偵測是否有使用開放原始碼(open source)組件,軟體組件是否是最新版本,是否有會影響安全的缺陷,或是其中有需要授權(licensing)才能合法使用的組件[1]

SCA產品的運作方式如下[2]

  • 應用程式會掃描程式碼,及編譯軟體會用到的相關檔案。
  • 應用程式會識別開源組件以及其版本,會在掃描的應用程式目錄中建立資料庫,其中有開源軟體的列表。
  • 接下來會將列表和另一個儲存組件已知安全漏洞、授權需求以及組件歷史版本的資料庫比對[3],在偵測安全漏洞時,會和公共漏洞和暴露(CVE)比對,此資料庫也是美國國家漏洞資料庫英语National Vulnerability Database(NVD)追蹤的資料。有些軟體有額外的專屬漏洞資料庫。在確認智慧財產權(IP)或是法規合規( Legal Compliance)議題時,SCA產品會搜尋開源組件的授權資訊,並且加以評估[4]。有些組件是源自常用的開源存儲庫(像是GitHubMavenPyPINuGet等),會用開源存儲庫識別出這些組件以及其版本。
  • 會用上述分析結果,轉換為不同的數位格式讓終端使用者使用。其內容和格式依SCA產品而定,可能會包括評估及處理風險的指南,若是有正常版或是較寬鬆版Copyleft授權的需求,也會有建議作法。輸出也會包括軟體材料表(SBOM),其中會列出應用程式中的所有組件、版本及相關資訊,其中也會包括開源組件[5]

開放原始碼模組以及其風險编辑

在軟體開發過程中,常會使用不同的組件來進行開發[6]。使用软件组件可以將複雜的較大組件分割成較小的程式碼,增加靈活性,以後也可以配合新的需求而復用(reuse)這些組件[7]。在1990年代末,開放原始碼軟體(OSS)開始流行,此作法應用得更廣,也可以加速軟體開發時程,縮短產品上市時間[8]

不過,使用開源軟體也為應用程式引入了風險,風險可以分為以下五類[9]

  • 開源軟體版本控制:導入新版本時,可能會有軟體變更造成的風險。
  • 安全性:組件漏洞的風險(CVE)。
  • 授權:智慧財產(IP)法律要求的風險。
  • 開發:已有代碼以及開源軟體之間的相容性風險。
  • 支持:文件化(documentation)不足或是軟體組件過期英语Obsolescence的風險。

开放源代码促进会在1998年2月建立之後不久[10],也有人注意到開源軟體相關的風險[11],各組織就試著用試算表以及文件來追蹤開發者所使用的開源組件,設法進行管理[12]

對於密集使用開源組件的組織,需要自動化開源風險的分析及管理。因此產生了幫助組織管理開源風險的軟體,稱為軟體組成分析(Software Composition Analysis, SCA)。SCA設法偵測軟體應用程式中有的所有第三方組件,減少相關安全漏洞、IP授權需求、及軟體過期的相關風險。

用法编辑

組織中的不同部門裡,SCA會有不同的用途。依組織的大小以及結構不同,會使用SCA的部門也會不同。IT部門會用SCA,和共同利害相關者(包括資訊長CIO、技術長CTO以及主企業架構師 Chief Enterprise Architects)來實現及運作相關技術。安全和授權的資料會讓資安長(Chief Information Security Officers, CISO)確定安全風險,由Chief IP officer或首席合規官(Chief Compliance officer)處理智慧財產權的風險[13]

有些SCA產品可以和開發產品時會使用的整合開發環境(IDE)整合,也有些SCA產品會是軟體品質控制英语software quality contro流程中的一個步驟[14][15]

SCA產品(特別是其產生軟體材料表的能力)在一些國家(例如美國)是必要的,若要販售軟體給美國政府,軟體供應商,需要提供軟體材料表[16]

另一個使用SCA的情境是在技術的盡責查證。在開始併購(M&A)流程前,需由獨立諮詢公司英语Independent advisory firm審核目標團隊軟體相關的風險[17]

SCA的優點编辑

SCA產品自動化的特點是其主要優點。開發者使用及整理開源組件時,不需另外花費心力整理資料[18]

SCA的缺點编辑

目前SCA的產品有以下的缺點:

  • 複雜及費心力的配置,可能需要花幾個月才能完全正常運作[19]
  • 每一個SCA產品都有其專屬的開源組件資料庫,在大小以及覆蓋率上有很大的差異[20]
  • 會把漏洞資料限制在只在NVD上公開報告的資料(可能是在發現漏洞後數個月才會公開報告)[21]
  • 在依照SCA報告所採取的行動上,沒有自動化的指南[22]
  • 在開源軟體授權的法律要求上,沒有對應的指引[23]

相關條目编辑

參考資料编辑

  1. ^ Prana, Gede Artha Azriadi; Sharma, Abhishek; Shar, Lwin Khin; Foo, Darius; Santosa, Andrew E; Sharma, Asankhaya; Lo, David. Out of sight, out of mind? How vulnerable dependencies affect open-source projects. Empirical Software Engineering (Springer). July 2021, 26 (4): 1–34 [2023-11-11]. S2CID 197679660. doi:10.1007/s10664-021-09959-3. (原始内容存档于2023-12-25). 
  2. ^ Ombredanne, Philippe. Free and Open Source Software License Compliance: Tools for Software Composition Analysis. Computer (IEEE). October 2020, 53 (10): 262–264 [2023-11-11]. S2CID 222232127. doi:10.1109/MC.2020.3011082 . (原始内容存档于2024-04-12). 
  3. ^ 10 Types of Application Security Testing Tools: When and How to Use Them. 2018-07-08 [2023-11-11]. (原始内容存档于2023-09-25). 
  4. ^ Duan, Ruian; Bijlani, Ashish; Xu, Meng; Kim, Taesoo; Lee, Wenke. Identifying Open-Source License Violation and 1-day Security Risk at Large Scale. Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security. ACM. 2017: 2169–2185 [2023-11-11]. ISBN 9781450349468. S2CID 7402387. doi:10.1145/3133956.3134048. (原始内容存档于2022-09-02). 
  5. ^ Arora, Arushi; Wright, Virginia; Garman, Christina. Strengthening the Security of Operational Technology: Understanding Contemporary Bill of Materials (PDF). JCIP the Journal of Critical Infrastructure Policy. 2022: 111 [2023-11-11]. (原始内容存档 (PDF)于2024-01-07). 
  6. ^ Nierstrasz, Oscar; Meijler, Theo Dirk. Research directions in software composition. ACM Computing Surveys (ACM). 1995, 27 (2): 262–264. S2CID 17612128. doi:10.1145/210376.210389 . 
  7. ^ Nierstrasz, Oscar; Dami, Laurent. Object-oriented software composition. Prentice Hall International (UK) Ltd. January 1995: 3–28. CiteSeerX 10.1.1.90.8174 . 
  8. ^ De Hoon, Michiel JL; Imoto, Seiya; Nolan, John; Miyano, Satoru. Open source clustering software. Bioinformatics (Oxford University Press). February 2004: 1453–1454. CiteSeerX 10.1.1.114.3335 . 
  9. ^ Duc Linh, Nguyen; Duy Hung, Phan; Dipe, Vu Thu. Risk Management in Projects Based on Open-Source Software. Proceedings of the 2019 8th International Conference on Software and Computer Applications. 2019: 178–183 [2023-11-11]. ISBN 9781450365734. S2CID 153314145. doi:10.1145/3316615.3316648. (原始内容存档于2022-11-07). 
  10. ^ History of the OSI. Opensource.org. 2006-09-19 [2023-11-11]. (原始内容存档于2012-07-26). 
  11. ^ Payne, Christian. On the security of open source software (PDF). Information Systems Journal. 2002, 12: 61–78 [2023-11-11]. S2CID 8123076. doi:10.1046/j.1365-2575.2002.00118.x. (原始内容存档 (PDF)于2023-05-31). 
  12. ^ Kaur, Sumandeep. Security Issues in Open-Source Software (PDF). International Journal of Computer Science & Communication. April 2020: 47–51 [2023-11-11]. (原始内容存档 (PDF)于2023-05-31). 
  13. ^ Popp, Karl Michael. Best Practices for commercial use of open source software. BoD – Books on Demand, 2019. 2019-10-30: 10 [2023-11-11]. ISBN 9783750403093. (原始内容存档于2023-11-11). 
  14. ^ Imtiaz, Nasif; Thorn, Seaver; Williams, Laurie. A comparative study of vulnerability reporting by software composition analysis tools. Proceedings of the 15th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM). ACM. 2021-10: 1–11 [2023-11-11]. ISBN 9781450386654. S2CID 237346987. arXiv:2108.12078 . doi:10.1145/3475716.3475769. (原始内容存档于2023-01-19). 
  15. ^ Sun, Xiaohan; Cheng, Yunchang; Qu, Xiaojie; Li, Hang. Design and Implementation of Security Test Pipeline based on DevSecOps. 2021 IEEE 4th Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC) 4. IEEE. 2021-06: 532–535 [2023-11-11]. ISBN 978-1-7281-8535-4. S2CID 236193144. doi:10.1109/IMCEC51613.2021.9482270. (原始内容存档于2021-08-12). 
  16. ^ Software Bill of Materials Elements and Considerations. [2023-11-11]. (原始内容存档于2022-12-08). 
  17. ^ Serafini, Daniele; Zacchiroli, Stefano. Efficient Prior Publication Identification for Open Source Code. The 18th International Symposium on Open Collaboration 4. ACM. September 2022-08: 1–8 [2023-11-11]. ISBN 9781450398459. S2CID 251018650. arXiv:2207.11057 . doi:10.1145/3555051.3555068. (原始内容存档于2023-01-19). 
  18. ^ Chen, Yang; Santosa, Andrew E; Sharma, Asankhaya; Lo, David. Automated identification of libraries from vulnerability data. Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering: Software Engineering in Practice. 2020-09: 90–99 [2023-11-11]. ISBN 9781450371230. S2CID 211167417. doi:10.1145/3377813.3381360. (原始内容存档于2023-11-14). 
  19. ^ Rajapakse, Roshan Namal; Zahedi, Mansooreh; Babar, Muhammad Ali. An Empirical Analysis of Practitioners' Perspectives on Security Tool Integration into DevOps. Proceedings of the 15th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM). 2021: 1–12 [2023-11-11]. ISBN 9781450386654. S2CID 235731939. arXiv:2107.02096 . doi:10.1145/3475716.3475776. (原始内容存档于2023-05-31). 
  20. ^ Imtiaz, Nasif; Thorn, Seaver; Williams, Laurie. A comparative study of vulnerability reporting by software composition analysis tools. Proceedings of the 15th ACM / IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM). 2021: 1–11 [2023-11-11]. ISBN 9781450386654. S2CID 237346987. arXiv:2108.12078 . doi:10.1145/3475716.3475769. (原始内容存档于2022-11-09). 
  21. ^ Component Analysis. owasp.org. [2023-11-11]. (原始内容存档于2023-12-20). 
  22. ^ Foo, Darius; Chua, Hendy; Yeo, Jason; Ang, Ming Yi; Sharma, Asankhaya. Efficient static checking of library updates. Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering. 2018: 791–796 [2023-11-11]. ISBN 9781450355735. S2CID 53079466. doi:10.1145/3236024.3275535. (原始内容存档于2022-11-11). 
  23. ^ Millar, Stuart. Vulnerability Detection in Open Source Software: The Cure and the Cause (PDF). Queen's University Belfast. 2017-11 [2023-11-11]. (原始内容存档 (PDF)于2024-02-06). 

外部連結编辑