Huawei Open Source Governance Practice Sharing

On December 28, 2022, the 2nd Global DevSecOps Agile Security Conference (DSO 2022) was successfully held through a global live broadcast. The theme of this conference is " Symbiosis, Agility, Evolution ", with the mission of "Agile Symbiosis, Safeguarding the Security of China's Software Supply Chain", based on a global perspective, bringing together top technical experts, industry opinion leaders, Senior scholars, think tanks, and representatives of corporate elites will focus on new technologies, new trends, and new practices in the three typical application scenarios of DevSecOps agile security, software supply chain security, and cloud-native security.

At the meeting, Zheng Zhiqiang, a network security expert from Huawei Cloud Computing Technology Co., Ltd., introduced Huawei's open source governance practices in detail, providing practical reference for enterprises that also face open source security issues.

Figure 1 Zheng Zhiqiang, network security expert of Huawei Cloud Computing Technology Co., Ltd.

Click to play→Huawei Open Source Governance Practice Sharing

The following is the transcript of the speech:

Hello everyone, I am Zheng Zhiqiang, a network security expert from Huawei Cloud PaaS Service Product Department. I am very happy to participate in the 2nd Global DevSecOps Agile Security Conference hosted by Xuanjing Security, and take this opportunity to share Huawei's open source governance practices.

Open source and third-party software governance goals

The core of managing open source and third-party software is to ensure that they are safe and reliable and can be used legally and compliantly. The specific control contents can be summarized as the following goals:

01

reliable source

It is required to obtain reliable open source and third-party software from the official community official website, supplier official website or manufacturer official website; or be provided by suppliers or partners; the software needs to have a clear license or have signed a relevant use agreement;

02

cyber security

Model selection and application evaluation, closed-loop vulnerability management (collection, distribution, processing, early warning) and security issue handling are required;

03

legal compliance

Use according to license requirements or authorized by suppliers to avoid legal risks caused by intellectual property rights and licenses; use some open source software to fulfill open source obligations, and pay attention to avoid causing open source products or damage to the company's reputation;

04

Traceable

Material management is required for all open source and third-party software used. Once a security incident occurs, the problem software or products containing problem software can be quickly located, so as to perform faster and better repair work;

05

Normalization/Lifecycle Management

Normalize when software is introduced, establish an optimal library/roadmap library, reduce the type and quantity; ensure the safety of open source and third-party software throughout the life cycle.

Classic cases of open source and third-party software

However, if one of the above objectives cannot be guaranteed, serious risks or consequences are likely to arise.

在Xcode事件中,由于开发者使用了非官方渠道下载的Xcode,导致开发的应用在编译之后含有恶意代码,这反映了确保软件来源可靠的重要性。

在Log4j事件中,开源安全漏洞传播快、影响大的特点被进一步体现,快速排查引入相关开源组件的产品并进行修复是降低影响的关键,这体现了网络安全管控的重要性。

合法合规同样重要。CISCO公司的Linksys无线路由器由于使用了基于GPL协议的开源代码却未履行相对应的开源义务,被FSF(自由软件基金会)起诉,最终只能开放全部源代码。这也警示了其他企业,要根据自身产品形态选择合适的开源软件。

可追溯既是客户要求,也是自身防范要求。分享一个案例,某产品发布包中有录屏软件,被客户通过病毒扫描查出,政府安全官介入干预,然而产品团队却不清楚录屏软件是何时由何人引入的。因而所有用到的开源及第三方软件都必须有记录,对其进行的修改有管控,一旦需要检查或者修复问题时,便可通过可追溯机制实现快速定位。

众所周知,随着引入的开源及第三方软件数量的增加,管理成本也会同时急剧上涨。某运营商发现某产品中引入的200+开源软件是社区发布超过五年的老版本,导致产品线大力整改,耗费了巨大的人力和时间成本。针对这一情况,归一化是一种很好的解决方法,能在满足业务需求的前提下降低开源及第三方软件软件数量。

人们普便重视软件开发过程中的开源及第三方软件管理,却往往忽略软件全生命周期中的其他环节。2011年索尼公司因为使用了老版本Tomcat,没及时与社区版本同步,导致黑客通过公开漏洞击破PlayStation用户系统,造成7000万个人用户资料泄露。

