一句话:提出「安全 mock」这一测试替身,使外部协作开发与测试中不会通过可观察行为泄露内部程序规格。
随着软件开发日益依赖外部协作,组织面临的不只是已部署软件的知识产权风险:即使源代码受保护,外部合作者仍可能通过观察开发与测试阶段中程序的行为,反推出敏感的内部程序规格,造成规格泄露。本文针对协作开发中经由行为观察导致的规格泄露问题,提出一种新的软件开发方法,其核心是经过特殊构造的测试替身——安全 mock(secure mock)。安全 mock 可在开发与测试中直接替换原组件,同时避免通过可观察行为暴露敏感的内部规格。作者形式化了安全 mock 的正确性条件,并把安全 mock 的构造问题定义为一个约束满足问题,其参数包括受保护的程序、开发规格以及安全策略。该方法支持与外部协作者开展安全的测试驱动开发(TDD),弥合了传统 TDD 风格之间的差距。文中还讨论了与外部开发者安全协作的意义,并给出自动化生成安全 mock 及其融入实际开发流水线的未来研究方向;摘要未报告实证评估结果。
As software development increasingly relies on external collaboration, organizations face new risks of intellectual property leakage beyond traditional concerns about deployed software. Even when the source code is protected, adversaries may infer sensitive internal program specifications by observing the program behavior during the development and testing phases.This paper addresses the problem of specification leakage through behavioral observation in collaborative software development. We propose a novel software development method that centers on specially crafted test doubles referred to as secure mocks. Secure mocks serve as drop-in replacements for original components during development and testing while preventing the exposure of sensitive internal specifications through observable behavior. We formalize the correctness conditions for secure mocks and define the secure mock construction problem as a constraint satisfaction problem parameterized by the program to protect, the development specification, and a security policy. Our approach enables secure test-driven development (TDD) with external collaborators, bridging the gap between traditional TDD styles. We discuss the implications for secure collaboration with external developers and outline future research directions for automating secure mock generation and integrating this paradigm into real-world development pipelines.
DOI 原文 ·
@inproceedings{paperbot9501,
title = {A Secure Mocking Approach towards Software Supply Chain Security},
author = {Daisuke Yamaguchi and Shinobu Saito and Takuya Iwatsuka and Nariyoshi Chida and Tachio Terauchi},
booktitle = {ASE},
year = {2025},
doi = {10.1109/ase63991.2025.00352}
}