Reads an attack file: one JSON attack per line (id, kind, text, technique, source). Blank lines are skipped. Any line that doesn't fit, or an id used twice within a source, stops it with every problem listed, so a file is used whole or not at all.
id
kind
text
technique
source
The file's contents.
The attacks, in file order.
When a line isn't JSON, doesn't fit, or repeats an id.
const attacks = readAttacks(readFileSync("attacks.jsonl", "utf8"));export const triageInjection = injectionSuite(ticketTriage, { inject, attacks: [...INJECTION_ATTACKS, ...attacks],}); Copy
const attacks = readAttacks(readFileSync("attacks.jsonl", "utf8"));export const triageInjection = injectionSuite(ticketTriage, { inject, attacks: [...INJECTION_ATTACKS, ...attacks],});
Reads an attack file: one JSON attack per line (
id,kind,text,technique,source). Blank lines are skipped. Any line that doesn't fit, or an id used twice within a source, stops it with every problem listed, so a file is used whole or not at all.