in practical terms, the [defences set out in the legislation] should prevent anyone being unfairly prosecuted for public interest security research
Should, yes, but will it? Somehow, given the Home Office's record on the subject, I very much doubt it.