tech stocks have had a volatile year so far but theres one subsector thats providing opportunities for investors right now according to morgan stanley the investment bank said in a july 6 note that cybersecurity will remain a relatively safe haven into the second half of 2022 with defensible growth and security valuations below historical average we continue to see opportunity the banks analysts wrote the state of cybersecurity remains strong with spending intentions showing no signs of slowing and security budgets most defensible by far in a weaker macro scenario they added the ishares cybersecurity and tech etf has tumbled about 16 yeartodate while the broader nasdaq index is down roughly 25 over the same period although the techfocused index bounced last week morgan stanleys stock picks morgan stanley added that it had seen a notable increase in the us federal security spending in the second quarter with a strong pipeline heading into the third quarter that should benefit many security firms the bank said its top security pick is palo alto  which the bank expects to benefit from greater adoption of nextgeneration cloud security platforms morgan stanley said the stock is undervalued with the price not taking into account the 30 growth the bank expects its price target for this stock is 823 representing an upside of around 59 it also picked cyberark  another stock it said was underpriced the bank said demand for its offering is expected to accelerate and the company is set for higher revenue growth ahead the bank gave cyberark a price target of 172 which represents upside of roughly 20 morgan stanley listed one controversial name its analysts prefer the most okta  the bank said the san franciscobased authentication firm was trading at a discount of more than 30 to its peers on a median basis thats despite negative news surrounding the firm earlier this year  such as a security breach and investor concerns around competition from microsoft  said the bank it put a price target of 150 on okta representing an upside of around 44