Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions DTAP_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,19 +184,13 @@ LITELLM_API_KEY=... LITELLM_API_BASE=... \
python -m pytest targets/dtap_openclaw/tests -m "docker and live"
```

## Run the end-to-end experiment
## Run end to end

A tiny, budget-capped smoke test that wires scaffold + claim + the Claude Code
target + the goal-passthrough baseline lives in the sibling experiments repo at
`superred-experiments/test_dtap/`. It preflight-checks `docker ps` and exits with
a clear message if Docker is absent. See that folder's `README.md`; in short:

```bash
cd ../superred-experiments/test_dtap
cp .env.example .env # fill LITELLM_API_KEY / LITELLM_API_BASE
export DTAP_DATASET_ROOT=/path/to/DecodingTrust-Agent/dataset
python run.py
```
An end-to-end run wires the DTAP claim (`security_claim_dtap`), a DTAP agent
target (e.g. the Claude Code target), and an optimizer (e.g. the `goal_passthrough` baseline)
into a framework `Controller`. It needs a running Docker daemon, the dataset
at `DTAP_DATASET_ROOT`, and `LITELLM_API_KEY` / `LITELLM_API_BASE` in the
environment. Keep the per-task budget small for a first smoke run.

## Faithfulness

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ security_claims/ the tests (what counts as broken, and how it's judge
[security_claims/README.md](security_claims/README.md).

You mix and match: any optimizer can attack any compatible target, measured by
any compatible claim. The combinations are wired together by short scripts in
the separate `superred-experiments/` repository.
any compatible claim. You wire a combination together in a short script that
hands them to the framework's `Controller`.

## What is here

Expand Down
2 changes: 1 addition & 1 deletion optimizers/actor_attack/tests/test_no_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
rejects temperature combined with top_p. Every component that pinned one here
was a judge, evaluator or scorer that swallows its own exceptions, so the pin
did not fail loudly: it silently disabled the component and reported the attack
as a clean failure. In the RQ1.3-1 2026-06/07 run that cost 56,198 tasks.
as a clean failure.

The check is structural (AST), not a text search, so a rename, a reformat or a
value moved into a dict cannot slip past it.
Expand Down
2 changes: 1 addition & 1 deletion optimizers/agentbreaker/tests/test_no_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
rejects temperature combined with top_p. Every component that pinned one here
was a judge, evaluator or scorer that swallows its own exceptions, so the pin
did not fail loudly: it silently disabled the component and reported the attack
as a clean failure. In the RQ1.3-1 2026-06/07 run that cost 56,198 tasks.
as a clean failure.

The check is structural (AST), not a text search, so a rename, a reformat or a
value moved into a dict cannot slip past it.
Expand Down
20 changes: 10 additions & 10 deletions optimizers/agentvigil_websentinel/ASSUMPTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,20 @@ reading and are load-bearing here, because this module is where a misclassified
category is fatal rather than merely lossy:

- Categories are roles to match, not a partition to fill. When a scope grants no
user-prompt surface -- the experiment drops it from threat models s3, s4 and s6
-- the prompt tells the model a category may match zero surfaces and forbids
user-prompt surface -- a threat model may drop it, e.g. scopes s3, s4 and s6 --
the prompt tells the model a category may match zero surfaces and forbids
relabelling content surfaces to populate it. Without this, gpt-4o-2024-05-13 put
every DTAP `env_tool:<server>` surface into `user-prompt` under
category-completion pressure. A false `user-prompt` label sets
`_can_write_user_prompt`, which shrinks `_available_surface_ranks()` to length 1,
so `_is_done()` fires after run 1 and the cell ends in seconds with a zero
indistinguishable from a defence. Measured on the DTAP indirect claim at scope
s3 (11 text domains, one task each), this collapse hit 5 of 11 domains, and 2 of
11 at s4 and 3 of 11 at s6; the improved prompt gives 0 of 11 at all three, while
the control arm that keeps the user-prompt surface stays at 0 throughout. The
prompt also classifies by role, not goal-relevance, so a live indirect-injection
surface is not dropped to `irrelevant` merely because it looks off-topic for the
task: at s3, s4 and s6 every granted surface received a category, in both arms.
so `_is_done()` fires after run 1 and the task ends in seconds with a zero
indistinguishable from a defence. With the earlier prompt this collapse was
common on DTAP indirect-injection tasks in scopes without a user-prompt surface;
the improved prompt prevents it, and scopes that keep the user-prompt surface
are unaffected. The prompt also classifies by role, not goal-relevance, so a
live indirect-injection surface is not dropped to `irrelevant` merely because it
looks off-topic for the task: the prompt is written so every granted surface
receives a category.
One wording constraint is load-bearing: the prompt describes each role in prose
and must never spell one out as a label-shaped phrase. An earlier revision said a
qualifying value "is a content/environment surface"; the model answered with that
Expand Down
2 changes: 1 addition & 1 deletion optimizers/ansi_escape/tests/test_no_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
rejects temperature combined with top_p. Every component that pinned one here
was a judge, evaluator or scorer that swallows its own exceptions, so the pin
did not fail loudly: it silently disabled the component and reported the attack
as a clean failure. In the RQ1.3-1 2026-06/07 run that cost 56,198 tasks.
as a clean failure.

The check is structural (AST), not a text search, so a rename, a reformat or a
value moved into a dict cannot slip past it.
Expand Down
2 changes: 1 addition & 1 deletion optimizers/apikey_leak/tests/test_no_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
rejects temperature combined with top_p. Every component that pinned one here
was a judge, evaluator or scorer that swallows its own exceptions, so the pin
did not fail loudly: it silently disabled the component and reported the attack
as a clean failure. In the RQ1.3-1 2026-06/07 run that cost 56,198 tasks.
as a clean failure.

The check is structural (AST), not a text search, so a rename, a reformat or a
value moved into a dict cannot slip past it.
Expand Down
2 changes: 1 addition & 1 deletion optimizers/attack_anything/tests/test_no_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
rejects temperature combined with top_p. Every component that pinned one here
was a judge, evaluator or scorer that swallows its own exceptions, so the pin
did not fail loudly: it silently disabled the component and reported the attack
as a clean failure. In the RQ1.3-1 2026-06/07 run that cost 56,198 tasks.
as a clean failure.

The check is structural (AST), not a text search, so a rename, a reformat or a
value moved into a dict cannot slip past it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def _extract_jailbreak_prompt(text: str, request: str) -> str:
takes the same fallback. Returning the empty body instead made the
optimizer inject an empty user message, which litellm's Bedrock
Converse transform drops, leaving a conversation the provider
rejects outright: 161 tasks lost that way in the archived first run.
rejects outright, which fails the task.
"""
if _END_TAG not in text:
return request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,9 @@ async def _score_attempt(self, response: str) -> float | None:
as the last measured one. That can never exceed ``_prev_score``, so
the strategy library stops growing while the run still looks
healthy, and ``_prev_prompt`` advances to a prompt no scorer ever
saw. 117 scorer calls failed that way in the archived first run, all
of them transient (86 Bedrock internal_server_error, 31 timeouts),
which is why the retry comes first and the substitution goes.
saw. Scorer failures are typically transient (Bedrock
internal_server_error, timeouts), which is why the retry comes
first and the substitution goes.
"""
assert self._goal is not None
assert self._scorer is not None
Expand Down
8 changes: 4 additions & 4 deletions optimizers/autodan_turbo/src/autodan_turbo_optimizer/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
T = TypeVar("T")

# Provider-side failures a second attempt can plausibly fix. ``litellm.Timeout``
# subclasses ``APIConnectionError``, so it is covered; both shapes observed in
# the archived first run (Bedrock internal_server_error, 600s timeout) land in
# this tuple. Everything else (a rejected parameter, a bad key, an unparseable
# answer) is permanent for the life of the task and must not be retried.
# subclasses ``APIConnectionError``, so it is covered; common transient shapes
# (Bedrock internal_server_error, 600s timeout) land in this tuple. Everything
# else (a rejected parameter, a bad key, an unparseable answer) is permanent for
# the life of the task and must not be retried.
TRANSIENT_ERRORS: tuple[type[Exception], ...] = (
APIConnectionError,
InternalServerError,
Expand Down
6 changes: 3 additions & 3 deletions optimizers/autodan_turbo/tests/test_attacker.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ def test_falls_back_to_request_on_empty_output(self) -> None:
def test_falls_back_to_request_on_an_empty_tag_body(self, text: str) -> None:
# A well-formed but empty tag pair is as much a parse failure as a
# missing end tag. Returning "" here made the optimizer inject an
# empty user message, which cost 161 tasks in the archived first run:
# litellm's Bedrock Converse transform drops empty-content messages,
# so the provider saw a conversation with no user turn.
# empty user message, which fails the task: litellm's Bedrock
# Converse transform drops empty-content messages, so the provider
# sees a conversation with no user turn.
assert _extract_jailbreak_prompt(text, "the goal") == "the goal"

@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion optimizers/autodan_turbo/tests/test_no_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
rejects temperature combined with top_p. Every component that pinned one here
was a judge, evaluator or scorer that swallows its own exceptions, so the pin
did not fail loudly: it silently disabled the component and reported the attack
as a clean failure. In the RQ1.3-1 2026-06/07 run that cost 56,198 tasks.
as a clean failure.

The check is structural (AST), not a text search, so a rename, a reformat or a
value moved into a dict cannot slip past it.
Expand Down
7 changes: 3 additions & 4 deletions optimizers/autodan_turbo/tests/test_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1308,8 +1308,8 @@ async def test_user_message_unchanged_when_only_override_extension_active(
# Scorer failure classification
#
# The scorer used to fall back to ``score = self._prev_score``: an unmeasured
# attempt recorded as scoring exactly what the last measured one did. 117
# scorer calls failed that way in the archived first run, all transient.
# attempt recorded as scoring exactly what the last measured one did. Such
# scorer failures are typically transient.
# ---------------------------------------------------------------------------


Expand Down Expand Up @@ -1425,8 +1425,7 @@ class TestBlankPromptIsNeverInjected:
async def test_blank_current_prompt_declines_the_turn(self) -> None:
# Defence in depth behind the tag-extraction fallback: an empty user
# message is dropped by litellm's Bedrock Converse transform, and the
# provider then rejects the whole conversation. 161 autodan_turbo
# tasks died that way in the archived first run.
# provider then rejects the whole conversation, failing the task.
opt = await _init_optimizer()
_stub_attacker(opt, warm_up=" ")

Expand Down
2 changes: 1 addition & 1 deletion optimizers/av_spam/tests/test_no_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
rejects temperature combined with top_p. Every component that pinned one here
was a judge, evaluator or scorer that swallows its own exceptions, so the pin
did not fail loudly: it silently disabled the component and reported the attack
as a clean failure. In the RQ1.3-1 2026-06/07 run that cost 56,198 tasks.
as a clean failure.

The check is structural (AST), not a text search, so a rename, a reformat or a
value moved into a dict cannot slip past it.
Expand Down
2 changes: 1 addition & 1 deletion optimizers/bad_likert_judge/tests/test_no_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
rejects temperature combined with top_p. Every component that pinned one here
was a judge, evaluator or scorer that swallows its own exceptions, so the pin
did not fail loudly: it silently disabled the component and reported the attack
as a clean failure. In the RQ1.3-1 2026-06/07 run that cost 56,198 tasks.
as a clean failure.

The check is structural (AST), not a text search, so a rename, a reformat or a
value moved into a dict cannot slip past it.
Expand Down
2 changes: 1 addition & 1 deletion optimizers/best_of_n/tests/test_no_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
rejects temperature combined with top_p. Every component that pinned one here
was a judge, evaluator or scorer that swallows its own exceptions, so the pin
did not fail loudly: it silently disabled the component and reported the attack
as a clean failure. In the RQ1.3-1 2026-06/07 run that cost 56,198 tasks.
as a clean failure.

The check is structural (AST), not a text search, so a rename, a reformat or a
value moved into a dict cannot slip past it.
Expand Down
2 changes: 1 addition & 1 deletion optimizers/bijection/tests/test_no_temperature.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
rejects temperature combined with top_p. Every component that pinned one here
was a judge, evaluator or scorer that swallows its own exceptions, so the pin
did not fail loudly: it silently disabled the component and reported the attack
as a clean failure. In the RQ1.3-1 2026-06/07 run that cost 56,198 tasks.
as a clean failure.

The check is structural (AST), not a text search, so a rename, a reformat or a
value moved into a dict cannot slip past it.
Expand Down
Loading
Loading