Dear Ajay,
I undestand court made responsibility of contractor to pay bonus,but there is similar respobsibility of principle emplyer to provide bonus to them by contractor.
it is clear that Bonus paying is the responsibility of contractor but there is another law,if contractor does not comply with legal requirement then you can break the contract with the contractor who is using illigal activities,the principle employer should put force on contractor to pay bonus to all employees.
At the time of contract made between employer & contractor ,there is one point mentioned that contractor will comply all legal law & all responsibility related to wages & benefits on the head of contractor as per legal requirements.
Think positive for your workers(either permanent,contractor,temporarye etc...)why you should allow to break a law by contractor in your premises.
Best Regards
Sajid Ansari-Delhi