No junction box on exterior light?
Lots of fixtures or canopies are made to attach directly to cable or conduit, with integral cable clamps or knockouts for suitable (listed, rated...) cable clamps or conduit entry.  This one is not.
The NEC requires light fixtures be listed, and used as intended by the manufacturer.  The metal ring in your photo is not for direct surface mounting, it's made to go on a box, using it for a surface mount is not compliant.
There are a few other code provisions that could be problematic, protection from abrasion and water seepage, etc.  They didn't even wrap the ground wire around the screw.  But the main thing you need here is a box.  Retrofitting it will be a bit of a project.
The box doesn't necessarily fix everything;  the fixture must be suitable (listed, rated for outdoor use, etc.) and made to mount on the type of box that you install.