Skip to content

Commit

Permalink
osv-scanner 1.4.0
Browse files Browse the repository at this point in the history
osv-scanner: need go for test

Signed-off-by: Rui Chen <rui@chenrui.dev>

osv-scanner: update test

Signed-off-by: Rui Chen <rui@chenrui.dev>
  • Loading branch information
chenrui333 committed Sep 14, 2023
1 parent 28f9a94 commit 08c2e97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Formula/o/osv-scanner.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class OsvScanner < Formula
desc "Vulnerability scanner which uses the OSV database"
homepage "https://github.com/google/osv-scanner"
url "https://github.com/google/osv-scanner/archive/refs/tags/v1.3.6.tar.gz"
sha256 "cac90e2683079d2fbe7c5e387d6a5acb65c7d340153df06e91578f9212def50b"
url "https://github.com/google/osv-scanner/archive/refs/tags/v1.4.0.tar.gz"
sha256 "ea306347840c0c24e11061b74d0045f99179d7764e944896b9137fa49352e903"
license "Apache-2.0"
head "https://github.com/google/osv-scanner.git", branch: "main"

Expand All @@ -16,7 +16,7 @@ class OsvScanner < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "f7a87a7bbf5008320eb1eccba4dac980ede6fea533724818be03b76dbbd91ac2"
end

depends_on "go" => :build
depends_on "go" => [:build, :test]

def install
system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/osv-scanner"
Expand All @@ -33,7 +33,7 @@ module my-library

scan_output = shell_output("#{bin}/osv-scanner --lockfile #{testpath}/go.mod").strip
expected_output = <<~EOS.chomp
Scanned #{testpath}/go.mod file and found 1 packages
Scanned #{testpath}/go.mod file and found 2 packages
No vulnerabilities found
EOS
assert_equal expected_output, scan_output
Expand Down

0 comments on commit 08c2e97

Please sign in to comment.