I think oil surrounding anything can create an anaerobic environment, risking botulism, and that's one you don't want to play roulette with. I know when flavored oils were a big thing, people would add garlic and hot peppers and then let the oil sit on the counter (so pretty!), but that's a huge no-no. People argued with me saying they'd done it for years... ok, they've been lucky.
The actual occurrence of botulism is pretty low even in improperly processed foods, but if it happens it's a much bigger issue than other types of spoilage, and you won't notice it with smell, taste, or appearance. It produces a neurotoxin, and while it's treatable, the damage done may not be reversible, and it can hospitalize you for months or kill you.
For up-to-date guidelines for safe food processing, I rely on a site developed by UGA extension -- The National Center for Home Food Preservation,
https://nchfp.uga.edu/#gsc.tab...
I also have a Ball Blue Book and a pickling book that I love (and trust for safety), Linda Ziedrich's Joy of Pickling. If you find random recipes online, even on really good cooking channels, it's worth your time to check the safety of their canning directions.