It really depends how deep the scratch is. If it's deep enough, then a new CSU (crown-steerer unit) is the only sure-fire fix.
However, here are some steps I've taken in the past, which have given me some success:
- Sand the scratch down to remove the burrs. You can use super-fine wet & dry paper for this; something like 2000 grit should do the job without damaging the rest of the surface.
- Clean the scratch and the surrounding area thoroughly with isopropyl alcohol, removing any debris from the scratch itself.
- Fill the scratch with some high-quality epoxy. I've used J-B Weld in the past with some success. Some people have reported success with super glue or nail varnish, too.
- Wet a razor blade (or something similar) with water and use it to scrape off the excess. You want it to be as smooth and flat as possible.
Your mileage may vary here; if the filling comes off after riding, you might be looking at a new CSU if you want a complete fix. The fork will still work, of course, but a gap will allow dirt into the lower legs, which will effectively shorten the service interval on the fork.
I've successfully repaired a nick in a Fox RP2 rear shock like this, and it's still going strong today. However, it didn't work so well on the stanchions of my TALAS 32, since the filling wouldn't stick for more than a couple of rides.