<commit_before>class Tfsec < Formula
  desc "Static analysis powered security scanner for your terraform code"
  homepage "https://github.com/tfsec/tfsec"
  url "https://github.com/tfsec/tfsec/archive/v0.39.24.tar.gz"
  sha256 "c316efcb7b82e2af53a0bb6b9b7f08a78c96e1b12b7617ab347ff74520af9f7c"
  license "MIT"

  livecheck do
    url :stable
    strategy :github_latest
  end

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "76150e9a63a66d7b4032f10c3e2220b7bba878fa93b0b61450e7dbfbb92b0970"
    sha256 cellar: :any_skip_relocation, big_sur:       "ffb7d9faf61ad1f572ee1ef24d6f2ccfd808308cf7c12166e55af4f521825024"
    sha256 cellar: :any_skip_relocation, catalina:      "02033fe9f7746cf8f555205ecfdec165d59a247aa9df679a410e2a08106edf99"
    sha256 cellar: :any_skip_relocation, mojave:        "1f2f213167999e8f7af999159a702a5b096163655f9f441bcf02fb9a9bf41325"
  end

  depends_on "go" => :build

  def install
    system "scripts/install.sh", "v#{version}"
    bin.install "tfsec"
  end

  test do
    (testpath/"good/brew-validate.tf").write <<~EOS
      resource "aws_alb_listener" "my-alb-listener" {
        port     = "443"
        protocol = "HTTPS"
      }
    EOS
    (testpath/"bad/brew-validate.tf").write <<~EOS
      }
    EOS

    good_output = shell_output("#{bin}/tfsec #{testpath}/good")
    assert_match "No problems detected!", good_output
    refute_match("WARNING", good_output)
    bad_output = shell_output("#{bin}/tfsec #{testpath}/bad 2>&1")
    assert_match "WARNING", bad_output
  end
end<commit_msg>tfsec: update 0.39.24 bottle.<commit_after>class Tfsec < Formula
  desc "Static analysis powered security scanner for your terraform code"
  homepage "https://github.com/tfsec/tfsec"
  url "https://github.com/tfsec/tfsec/archive/v0.39.24.tar.gz"
  sha256 "c316efcb7b82e2af53a0bb6b9b7f08a78c96e1b12b7617ab347ff74520af9f7c"
  license "MIT"

  livecheck do
    url :stable
    strategy :github_latest
  end

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "99b4ba1885e623ad0fdfa5ddc25ee8db661ebd3524d8e0ab6b09be573cadeb84"
    sha256 cellar: :any_skip_relocation, big_sur:       "b51797069b077340a544fb555af8a4369f99031bfac761efa3a54afd358a7a5d"
    sha256 cellar: :any_skip_relocation, catalina:      "7971eab54f280a28a2c8fe754a6c2bd05d67c597ead22d2c044fdad2fd23069d"
    sha256 cellar: :any_skip_relocation, mojave:        "56d479cefe8f4edff5cca6ed6e610c4411f3f0ded7c273fa6c4345cc863bf954"
  end

  depends_on "go" => :build

  def install
    system "scripts/install.sh", "v#{version}"
    bin.install "tfsec"
  end

  test do
    (testpath/"good/brew-validate.tf").write <<~EOS
      resource "aws_alb_listener" "my-alb-listener" {
        port     = "443"
        protocol = "HTTPS"
      }
    EOS
    (testpath/"bad/brew-validate.tf").write <<~EOS
      }
    EOS

    good_output = shell_output("#{bin}/tfsec #{testpath}/good")
    assert_match "No problems detected!", good_output
    refute_match("WARNING", good_output)
    bad_output = shell_output("#{bin}/tfsec #{testpath}/bad 2>&1")
    assert_match "WARNING", bad_output
  end
end
{'fraction_non_alphanumeric': 0.10096463022508038, 'fraction_numerical': 0.14083601286173633, 'mean_word_length': 4.1763727121464225, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5347543', 'n_tokens_mistral': 1473, 'n_tokens_neox': 1248, 'n_words': 194}