Baiting a fence does not fall under the regulations for "Baiting" in reference to taking of bears or other game.
When baiting a fence your intention is NOT to attract the bear, it is in fact to deter the bear.
You would be VERY hard pressed to be able to find an ECO to write the ticket and then even harder get a conviction.
Here is the NYS Reg.
§187.1 Black bear feeding
(a) Definitions. For the purpose of this Section, the following terms have the indicated meanings:
(1) Feeding means using, placing, giving, exposing, depositing, distributing or scattering any material with the intention of attracting or enticing a bear.
(2) Indirect or incidental feeding means using, placing, giving, exposing, depositing, distributing or scattering any material for a purpose other than to attract or entice bears but which results in the attraction or enticement of a bear.
(3) Person means any individual, co-partnership, organization, association, firm or corporation.
(4) Bear means any black bear existing in a wild state.
(5) Department means the Department of Environmental Conservation.
(b) Prohibitions. It is a violation for any person to:
(1) feed bears within 500 feet of any occupied building (unless the building is owned or leased and occupied by that person), school, playground, paved public road, designated or established campsite, landfill, dump or municipal waste transfer site or dumpster;
(2) feed bears within 100 feet of any other building, any unpaved public road or trail, or body of water;
(3) feed bears or attempt to attract or entice a bear to take or lick anything from any part of his or her own body or another person's body;
(4) feed a bear anything that is destructive or harmful or the carcass or any part of an animal with a contagious disease;
(5) feed a bear anything containing metal, glass, plastic, paper, cardboard or porcelain;
(6) feed bears during an open bear hunting season or during the nine days immediately prior to an open season within the area of the open season;
(7) engage in any indirect or incidental feeding of bears if the activity occurs after written notice from the department to the person responsible for such indirect and incidental feeding. Notification will be given by the department based on an analysis of the likelihood of an injury to a human, bear or other animal or of the likelihood of property damage resulting from such indirect or incidental feeding;
(8) nothing in this section is construed to prohibit the possession afield and use of up to 1.5 fluid ounces of a liquid scent or lure;
(9) nothing in this Section is construed to restrict in any way the attraction, capture or taking of black bears by the department for management or research purposes.
(c) Enforcement. The feeding of black bears, as prohibited by this section is a violation. Indirect or incidental feeding is also a violation if it occurs after notification as provided in paragraph 7 of subdivision (b) of this section.