Cybersecurity is one industry that doesn't take a break. Hackers become more dangerous every year, so ensuring that a company has a top-notch cybersecurity protection plan is critical. This makes it an excellent industry to invest in, as it's practically recession-proof. Most companies will find many other places to cut expenses before they trim their cybersecurity budgets.

The industry is large, and there are multiple facets to a rock-solid cybersecurity plan, which is why many companies utilize services from multiple vendors. As a result, there are multiple great cybersecurity companies to invest in.

Two that I think are solid buys right now are SentinelOne (S -3.47%) and Okta (OKTA -2.69%)

Cyber criminal trying to hack into a computer.

Image source: Getty Images.

1. SentinelOne

SentinelOne offers AI-first endpoint protection software. Endpoints are all the devices that can access a company's network, like smartphones or laptops. If a bad actor can access a network through one of these devices, they can have free rein over the company's data, which could be a disaster. 

SentinelOne is just one competitor among many in the endpoint protection space, but its most notable peer is CrowdStrike (CRWD -0.24%). I've been a CrowdStrike bull for a long time, but given how expensive the stock has become, it's just not a buy today. Shares of SentinelOne, which offers a similar product, are much more reasonably priced, and the company is achieving strong growth.

The best metric to use when evaluating both companies is the price-to-sales (P/S) ratio, as neither is reliably profitable yet.

S PS Ratio Chart

S PS Ratio data by YCharts.

At 6.7 times sales, SentinelOne is cheap for a software stock, as most software companies trade between 10 and 20 times sales. CrowdStrike is at the high end of that range; however, it's not growing as fast as SentinelOne.

Both companies' fiscal 2026 first quarters ended on April 30. During that quarter, CrowdStrike's revenue grew 20% year over year to $1.1 billion and its annual recurring revenue (ARR) rose 22% to $4.44 billion. SentinelOne's revenue rose 23% to $229 million, while its ARR increased by 24% to $948 million.

The differences in valuation between these two largely come down to two factors. First, CrowdStrike is a much larger business and has already captured a significant chunk of the cybersecurity market. Second, CrowdStrike appears close to achieving consistent profitability. SentinelOne is light years away from doing so.

S Profit Margin Chart

S Profit Margin data by YCharts.

However, SentinelOne has been more focused on growing its top line. If management flips the switch and focuses on profitability instead, it could close the red ink gap. I think the stock price is cheap enough and the business is strong enough that SenitelOne could be a solid buy here. Just don't expect it to turn profitable anytime soon.

2. Okta

Okta plays in a completely different cybersecurity realm: It's an identity and access management specialist that ensures that a system's users are legitimate, and that each one can only access the information and apps they are supposed to be able to.

For example, if a client didn't have robust enough endpoint protection or a bad actor somehow got through that layer of security using stolen credentials, they would only gain access to the limited parts of the system that the user was supposed to be able to access.

Furthermore, Okta also monitors for unusual activity and can easily detect when someone is acting suspiciously.

Okta is a key IT component in large organizations and a smart cybersecurity investment.

Its P/S ratio of 6.7 is quite cheap, too. However, it's not growing nearly as fast as SentinelOne: Okta's revenue was up just 12% year over year in Q1. But its remaining performance obligation (similar to ARR) rose by an outstanding 21%.

One thing that sets Okta apart is its solid profitability. In the past three years, it has climbed the ladder from deep unprofitability (similar to where SentinelOne's margins are) to producing positive net income.

OKTA Profit Margin Chart

OKTA Profit Margin data by YCharts.

Okta still has plenty of potential to produce even stronger margins -- software companies can easily reach 20% to 30% profit margins. If it does, the stock could be a monster winner thanks to its low current valuation.