וַיִּשְׁמַע פַּרְעֹה, שֶׁעָמְדוּ דָּתָן וַאֲבִירָם וְהִלְשִׁינוּ עָלָיו. וַיְבַקֵּשׁ לַהֲרֹג אֶת משֶׁה, שָׁלַח פַּרְעֹה וְהֵבִיאוּ סַיִּף שֶׁאֵין כְּמוֹתָהּ, וּנְתָנוֹ עֶשֶׂר פְּעָמִים עַל צַוָּארוֹ וְנַעֲשָׂה צַוָּארוֹ שֶׁל משֶׁה כְּעַמּוּד הַשֵּׁן וְלֹא הִזִּיקַתּוּ, שֶׁנֶּאֱמַר (שיר השירים ז, ה): צַוָּארֵךְ כְּמִגְדַּל הַשֵּׁן.
When Pharaoh learned of the matter for Datan and Aviram had reported Moshe's actions. Pharaoh wanted to kill Moshe, so he requested a sword like none other. They struck his neck with it ten times, but Moshe's neck had become hard as a pillar and was not injured.
From: Informing on Others for Violating American Law: A Jewish Law View
by Rabbi Michael J. Broyde - https://www.jlaw.com/Articles/mesiralaw2.html
A. The View of Rabbi Eliezer Yehuda Waldenberg: No Prohibition to Inform when Government is Just
There is a difference between primitive and enlightened governments as is noted by the Aruch Hashulchan where it states that "every issue related to informing found in the Talmud and Halacha deals with those far away places where no one was secure in his money or body because of the bandits and pirates, even those who had authority, as we know nowadays in places like Africa...which is not the case here in Europe." (The author of the Aruch Hashulchan, R' Yechiel Michel Epstein, lived in Lithuania in the late 1800's). Assuming one lives in a just society, they may inform the authorities.
B. The View of Rabbi Ezra Batzri: There Are No Just Legal Systems and No Just Prisons
Rabbi Batzri posits that even when the external justice system seems to work, nonetheless the executive and judicial systems are so deeply fraught with exceptions, and extra-judicial misconduct, and coerced confessions, that one must assume injustice will occur and thus informing on a fellow Jew remains generally prohibited, with two exceptions:
Exception #1 - when the person being informed upon is violent, for the welfare of the community, they should be informed upon.
Exception #2 - when the violation would not bring about any dependence on the executive or judicial systems, I.e. a parking violation, they may be informed upon.
C. The View of Rabbi Feinstein : It Depends on the Type of Crime
If the approach of Rabbi Feinstein is correct, one divides cases of informing into three types of categories:
Category #1 - when the person being informed upon is an individual who is violent, or threatens violence, or induces harm to others or endangers the welfare of the community. Such a person may be informed upon, as Jewish law recognizes the need to remove these people from the community.
Category #2 - In cases where the judgement outcome is identical in secular law and Jewish law, Rabbi Feinstein would say that there is no problem of informing, as there is no damage.
Category #3 - In all other cases, informing is prohibited, and is subject to the rules of informing.