shellfirm 0.4.2

`shellfirm` will intercept any risky patterns (default or defined by you) and prompt you a small challenge for double verification, kinda like a captcha for your terminal.
Documentation
---
# -- github:repo_delete --
- test: "gh repo delete"
  description: "match repo delete"
  expect_ids: ["github:repo_delete"]
- test: "gh repo delete myorg/myrepo"
  description: "match repo delete with org/repo"
  expect_ids: ["github:repo_delete"]
- test: "gh repo delete --yes"
  description: "match repo delete with --yes confirmation skip"
  expect_ids: ["github:repo_delete"]
- test: "gh repo delete myorg/myrepo --yes"
  description: "match repo delete with org/repo and --yes"
  expect_ids: ["github:repo_delete"]
- test: "gh  repo  delete"
  description: "match repo delete with extra spaces"
  expect_ids: ["github:repo_delete"]
- test: "gh repo deletee"
  description: "negative: typo should not match"
  expect_ids: []
- test: "gh repo list"
  description: "negative: repo list should not match"
  expect_ids: []
- test: "gh repo create myrepo"
  description: "negative: repo create should not match"
  expect_ids: []

# -- github:repo_archive --
- test: "gh repo archive"
  description: "match repo archive"
  expect_ids: ["github:repo_archive"]
- test: "gh repo archive myorg/myrepo"
  description: "match repo archive with org/repo"
  expect_ids: ["github:repo_archive"]
- test: "gh repo archive --yes"
  description: "match repo archive with --yes"
  expect_ids: ["github:repo_archive"]
- test: "gh  repo  archive"
  description: "match repo archive with extra spaces"
  expect_ids: ["github:repo_archive"]
- test: "gh api -X PATCH repos/acme/x -f archived=true"
  description: "archiving through the REST API"
  expect_ids: ["github:repo_archive"]
- test: "gh api --method PATCH repos/acme/x --field archived=true"
  description: "archiving through the REST API (long options)"
  expect_ids: ["github:repo_archive"]
- test: "gh api -X PATCH repos/acme/x -f archived=false"
  description: "negative: unarchiving"
  expect_ids: []
- test: "gh api repos/acme/x --jq .archived"
  description: "negative: reading the archived flag"
  expect_ids: []
- test: "gh repo archived"
  description: "negative: archived is not archive command"
  expect_ids: []
- test: "gh repo unarchive myorg/myrepo"
  description: "negative: unarchive should not match archive"
  expect_ids: []

# -- github:repo_rename --
- test: "gh repo rename"
  description: "match repo rename"
  expect_ids: ["github:repo_rename"]
- test: "gh repo rename new-name"
  description: "match repo rename with new name"
  expect_ids: ["github:repo_rename"]
- test: "gh repo rename --yes new-name"
  description: "match repo rename with --yes"
  expect_ids: ["github:repo_rename"]
- test: "gh  repo  rename"
  description: "match repo rename with extra spaces"
  expect_ids: ["github:repo_rename"]
- test: "gh repo view"
  description: "negative: repo view should not match"
  expect_ids: []

# -- github:repo_change_visibility --
- test: "gh repo edit --visibility private"
  description: "match change visibility to private"
  expect_ids: ["github:repo_change_visibility"]
- test: "gh repo edit --visibility public"
  description: "match change visibility to public"
  expect_ids: ["github:repo_change_visibility"]
- test: "gh repo edit --visibility internal"
  description: "match change visibility to internal"
  expect_ids: ["github:repo_change_visibility"]
- test: "gh repo edit myorg/myrepo --visibility private"
  description: "match change visibility with org/repo"
  expect_ids: ["github:repo_change_visibility"]
- test: "gh repo edit --description 'new desc' --visibility public"
  description: "match change visibility with other flags before"
  expect_ids: ["github:repo_change_visibility"]
- test: "gh  repo  edit  --visibility  private"
  description: "match change visibility with extra spaces"
  expect_ids: ["github:repo_change_visibility"]
- test: "gh repo edit --description 'new desc'"
  description: "negative: repo edit without --visibility should not match"
  expect_ids: []
- test: "gh repo edit --homepage 'https://example.com'"
  description: "negative: repo edit with other flags should not match"
  expect_ids: []

