SAN FRANCISCO — As their second showdown before a jury nears, Apple appears poised to win sanctions against Samsung for leaking its secrets.

In an order filed Friday evening, U.S. Magistrate Judge Paul Grewal asked Samsung and its lawyers at Quinn Emanuel Urquhart & Sullivan to explain why they should not be sanctioned for violating a protective order meant to guard confidential information turned over in discovery. Scores of Samsung employees apparently gained access to Apple secrets—including details of a licensing agreement with Nokia—after lawyers at Quinn Emanuel failed to redact sensitive information from an expert report, according to court papers.