Magnetic instability and superconductivity in cerium based HF compounds