# -- github:release_delete --
- test: "gh release delete"
  description: "match release delete"
  expect_ids: ["github:release_delete"]
- test: "gh release delete v1.0.0"
  description: "match release delete with tag"
  expect_ids: ["github:release_delete"]
- test: "gh release delete v1.0.0 --yes"
  description: "match release delete with --yes"
  expect_ids: ["github:release_delete"]
- test: "gh release delete v1.0.0 --cleanup-tag"
  description: "match release delete with --cleanup-tag"
  expect_ids: ["github:release_delete"]
- test: "gh  release  delete"
  description: "match release delete with extra spaces"
  expect_ids: ["github:release_delete"]
- test: "gh release list"
  description: "negative: release list should not match"
  expect_ids: []
- test: "gh release create v1.0.0"
  description: "negative: release create should not match"
  expect_ids: []
- test: "gh release view v1.0.0"
  description: "negative: release view should not match"
  expect_ids: []

# -- github:secret_delete --
- test: "gh secret delete"
  description: "match secret delete"
  expect_ids: ["github:secret_delete"]
- test: "gh secret delete MY_SECRET"
  description: "match secret delete with secret name"
  expect_ids: ["github:secret_delete"]
- test: "gh secret delete MY_SECRET --org myorg"
  description: "match secret delete with --org flag"
  expect_ids: ["github:secret_delete"]
- test: "gh secret delete MY_SECRET --env production"
  description: "match secret delete with --env flag"
  expect_ids: ["github:secret_delete"]
- test: "gh  secret  delete"
  description: "match secret delete with extra spaces"
  expect_ids: ["github:secret_delete"]
- test: "gh secret list"
  description: "negative: secret list should not match"
  expect_ids: []
- test: "gh secret set MY_SECRET"
  description: "negative: secret set should not match"
  expect_ids: []

# -- github:variable_delete --
- test: "gh variable delete"
  description: "match variable delete"
  expect_ids: ["github:variable_delete"]
- test: "gh variable delete MY_VAR"
  description: "match variable delete with variable name"
  expect_ids: ["github:variable_delete"]
- test: "gh variable delete MY_VAR --org myorg"
  description: "match variable delete with --org flag"
  expect_ids: ["github:variable_delete"]
- test: "gh variable delete MY_VAR --env staging"
  description: "match variable delete with --env flag"
  expect_ids: ["github:variable_delete"]
- test: "gh  variable  delete"
  description: "match variable delete with extra spaces"
  expect_ids: ["github:variable_delete"]
- test: "gh variable list"
  description: "negative: variable list should not match"
  expect_ids: []
- test: "gh variable set MY_VAR"
  description: "negative: variable set should not match"
  expect_ids: []
- test: "gh api -X DELETE repos/acme/webapp"
  description: "deleting the repository through the API"
  expect_ids: ["github:api_delete_repo"]
- test: "gh api repos/acme/webapp"
  description: "negative: reading the repository"
  expect_ids: []
- test: "gh api -X DELETE repos/acme/webapp/labels/bug"
  description: "negative: deleting a label"
  expect_ids: []
- test: "gh pr merge 12 --admin --squash"
  description: "merging past branch protection"
  expect_ids: ["github:pr_merge_admin"]
- test: "gh pr merge 12 --squash"
  description: "negative: a normal merge"
  expect_ids: []
# -- github:api_delete_ref --
- test: "gh api --method DELETE repos/acme/webapp/git/refs/heads/main"
  description: "deletes a branch through the API"
  expect_ids: ["github:api_delete_ref"]
- test: "gh api repos/acme/webapp/git/refs/heads/main -X DELETE"
  description: "the method after the path"
  expect_ids: ["github:api_delete_ref"]
- test: "gh api -X DELETE /repos/acme/webapp/git/refs/tags/v1.0"
  description: "deletes a tag"
  expect_ids: ["github:api_delete_ref"]
- test: "gh api repos/acme/webapp/git/refs/heads/main"
  description: "negative: reading a ref"
  expect_ids: []
# -- github:api_branch_protection --
- test: "gh api -X DELETE repos/acme/webapp/branches/main/protection"
  description: "removes branch protection"
  expect_ids: ["github:api_branch_protection"]