华为开源及第三方软件管控流程

以上经典案例充分说明开源治理的重要性,华为针对开源及第三方软件进行了全流程的管控。

图2 华为开源及第三方软件管理流程

华为在产品研发乃至全生命周期阶段,从选型、入库到开发阶段的使用申请、安全扫描,再到发布过程中的二进制扫描以及运维阶段对最新漏洞的跟踪排查,针对开源及第三方软件都有相应的管理规范和要求。我们也会定期对老旧开源软件进行等级评定并基于退出机制进行管控。

● 开源入库流程

入库流程共分为四个阶段,开源软件只有通过所有阶段的全部审核项才能够正式进行入库:

01

前置工作

确定软件类型、选型评估合适的开源软件;

02

提交申请

填写软件及版本信息、以软件版本维度启动审批流程;

03

TMG成员预审

触发其他业务发表意见例如法务代表、安全代表等,搜集意见并发表预审意见;

04

TMG组长终审

触发其他TMG成员发表意见,搜集意见并发表终审意见。

● 开源使用及认证流程

产品线员工在开发软件时如果要求使用库里的开源软件必须填写使用申请。后台基于申请会进行一系列评估,判断员工所要求使用的开源软件是否与产品形态相符。

申请通过后,华为相关平台也会持续对引入的开源软件进行管控。在开发阶段,会针对开源软件进行源码成分分析,检测是否存在漏洞片段以及是否满足开源许可和头文件声明,确保开源软件引用的合法合规。在测试阶段,会针对构建的二进制包进行成分分析,检查安全配置、开源合规问题、安全编译选项以及敏感信息。值得一提的是,在开发阶段已进行源码扫描,为何还需要进行二进制成分分析?因为构建环境可能存在安全问题,例如此前提及的Xcode被污染,就会导致由健康的源码构建而成的二进制包携带恶意代码,所以必须确保二进制包的安全。

整个管控流程是基于平台实现自动化运作。产品一旦在某一环节不符合要求,就会被返回整改,直到满足所有环节要求才能进入到发布阶段。

华为开源漏洞响应处理流程

针对开源漏洞应急响应,华为也有一套专门的管控流程以及相对应的规范要求。

图3 华为开源漏洞响应流程

整个开源漏洞响应流程是闭环且不断迭代的,共分为五个阶段:

01

漏洞获取

通过漏洞感知接受和收集开源软件漏洞;

02

漏洞生成

漏洞生成并录入华为漏洞库;

03

漏洞分析

专业人员对漏洞机理、等级、影响面等进行分析,进而排查受影响的产品;

04

漏洞修复

后台会通知开发人员对产品的漏洞进行修复;

05

漏洞发布

开发人员完成修复工作后,在升级产品版本的同时会同时发布漏洞修复情况。

在华为内部,开源软件Owner和产品经理是开源软件维护的责任主体,主要看护开源软件优选级别及开源漏洞修复流程,但两者侧重点不同。开源软件Owner主要负责开源新版本选型、软件版本停止维护决策、开源新版本上仓、漏洞影响分析、漏洞补丁上仓以及修复版本上仓。产品经理主要负责版本升级风险评估、修复版本集成与验证、消减措施落地评估以及消减措施落地与验证。

华为开源及第三方工程实践

最后与大家分享华为云研发安全服务。华为云研发安全服务包含从安全设计、隐私合规、代码检查、成分分析到安全测试整个过程,在每个阶段都配有相应的平台和自动化流程来支撑产品研发。

以成分分析为例,华为提供自研的、针对于源码和二进制软件包的成分分析能力,用于研发阶段针对于开源组件的安全和合规检测。其中二进制成分分析能力已通过信通院可信开源治理工具评估,支持针对于软件包的检查包括Linux、Windows、IoT固件包、安卓和鸿蒙应用等,支持C、C++、Java、Python、JS、Rust等主流编程语言,支持安全编译选项、安全配置、典型编码问题、敏感信息泄露、开源组件License、开源漏洞等检查。

以上是我分享的全部内容,感谢大家。

转载自悬镜安全:https://mp.weixin.qq.com/s/v6te4LMJCcxyPwS4FiX27Q

Guess you like

Origin blog.csdn.net/qq_18209847/article/details/128659176