Can you work for NASA if you are not from USA?
NASA
The agency's administration is located at NASA Headquarters in Washington, DC and provides overall guidance and direction.[26] Except under exceptional circumstances, NASA civil service employees are required to be citizens of the United States.[27]
National Security Agency
The number of exemptions from legal requirements has been criticized. When in 1964 the Congress was hearing a bill giving the director of the NSA the power to fire at will any employee,"The Washington Post" wrote: "This is the very definition of arbitrariness. It means that an employee could be discharged and disgraced on the basis of anonymous allegations without the slightest opportunity to defend himself." Yet, the bill was accepted by an overwhelming majority. Also, every person hired to a job in the US after 2007, at any private organization, state or federal government agency, "must" be reported to the New Hire Registry, ostensibly to look for child support evaders, "except" that employees of an intelligence agency may be excluded from reporting if the director deems it necessary for national security reasons.