No chance of harming your tank. Spider plant is non-toxic.
Do a search on "ripariums" here on the forum.
Terrestrial plants are great for nitrates.
Just beware, the spider plant will in time become far too big for a 4.5 gallon so be prepared to replace it or keep its roots severely cropped. I tried one briefly in my tank but it become too sprawling and I pulled it.
I use purple waffle and creeping fig in both my 5 gallon tanks and both are doing really well so far and sending out both new growth and a ton of roots. I'm also trying syngonium, peace lily, philodendron and pothos in another tank but its too soon to tell how they'll do, except the pothos which is already rooting well.
Usually, I've found terrestrial roots can adapt to underwater growth and will continue to grow, whereas as water-produced roots invariably dry up and fall off when planted in soil, requiring the plant to grow all new ones (at least in plants I've tried long enough to see - creeping fig, purple waffle, lucky bamboo, spider plant) An exception seems to be heartleaf philodendron, the terrestrial roots of which do rot when set right in water and have to regrow, but which transfer easily from water to soil without dying.