I can't tell you a "proper procedure" but I can tell you what I have done with success.
My first batch of dry hopping, I just added the hop pellets directly to secondary like you did. I left it for a couple of weeks to let as much settle to the bottom as possible, and that worked okay.
My next batch, I used a small hop sock (bag). I added 5 or 6 glass marbles to the hop sock (for weight) and soaked the whole thing in a bowl of cheap vodka for the afternoon. That sanitized the marbles and bag sufficiently. I then dumped the hop pellets into the sock, tied a knot in the top, and had no trouble stuffing it all into the mouth of the carboy.
I did not have any problem with contamination, and the vodka soaked bag coated the mouth of the carboy on the way down. I actually had more issues getting it OUT of the carboy after I'd eventually racked to my bottling bucket, since the hop pellets swell. But at that point, sanitation is not an issue and I used one of those claw/pincher tool grabbers to reach down into the carboy and yank it out.
As a side note, the marbles were initially enough weight to pull the whole bundle to the bottom (I didn't want the hop sock just floating on top the whole time). After a couple of days, the hop pellets had swelled and the bundle floated slowly to the top, but continued to rise and fall inside the carboy. By the time Secondary was finished and I was ready to bottle, the bundle had settled back to the bottom to stay.
Scott