Robustness tests for tool-using agents often change the agent's environment, for example by hiding a hostile note in an invoice, and then judge the agent by what it does. The result tells us about the original task only if the changed test case is still a valid test of that task. Many evaluations decide this with weak rules, such as accepting any well-formed edit or any edit that stays close to the original in embedding space. We propose executable task contracts. A contract states which facts define a task, which edits are allowed, and what finishing the task means, and it checks each changed test case before the agent runs. We compare validity rules by scoring the same 14,336 stored agent runs under each rule. Across four encoders, embedding thresholds allowed 75-100% of edits that changed the task, such as swapping the payee, yet rejected 24-45% of valid hostile notes. With a MiniLM cosine threshold, Mistral appeared vulnerable on all 64 tasks, but only 26 had a successful valid attack. Replaying a saved solution and allowing edits to benchmark fields fail in similar ways. Evaluations should state, and check, what counts as the same task.
Beihang University(北京航空航天大学);Shanghai Jiao Tong University(上海交通大学);Peking University(北京大学);Minzu University of China(中央民族大学);Zhongguancun Academy(中关村科学院)
Building Executable Secure Design Models for Smart Contracts with Formal Methods
智能合约之所以有吸引力,是因为它们是各方之间的自动执行的商业协议,具有预定义和不可变的义务和权利。然而,与所有软件一样,智能合约可能因设计缺陷而包含漏洞,其中一方可能会利用这些漏洞来欺骗其他方。在本文中,我们展示了一种使用形式化方法为智能合约构建安全设计模型的系统方法。为了构建安全模型,我们首先将参与方的行为建模为状态机,然后,我们对预定义的合同义务和权利进行建模,这些合同规定了状态机之间的交互以实现业务目标。在此之后,我们在TLA+(动作的时间逻辑)中说明了可执行的安全模型设计模式,以在设计层面上针对状态机和义务和权利方面的众所周知的智能合约漏洞。这些漏洞存在于以太坊合约中,包括Call to the unknown、Gasless send、Reentrancy、Lost in the transfer和Unpredictable state。由此产生的TLA+规范称为安全模型。我们说明了我们的方法来检测在设计层面上使用房地产合同的例子的漏洞。
Skill Drift Is Contract Violation: Proactive Maintenance for LLM Agent Skill Libraries
Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学人工智能学院 Gallagher 学院);King Abdullah University of Science and Technology(国王 Abdullah 科学与技术大学)
Knowledge Over Parameters: Evolving Smart Contract Vulnerability Detection
Nanyang Technological University(南洋理工大学);Nankai University(南开大学);University of California, Los Angeles(加州大学洛杉矶分校);Imperial College London(伦敦帝国学院);Singapore Management University(新加坡管理大学)