Newport scored the only try of the game through Will Harries but seven successful kicks - five by British and Irish Lions star Leigh Halfpenny - saw Cardiff to victory as they avenged their 22-16 defeat to the Dragons on Boxing Day.
The result earned Cardiff their fourth win of the campaign and leaves them on 22 points from 12 matches, two points behind Newport.
The uncertainty over their futures did not seem to affect the two sets of players, who had more pressing matters at hand with the Dragons having drawn first blood in these back-to-back festive derbies.
The four Welsh regions have not signed the Participation Agreement for next season and beyond with the WRU, holding out to play against the English clubs either as part of a cup competition or as a full breakaway league outside of WRU control.
It was the main talking point among the fans on the terraces before kick-off, but local rivalry and pride then took over.
The Blues were also all shaven headed as part of a fund-raising effort for cancer care at a Cardiff hospital in tribute to club captain Matthew Rees who is undergoing cancer treatment.
The weather was bright and dry at the start of the match, while the artificial pitch meant perfect playing conditions and even when the rain started to sweep in, both sides continued to try to play their games.
Cardiff opened the scoring through fly-half Rhys Patchell, taking the kick while full-back Halfpenny was receiving treatment after the ruck where he won the penalty.
Halfpenny then missed a chance to extend the lead from inside his own half.
Former Blues player Jason Tovey missed a long-range chance to equalise, hitting the outside of the post and he also pulled a closer opportunity wide as Cardiff stayed in front.
Two Halfpenny penalties then extended the Blues' advantage, but then an unlucky bounce from a Patchell chip through gave Dragons full-back and man of the match Dan Evans the chance to break clear before putting wing Harries in for the try.
Tovey converted and then put the Dragons ahead from a ruck penalty, giving the visitors a 10-9 half-time lead.
There was worse news for the Blues, and potentially Wales, as Patchell limped from the field unable to put any weight on his left leg, replaced by Gareth Davies.
Tovey helped the Dragons go further clear at the start of the second half with another penalty, but Halfpenny brought the Blues back to within a point with a 45-yard effort of his own.
A sustained Blues attack brought a penalty in front of the posts and the sort of face-off between the packs you would expect in a heated derby.
Halfpenny kept his cool to slot the penalty to put his side ahead, but then missed another opportunity rushing after the ball fell off the kicking tee.
However, they got their reward from that period of pressure when Gareth Davies dropped a goal.
Halfpenny was fractionally wide with a 57-yard penalty, but then sealed things in the last minute kick from half that distance to deny the Dragons a losing bonus point.