Yes this should be corrected and it would be good to have the wiring and all the circuit connections inspected as well.
Running wires into attic.
The attic wiring should be protected and secured to ceiling joists or other wood structural supports.
Attach the wire or cable to a fish tape or coat hanger using electrical tape and feed it into the hole until it reaches the opening at the other end.
These holes will be used to fish the cable down into the basement or crawlspace area or up into the attic in order to run the cable from box to box.
I was also under the impression that if wiring is in an attic space that it may need to be derated because it can get very hot up there.
One of the best ways to hide security cameras outside is running burial wires.
Cut a hole for each box with a drywall saw or a saw appropriate for the wall material then feed the wires down from the attic or up from the basement toward each hole using a fish tape or a fish stick and have a helper catch them and pull them through.
Warning if the attic is your only access space for running cable you may find it necessary to cut another small hole in the wall surface high on the wall in order to gain access for drilling through the wall s top plate.
You can try the below steps to conceal the wires for your security cameras.
The original plan was to run security camera wires up through soffit into attic down into basement but that no longer is an option.
Run the wire or cable to its destination.
To run cables vertically go into the attic or basement and drill holes in the wall plates above or below the locations of connection boxes.
The red wires going to the j box and switch are connected to the 2 black wires coming into the metal box from the front of the house.
I just got back from my attic and realized i can t access the soffit from there.
If you re working from the attic you can drop a weighted string down wall cavity then attach the wire to the string and pull it through.
Plan the wring route for running wires for your ip camera outdoors.
While one person holds the flashlight the other person should use a staple gun to run the wire along the rafters from one entry hole to the other.
Whenever i do attic wiring i remove the insulation and staple it to the ceiling joist.
At the metal box in the attic i have the black wire from the j box is connected to the black wire running to the switch.
Bring all of the wire up into the attic.
One of these is probably the power source.
The following links will assist you with your electrical question.