SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.21936 · ICLR · 2025

RedTeamCUA: Realistic Adversarial Testing of Computer-Use Agents in Hybrid Web-OS Environments

Huan Sun, Yuting Ning, Yu Su, Zeyi Liao, Jaylen Jones, Linxi Jiang, Eric Fosler-Lussier, Zhiqiang Lin

arXiv · PDF · Open in the Atlas

Code that ran

14 of 17 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 11 have no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2505.21936.json · badge: /api/ran/2505.21936.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
osu-nlp-group/redteamcua canonical (classifier label)
classifier basis not recorded on the link
14 ran · 3 no recorded run
FunctionStatusWhere it lives
contains_to_be_replaced Ran
ran on a synthesized input
osu-nlp-group/redteamcua/desktop_env/desktop_env.py
code served (permissive licence) · get_code("dd19517ad337793c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

def contains_to_be_replaced(config_list):

    def check_value(value):
        if isinstance(value, str):
            return 'TO_BE_REPLACED' in value
        elif isinstance(value, dict):
            return any((check_value(v) for v in value.values()))
        elif isinstance(value, list):
            return any((check_value(item) for item in value))
        return False
    return check_value(config_list)


# Test case 1: config_list with TO_BE_REPLACED in a string
config_1 = {
    "model_path": "TO_BE_REPLACED",
    "learning_rate": 0.001
}

# Test case 2: config_list with TO_BE_REPLACED nested in a dict
config_2 = {
    "outer": {
        "inner": "TO_BE_REPLACED"
    },
    "value": 42
}

# Test case 3: config_list with TO_BE_REPLACED in a list
config_3 = {
    "paths": ["path1", "TO_BE_REPLACED", "path3"],
    "settings": {"key": "value"}
}

# Test case 4: config_list without TO_BE_REPLACED
config_4 = {
    "model": "resnet",
    "batch_size": 32,
    "layers": [1, 2, 3]
}

# Use the simplest test case
ARGS = {
    "config_list": config_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
convert_for_openai_cua_utlis_1 Ran
ran on a synthesized input
osu-nlp-group/redteamcua/mm_agents/utils.py
code served (permissive licence) · get_code("4fef53fda30d97b0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'messages': [
        {
            'content': [
                {
                    'type': 'text',
                    'text': 'Hello world'
                },
                {
                    'type': 'image_url',
                    'image_url': {'url': 'https://example.com/image.jpg'}
                }
            ]
        },
        {
            'content': [
                {
                    'type': 'text',
                    'text': 'Second message'
                }
            ]
        }
    ],
    'use_last': False,
    'to_return': 'image_and_text'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
encode_image Ran
ran; our contract draft was wrong, not the code
osu-nlp-group/redteamcua/mm_agents/agent.py
code served (permissive licence) · get_code("78ee6b46cebd99ee")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import base64

# The function encode_image takes image_content (bytes) and base64 encodes it
# We need to provide bytes as the image_content parameter

image_content = b"This is sample image data in bytes format"

ARGS = {
    "image_content": image_content
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
encoded_img_to_pil_img Ran
ran, honoured the contract we drafted
osu-nlp-group/redteamcua/mm_agents/agent.py
code served (permissive licence) · get_code("4f7312030f5ef2a1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned PngImageFile. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import base64
from io import BytesIO
from PIL import Image
import numpy as np

# Create a small test image
img_array = np.random.randint(0, 256, (10, 10, 3), dtype=np.uint8)
pil_img = Image.fromarray(img_array)

# Encode it to base64
buffer = BytesIO()
pil_img.save(buffer, format='PNG')
img_data = base64.b64encode(buffer.getvalue()).decode('utf-8')
encoded_data_str = f'data:image/png;base64,{img_data}'

ARGS = {
    'data_str': encoded_data_str
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PngImageFile — a PngImageFile output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PngImageFile output the recorded ndim 3 and dtype family int describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
escape_single_quotes Ran
ran on a synthesized input
osu-nlp-group/redteamcua/mm_agents/uitars_agent.py
code served (permissive licence) · get_code("07fd593c156d2586")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def escape_single_quotes(text):
    pattern = "(?<!\\\\)'"
    return re.sub(pattern, "\\\\'", text)

ARGS = {
    "text": "hello 'world' and \\'already escaped' and more 'quotes'"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_after_first_non_false Ran
ran on a synthesized input
osu-nlp-group/redteamcua/lib_run_single.py
code served (permissive licence) · get_code("c40d62d4d4511695")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function takes two lists and processes them
# listA should be a list of strings (since it calls '\n'.join on a slice of it)
# listB should be a list where elements can be False or non-False values

listA = ["apple", "banana", "cherry", "date", "elderberry"]
listB = [False, "something", False, "another", False]

ARGS = {
    "listA": listA,
    "listB": listB,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
if_cua Ran
ran on a synthesized input
osu-nlp-group/redteamcua/lib_run_single.py
code served (permissive licence) · get_code("cc62b17f6716adda")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# The function if_cua only checks if 'cua' or 'computer-use-preview' 
# is in the model_name string, so model_name must be a string

ARGS = {
    'model_name': 'claude-3-5-sonnet-cua'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
index_of_false_after_last_true Ran
ran on a synthesized input
osu-nlp-group/redteamcua/lib_run_single.py
code served (permissive licence) · get_code("5b111116d2c99923")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

def index_of_false_after_last_true(lst):
    last_true_index = -1
    for i in range(len(lst) - 1, -1, -1):
        if lst[i] is True:
            last_true_index = i
            break
    if last_true_index == -1 or last_true_index + 1 >= len(lst):
        return -1
    if lst[last_true_index + 1] is False:
        return last_true_index + 1
    return -1

ARGS = {
    "lst": [False, True, False]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_action Ran
ran on a synthesized input
osu-nlp-group/redteamcua/mm_agents/uitars_agent.py
code served (permissive licence) · get_code("c242cf8145d74b19")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import ast

def parse_action(action_str):
    try:
        node = ast.parse(action_str, mode='eval')
        if not isinstance(node, ast.Expression):
            raise ValueError('Not an expression')
        call = node.body
        if not isinstance(call, ast.Call):
            raise ValueError('Not a function call')
        if isinstance(call.func, ast.Name):
            func_name = call.func.id
        elif isinstance(call.func, ast.Attribute):
            func_name = call.func.attr
        else:
            func_name = None
        kwargs = {}
        for kw in call.keywords:
            key = kw.arg
            if isinstance(kw.value, ast.Constant):
                value = kw.value.value
            elif isinstance(kw.value, ast.Str):
                value = kw.value.s
            else:
                value = None
            kwargs[key] = value
        return {'function': func_name, 'args': kwargs}
    except Exception as e:
        print(f"Failed to parse action '{action_str}': {e}")
        return None


ARGS = {
    'action_str': 'my_function(param1=42, param2="hello")'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
replace_in_dict Ran
ran on a synthesized input
osu-nlp-group/redteamcua/generate_config.py
code served (permissive licence) · get_code("d25267c119a9a895")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def sub_url(url: str, target_url: str=''):
    url = re.sub('__REDDIT__', 'TO_BE_REPLACED_URL' + ':9999', url)
    url = re.sub('__ROCKETCHAT__', 'TO_BE_REPLACED_URL' + ':3000', url)
    url = re.sub('__OWNCLOUD__', 'TO_BE_REPLACED_URL' + ':8092', url)
    url = re.sub('__TARGET_URL__', target_url, url)
    return url

def replace_in_dict(data, target_url: str=''):
    if isinstance(data, dict):
        return {key: replace_in_dict(val, target_url) for key, val in data.items()}
    elif isinstance(data, list):
        return [replace_in_dict(item, target_url) for item in data]
    elif isinstance(data, tuple):
        return tuple((replace_in_dict(item, target_url) for item in data))
    elif isinstance(data, str):
        return sub_url(data, target_url)
    else:
        return data

ARGS = {
    'data': {
        'reddit_url': '__REDDIT__',
        'rocketchat_url': '__ROCKETCHAT__',
        'owncloud_url': '__OWNCLOUD__',
        'target_placeholder': '__TARGET_URL__',
        'nested': {
            'list_data': ['__REDDIT__', '__ROCKETCHAT__'],
            'tuple_data': ('__OWNCLOUD__', '__TARGET_URL__'),
            'int_data': 42,
            'str_data': 'plain string'
        }
    },
    'target_url': 'https://example.com'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
replace_in_dict Ran
ran on a synthesized input
osu-nlp-group/redteamcua/desktop_env/desktop_env.py
code served (permissive licence) · get_code("e76e7ed02caf688c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def sub_url(url: str, to_be_replaced, replacement):
    url = re.sub(to_be_replaced, replacement, url)
    return url

def replace_in_dict(data, to_be_replaced, replacement):
    if isinstance(data, dict):
        return {key: replace_in_dict(val, to_be_replaced, replacement) for key, val in data.items()}
    elif isinstance(data, list):
        return [replace_in_dict(item, to_be_replaced, replacement) for item in data]
    elif isinstance(data, tuple):
        return tuple((replace_in_dict(item, to_be_replaced, replacement) for item in data))
    elif isinstance(data, str):
        return sub_url(data, to_be_replaced, replacement)
    else:
        return data

ARGS = {
    "data": {
        "url": "https://example.com/path",
        "nested": {
            "link": "http://test.org/file.txt",
            "value": 42
        },
        "items": [
            "https://site1.com",
            "https://site2.com",
            ("https://tuple.com", "regular_string")
        ]
    },
    "to_be_replaced": r"https?://",
    "replacement": "https://"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
save_to_tmp_img_file Ran
ran; our contract draft was wrong, not the code
osu-nlp-group/redteamcua/mm_agents/agent.py
code served (permissive licence) · get_code("32fccbc780176119")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import base64
import os
import tempfile
from io import BytesIO
from PIL import Image
import numpy as np

# Create a small test image
img_array = np.random.randint(0, 256, (10, 10, 3), dtype=np.uint8)
img = Image.fromarray(img_array)

# Convert image to base64 string
img_buffer = BytesIO()
img.save(img_buffer, format='PNG')
img_buffer.seek(0)
img_base64 = base64.b64encode(img_buffer.read()).decode('utf-8')
data_str = f'data:image/png;base64,{img_base64}'

ARGS = {
    'data_str': data_str
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sub_url Ran
ran on a synthesized input
osu-nlp-group/redteamcua/generate_config.py
code served (permissive licence) · get_code("5a4da0404bbcddce")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def sub_url(url: str, target_url: str=''):
    url = re.sub('__REDDIT__', 'TO_BE_REPLACED_URL' + ':9999', url)
    url = re.sub('__ROCKETCHAT__', 'TO_BE_REPLACED_URL' + ':3000', url)
    url = re.sub('__OWNCLOUD__', 'TO_BE_REPLACED_URL' + ':8092', url)
    url = re.sub('__TARGET_URL__', target_url, url)
    return url

ARGS = {
    'url': 'http://__REDDIT__/api/endpoint?redirect=__TARGET_URL__',
    'target_url': 'https://example.com'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sub_url Ran
ran on a synthesized input
osu-nlp-group/redteamcua/desktop_env/desktop_env.py
code served (permissive licence) · get_code("83ff3db48d9cd80e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def sub_url(url: str, to_be_replaced, replacement):
    url = re.sub(to_be_replaced, replacement, url)
    return url

ARGS = {
    "url": "https://example.com/path?param=value&other=test",
    "to_be_replaced": r"\?.*",
    "replacement": ""
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_server_ready_owncloud Not yet run
unverified (harvested, no recorded run)
osu-nlp-group/redteamcua/adv/TheAgentCompany_OwnCloud/if_ready.py
code served (permissive licence) · get_code("d9192f36701dca7f")
How it ran

no invocation recorded.

convert_for_claude_cua Not yet run
unverified (harvested, no recorded run)
osu-nlp-group/redteamcua/mm_agents/utils.py
code served (permissive licence) · get_code("e47e7307e8ebecb9")
How it ran

no invocation recorded.

parse_action_qwen2vl Not yet run
unverified (harvested, no recorded run)
osu-nlp-group/redteamcua/mm_agents/uitars_agent.py
code served (permissive licence) · get_code("3c2d222360a65466")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 2 the same month, 3 later) and 12 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
encode_image 4 other papers
2 dated earlier, 2 later
2404.07972 (2024-04)
OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environments
2407.10956 (2024-07)
Spider2-V: How Far Are Multimodal Agents From Automating Data Science and Engineering Workflows?
2510.04039 (2025-10)
GUI-Spotlight: Adaptive Iterative Focus Refinement for Enhanced GUI Visual Grounding
and 1 more not named here
encoded_img_to_pil_img 3 other papers
2 dated earlier, 1 later
2404.07972 (2024-04)
OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environments
2407.10956 (2024-07)
Spider2-V: How Far Are Multimodal Agents From Automating Data Science and Engineering Workflows?
2604.27776 (2026-04)
WindowsWorld: A Process-Centric Benchmark of Autonomous GUI Agents in Professional Cross-Application Environments
save_to_tmp_img_file 3 other papers
2 dated earlier, 1 later
2404.07972 (2024-04)
OSWorld: Benchmarking Multimodal Agents for Open-Ended Tasks in Real Computer Environments
2407.10956 (2024-07)
Spider2-V: How Far Are Multimodal Agents From Automating Data Science and Engineering Workflows?
2604.27776 (2026-04)
WindowsWorld: A Process-Centric Benchmark of Autonomous GUI Agents in Professional Cross-Application Environments
escape_single_quotes 2 other papers
1 dated earlier, 1 the same month
2501.12326 (2025-01)
UI-TARS: Pioneering Automated GUI Interaction with Native Agents
2505.16282 (2025-05)
ARPO:End-to-End Policy Optimization for GUI Agents with Experience Replay
parse_action 2 other papers
1 dated earlier, 1 the same month
2501.12326 (2025-01)
UI-TARS: Pioneering Automated GUI Interaction with Native Agents
2505.16282 (2025-05)
ARPO:End-to-End Policy Optimization for GUI Agents with Experience Replay

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Computer-use agents (CUAs) promise to automate complex tasks across operating systems (OS) and the web, but remain vulnerable to indirect prompt injection, where attackers embed malicious content into the environment to hijack agent behavior. Current evaluations of this threat either lack support for adversarial testing in realistic but controlled environments or ignore hybrid web-OS attack scenarios involving both interfaces. To address this, we propose REDTEAMCUA, an adversarial testing framework featuring a novel hybrid sandbox that integrates a VM-based OS environment with Docker-based web platforms. Our sandbox supports key features tailored for red teaming, such as flexible adversarial scenario configuration, and a setting that decouples adversarial evaluation from navigational limitations of CUAs by initializing tests directly at the point of an adversarial injection. Using REDTEAMCUA, we develop RTC-BENCH, a comprehensive benchmark with 864 examples that investigate realistic, hybrid web-OS attack scenarios and fundamental security vulnerabilities. Benchmarking current frontier CUAs identifies significant vulnerabilities: Claude 3.7 Sonnet | CUA demonstrates an Attack Success Rate (ASR) of 42.9%, while Operator, the most secure CUA evaluated, still exhibits an ASR of 7.6%. Notably, CUAs often attempt to execute adversarial tasks with an Attempt Rate as high as 92.5%, although failing to complete them due to capability limitations. Nevertheless, we observe concerning high ASRs in realistic end-to-end settings, with the recent Claude 4.5 Opus | CUA and strongest-to-date Claude 4.6 Opus | CUA exhibiting a concerning ASR of 83% and 50%, respectively. This indicates that CUA threats can already result in tangible risks to users and computer systems. Code and webpage are at https://osu-nlp-group.github.io/RedTeamCUA

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2505.21936")
get_code_for_paper("2505.21936")
have("2505.21936")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2505.21936.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2505.21936.svg)](https://syntology.ai/paper/2505.21936)

Connect an agent — have() is free.