In court, fail to keep secret (6)
I believe the answer is:
closet
'secret' is the definition.
('closet' can be a synonym of 'secret')
'in court fail to keep' is the wordplay.
'in' is an insertion indicator.
'court' becomes 'ct'.
'fail to keep' becomes 'lose' ('lose' can be a synonym of 'fail to keep').
'ct' enclosing 'lose' is 'CLOSET'.
(Other definitions for closet that I've seen before include "small compartment for clothing" , "place to store gear" , "Small room or cabinet for storage" , "Cupboard (to come out of)" , "A small room - best to come out of it" .)