A newly disclosed federal directive says Canada’s military spies can collect and share information about Canadian citizens — including material gathered by chance — as long as it supports a legitimate investigation.

The prospect of defence intelligence agents having personal data about Canadians worries civil-liberties advocates because it is unclear just how much is collected incidentally from the vast reaches of cyberspace.

The directive to National Defence employees and members of the Canadian Forces says any information collected about Canadians must have a “direct and immediate relationship” to a military operation or activity.

But it also warns that ”emerging technologies and capabilities” are increasing the possibility that such Canadian information will be inadvertently scooped up, giving rise to privacy considerations when sifting through open sources like social-media feeds.

The directive says data about Canadians, whether collected intentionally or not, may be kept and used to support authorized defence intelligence operations.

The Canadian Press recently obtained a copy of the eight-page, August 2018 directive, ”Guidance on the Collection of Canadian Citizen Information,” through the Access to Information Act.