Merge "Add tests to check attachments are secure"