Advanced

A written policy for what is unsafe

Unsafe is a decision, and a decision needs a definition. A policy is the written rule that says what a blocked response looks like, so a block is a designed state instead of a crash.

What you will see

Zero. A block that contains a canary is a block that explains the rule.

About 1 min of reading

Try It

Write one policy used by every layer

1

Write the block shape

printf 'I could not answer that. Try asking about one topic at a time.\n' > /tmp/block.txt; cat /tmp/block.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
One sentence of refusal and one of guidance. No rule content.
2

Stamp which layer blocked

printf 'layer=detect case=repeat-above\n' >> /tmp/blocks.txt; cat /tmp/blocks.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
One line naming the layer. That name is what the next fix reads.
3

Prove no secret leaks in the block

grep -c 'CANARY' /tmp/block.txt

Before you run it, say out loud what it will print. Then open the answer.

What it prints
Zero. A block that contains a canary is a block that explains the rule.

Data Flow

A block to a designed state
1 A layer decides to block
↓
2 The policy supplies the response shape
↓
3 The layer name is recorded
↓
4 The user sees the same page from every layer
Why this works
Why the policy is written before the layers

The policy decides what a block means. Writing it first means every layer is built to the same definition.

What the policy refuses to do

The policy never explains the secret. It says a rule was applied, and it says nothing about the rule's content.

Examples

The block is a real page

A blocked response says what was refused and what to do next. An empty response is a bug report users cannot file.

Why the policy is shared

Every layer that blocks uses the same policy. Different blocks look different, and users cannot tell what happened.

The policy names the layer

The record says which layer blocked. That is what makes a fix aimed at a layer instead of aimed at a guess.

Words this lesson uses

Each one is defined here on this site. Open the entry for the full definition and the other words it points at.

← Red teaming your own system
Previous Lesson
Red teaming your own system
Next Lesson
A channel the model cannot write into
A channel the model cannot write into →