INNER CODE UNIT · Python
check
panther-labs/panther-analysis · .scripts/deleted_rules.py:46
def check():
"""Check if any items have been removed and not added to deprecated.txt"""
if ids := get_deleted_ids() - get_deprecated_ids():
print("❌ The following rule IDs may have been deleted:")
for id_ in ids:
print(f"\t{id_}")
raise typer.Exit(code=1)
else:
print("✅ No unaccounted deletions found! You're in the clear! 👍")
def remove(
api_token: Optional[str] = typer.Option(
None, help="Panther API token", envvar="PANTHER_API_TOKEN"
),
api_host: Optional[str] = typer.Option(
None, help="Panther API host", envvar="PANTHER_API_HOST"
),