In the surviving Greek myth, no one warned Pandora not to open the container.
Hesiod’s account does not include the famous explicit warning that appears in many modern retellings. Pandora receives the container, opens it, and releases the evils inside; the text does not present a named character giving her a prohibition about its contents.
Modern stories often add a warning because it creates suspense and gives the plot a clear forbidden-object structure. Adaptations may have Zeus, Epimetheus, or another figure tell Pandora to leave the vessel closed. Those additions should not be confused with the details preserved in Hesiod’s poems.
The related episode involving Epimetheus does contain a clear warning elsewhere in the story: Prometheus tells his brother not to accept a gift from Zeus. Epimetheus ignores that warning and accepts Pandora. That is separate from a warning to Pandora about opening the jar itself.