It would be up to the agencies to sort out their respective jurisdictions. I suspect it will be pretty clear in most cases as to whether it's a national security issue or not.
The agencies in the past have had jurisdictional questions where they've had to work on things together. They've been able to resolve disputes in a way that is satisfactory, so I don't anticipate there's going to be a jurisdictional fight here.