Evalkeeper
    Preparing search index...

    Function readAttacks

    • 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.

      Parameters

      • text: string

        The file's contents.

      Returns Attack[]

      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],
      });