sail close to (near) the wind, to

sail close to the wind

To do something risky or dangerous. If you keep sailing close to the wind, the police are going to arrest you eventually.
See also: close, sail, wind
Farlex Dictionary of Idioms.

sail close to the wind

Be on the verge of doing something illegal or improper, as in She was sailing pretty close to the wind when she called him a liar. This term alludes to the danger incurred when literally sailing too close to (that is, in the direction of) the wind. Its figurative use dates from the first half of the 1800s.
See also: close, sail, wind
The American Heritage® Dictionary of Idioms by Christine Ammer.

sail close to the wind

mainly BRITISH
If someone or something sails close to the wind, they take a risk by doing or saying something which almost breaks rules or laws. Max warned her she was sailing dangerously close to the wind and risked prosecution. I have never known a comedy series to sail so close to the wind. Note: If someone sails a boat too close to the wind, they try to sail in the direction from which the wind is blowing, and stop or capsize as a result.
See also: close, sail, wind
Collins COBUILD Idioms Dictionary, 3rd ed.

sail close to (or near) the wind

verge on indecency, dishonesty, or disaster. informal
This originated as a nautical expression, meaning ‘sail as nearly against the wind as is possible’. It has been in figurative use since the mid 19th century.
1996 Martin Dove How To Win Any Consumer Competition I like the extra thrill of writing to a tight deadline but sometimes I do sail a bit close to the wind with closing dates.
See also: close, sail, wind
Farlex Partner Idioms Dictionary

sail close to the ˈwind

behave in a way that is almost illegal or socially unacceptable: She’s been late for work three times this week, which is sailing close to the wind, I think.
See also: close, sail, wind
Farlex Partner Idioms Dictionary

sail close to (near) the wind, to

To come close to breaking a law or approaching impropriety. The analogy to sailing dangerously close to the wind began to be made in the nineteenth century. Coleridge’s son Hartley, in a critical edition of the plays of Massinger and Ford (1840), used it: “Her language sails a little too near the wind.” It is heard less often today.
See also: close, sail
The Dictionary of Clichés by Christine Ammer
See also:
  • sail close to the wind
  • close to the wind
  • too close for comfort
  • too close to call
  • come close
  • close by
  • close to (one's) heart
  • close to your heart
  • be close to the mark
  • be close to/near the mark