“The story is from the Book of Judith in the Apocrypha, in which Judith, a Jewish widow, saves her people from the army of Nebuchadnezzar. With her city besieged by the enemy, Judith and her maid Abra secretly make their way to the camp of the general Holofernes to sue for peace.
“Holofernes falls in love with her, and, after giving a feast in her honor, he falls into a drunken sleep. Judith seizes the opportunity and beheads him with his own sword. His servant Vagaus discovers the body and raises an alarm, but Judith and Abra have escaped.
“The Jews then attack and drive away the leaderless and demoralized Assyrians.”
Vivaldi received a commission to celebrate the victory of the Republic of Venice over the Turks at the siege of Corfu in July 1716. The Turks had landed on Corfu and had set siege to the island. His composition is an allegorical description of the victory of the Venetians over the Turks.
In 1546 the Council of Trent canonized the Apocrypha, which includes the Book of Judith, making its acceptance mandatory. "The Book of Judith does not exist in the Hebrew Bible, and is consequently excluded from the Protestant Canon of Holy Scripture. But the Church has always maintained its canonicity." https://www.catholic.com/encyclopedia/book-of-judith
Judith and Maidservant with the Head of Holofernes, by Artemisia Gentileschi, c. 1625, Detroit Institute of Arts © Detroit Institute of Arts/Gift of Mr. Leslie H Green/Bridgeman Images.