Why the attack is written down
An attack you cannot repeat is an attack you cannot fix. The string is kept in a file the moment it is found.
The difference between direct and indirect
Direct comes from the user, indirect comes from something the user pointed at. Indirect is the harder one because it survives review.