I'm a New York native. And like most New York natives, I carry part of the city with me wherever I go -- even though I've spent the majority of my life out west. That's why I'm happy to see that New York's Metropolitan Transportation Authority has brokered a megadeal with defense contractor Lockheed Martin (NYSE:LMT) to secure the subways, railroads, bridges, and tunnels running to and from Manhattan.

The deal is valued at more than $200 million and will involve more than 1,000 cameras and 3,000 electronic sensors. The hope, it appears, is to prevent the kind of attack that paralyzed London in July. But that's a pretty ambitious goal. A Washington Post article pointed out that the MTA system includes more than 500 subway stations and 2,000 miles of tunnels and track. That's a whole lot to survey, even with 1,000 cameras.

The truth may be that, no matter how sophisticated, no system will completely safeguard New York. But Lockheed's technology may scare some would-be attackers, and that's enough . for now, at least. In the meantime, the Foolish investor in us all would be smart to keep an eye on other companies and technologies that may be employed to secure our cities and borders. After all, there should be no shortage of projects. For example, by the end of the year, the MTA expects to call for methods to defend against biological and chemical attacks, as well as additional technology for detecting explosive weapons.

Back in March, Foolish contributor and New Jersey police officer Rich Duprey shed some light on smaller stocks that could benefit from the estimated $18 billion earmarked for state and local governments. I think his story is just as relevant today. His list included DHB Industries (AMEX:DHB); Ceradyne (NASDAQ:CRDN), which was a Stocks 2005 pick; and body-armor providers Armor Holdings (NYSE:AH). Rich also profiled shelter maker TVI (NASDAQ:TVIN) and security system provider CompuDyne (NASDAQ:CDCY). Finally, while Rich didn't mention it, I think you'd have to add Taser (NASDAQ:TASR) to the mix. Should you look into any of them? It certainly couldn't hurt, and doing so may add some welcome security to your portfolio.

You'll feel more secure after checking out this related Foolishness:

Make sure the price is right before you buy shares of any company. How can you find that out? Why, using the handy-dandy discounted cash flow calculator available to subscribers to Motley Fool Inside Value , of course! Take a risk-free trial today, and you'll buying stocks on sale in no time.

Locking the doors and setting the house alarm are about as close to homeland security Fool contributor Tim Beyers gets these days. Tim didn't own shares in any of the companies mentioned in this story at the time of publication. You can find out what's in his portfolio by checking Tim's Fool profile, which is here. The Motley Fool has an ironclad disclosure policy.