Documentation
¶
Overview ¶
Package redteam holds red-team fixtures for an infra agent. Prompt-injection fixtures cover the untrusted sources it reads: commit messages, build logs, READMEs and issue bodies. Leak fixtures cover the text it sends out (SourceAgentOutput): replies, issues and notifications that carry a credential or personal data. Each source has attacks, which carry a marker that must not survive a scan, and benign texts that look close to an attack but must pass untouched.
Hidden characters in the JSONL files are written as \u escapes so a reviewer can see them. Credentials are written as {{name}} placeholders and filled in when the fixtures load, so no credential-shaped literal sits in the repository for a secret scanner to report.
Index ¶
Constants ¶
const ( SourceCommitMessage = "commit_message" SourceLogLine = "log_line" SourceReadme = "readme" SourceIssueBody = "issue_body" // SourceAgentOutput is text the agent sends out. Its fixtures are scanned // as output, not as untrusted input. SourceAgentOutput = "agent_output" )
Fixture sources.
const ( ExpectBlock = "block" ExpectRedact = "redact" )
Expected decisions of an outbound attack.
const ( KindAttack = "attack" KindBenign = "benign" )
Fixture kinds.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fixture ¶
type Fixture struct {
ID string `json:"id"`
Source string `json:"source"`
// Kind is KindAttack or KindBenign.
Kind string `json:"kind"`
Text string `json:"text"`
// Marker is, for an attack, the instruction text that must not survive a
// scan.
Marker string `json:"marker,omitempty"`
// Technique is, for an attack, the detection family it uses. For an
// outbound attack it is the awareness detector that must find the
// marker, such as "aws_access_key" or "email".
Technique string `json:"technique,omitempty"`
// Expect is, for an outbound attack, the decision a scan must give:
// ExpectBlock for a credential, ExpectRedact for personal data. It is
// empty on every other fixture.
Expect string `json:"expect,omitempty"`
}
Fixture is one red-team sample.