Hello,
If BGP-OSPF bidirectional import is performed on a single device, there is no risk.
However, if the bidirectional import is performed on two device, for example, CE1 and CE2 in the following figure, pay attention to the following points:
OSPF has a lower route preference than BGP. To prevent routing loops, The BGP route imported to OSPF from one device should not be imported to BGP from another device. This function can be implemented through tags.
After OSPF routes are imported to BGP, the MED value of the BGP route inherits the original OSPF cost value. BGP route selection may be affected. If necessary, change the MED value to 0 when import.
The preference of OSPF ASE is lower than the BGP. A device in the OSPF area accessing the external network may detour within this AS, resulting in sub-optimal routing. For example, when CE1 accesses CE3, the next hop of the shortest path should be PE1, but CE1 will preferentially select CE2. To solve this problem, change the preference of BGP routes to a value smaller than 150.

The following is a configuration example.
CE1:
#
ospf 1
import-route bgp tag 100
#
route-policy import-bgp deny node 10
if-match tag 200
#
route-policy import-bgp permit node 20
#
bgp 100
import-route ospf 1 med 0 route-policy import-bgp
preference 120 255 255 //Assume that the EBGP peer relationship is established between the CE and PE.
#
CE2:
#
ospf 1
import-route bgp tag 200
#
route-policy import-bgp deny node 10
if-match tag 100
#
route-policy import-bgp permit node 20
#
bgp 100
import-route ospf 1 med 0 route-policy import-bgp
preference 120 255 255
Any further questions, please let us know.