Cat6/Low Voltage Termination in a wooden enclosure
No obvious code violations. You're talking about low voltage cable in a non-plenum area, and any cable you buy is almost certainly going to be plenum-rated anyway.

If you're using an enclosed box like the one you referenced, dust probably won't be a huge problem.

Heat will not be a problem if you're just pulling cable and terminating it in patch panels.

However; if you're planning to put any actual electronic equipment in that box, like network switches, the attic heat could be a serious problem even if you install fans in the box to vent hot air. The air you'd be drawing into the box from the attic will be hot.

Presumably, the entire purpose of putting the patch panel in the box is to put things like your cable or DSL modem, router and switch(es) in the box, too. Those may all be the same device, of course, depending on your configuration.

I suppose you could run some ductwork and use both intake and vent fans in the box to draw cool air through it from your living area. But that's getting pretty elaborate.

I would just put it all on a high shelf in your closet. But even then, it is possible that your equipment will generate enough heat that you'll need to vent the closet to avoid damage to the equipment.