- test: "gh api -X PATCH repos/acme/webapp/branches/main/protection -f enforce_admins=false"
  description: "weakens branch protection"
  expect_ids: ["github:api_branch_protection"]
- test: "gh api repos/acme/webapp/branches/main/protection/required_pull_request_reviews --method DELETE"
  description: "removes required reviews, method after the path"
  expect_ids: ["github:api_branch_protection"]
- test: "gh api repos/acme/webapp/branches/main/protection"
  description: "negative: reading the protection rules"
  expect_ids: []
- test: "gh repo delete acme/webapp --yes"
  description: "gh repo delete with a name"
  expect_ids: ["github:repo_delete"]

# ---- anchoring and housekeeping ----
# -- github:repo_delete --
- test: "hugh repo delete x"
  description: "another tool whose name ends in gh"
  expect_ids: []
- test: "sudo gh repo delete x"
  description: "sudo is removed by the parser"
  expect_ids: ["github:repo_delete"]

# -- help requests are print-only --
- test: "gh repo delete --help"
  description: "negative: a help request only prints usage"
  expect_ids: []
- test: "gh repo delete help --yes"
  description: "the help word does not make this print-only"
  expect_ids: ["github:repo_delete"]
- test: "gh repo delete owner/repo --yes"
  description: "the help word does not make this print-only"
  expect_ids: ["github:repo_delete"]
- test: "gh release delete -h"
  description: "negative: a help request only prints usage"
  expect_ids: []

# -- github:workflow_disable / secret_set_empty / api_make_public / api_disable_actions --
- test: "gh workflow disable deploy.yml"
  description: "a workflow turned off"
  expect_ids: ["github:workflow_disable"]
- test: "gh workflow enable deploy.yml"
  description: "negative: a workflow turned on"
  expect_ids: []
- test: "gh workflow list"
  description: "negative: listing workflows"
  expect_ids: []
- test: "gh secret set PROD_KEY < /dev/null"
  description: "a secret replaced with nothing"
  expect_ids: ["github:secret_set_empty"]
- test: "gh secret set KEY < key.txt"
  description: "negative: a secret set from a file"
  expect_ids: []
- test: "gh variable set PROD_URL --body \"\""
  description: "a variable replaced with an empty body"
  expect_ids: ["github:secret_set_empty"]
- test: "gh secret set PROD_KEY --body '' --repo acme/webapp"
  description: "a secret replaced with an empty body"
  expect_ids: ["github:secret_set_empty"]
- test: "gh variable set PROD_URL --body https://app.example.com"
  description: "negative: a variable set to a value"
  expect_ids: []
- test: "gh variable list"
  description: "negative: listing variables"
  expect_ids: []
# -- github:api_delete_webhook --
- test: "gh api -X DELETE repos/acme/webapp/hooks/1"
  description: "a repository webhook deleted"
  expect_ids: ["github:api_delete_webhook"]
- test: "gh api orgs/acme/hooks/42 --method DELETE"
  description: "an organization webhook deleted, method last"
  expect_ids: ["github:api_delete_webhook"]
- test: "gh api repos/acme/webapp/hooks"
  description: "negative: listing webhooks"
  expect_ids: []
- test: "gh api -X POST repos/acme/webapp/hooks/1/pings"
  description: "negative: pinging a webhook"
  expect_ids: []
- test: "gh api -X PATCH repos/acme/webapp -f visibility=public"
  description: "the repository made public"
  expect_ids: ["github:api_make_public"]
- test: "gh api -X PATCH repos/acme/webapp -F private=false"
  description: "private turned off"
  expect_ids: ["github:api_make_public"]
- test: "gh api -X PATCH repos/acme/webapp -f visibility=private"
  description: "negative: made private"
  expect_ids: []
- test: "gh api repos/acme/webapp"
  description: "negative: reading the repository"
  expect_ids: []
- test: "gh api -X PUT repos/acme/webapp/actions/permissions -F enabled=false"
  description: "Actions turned off"
  expect_ids: ["github:api_disable_actions"]
- test: "gh api repos/acme/webapp/actions/permissions"
  description: "negative: reading the Actions permissions"
  expect_ids: []