diff --git a/pkgs/development/tools/gosec/default.nix b/pkgs/development/tools/gosec/default.nix new file mode 100644 index 000000000000..2cffd86f3965 --- /dev/null +++ b/pkgs/development/tools/gosec/default.nix @@ -0,0 +1,29 @@ +{ buildGoPackage +, lib +, fetchFromGitHub +}: + +buildGoPackage rec { + name = "gosec-${version}"; + version = "1.1.0"; + + goPackagePath = "github.com/securego/gosec"; + excludedPackages = ''cmd/tlsconfig''; + + src = fetchFromGitHub { + owner = "securego"; + repo = "gosec"; + rev = "${version}"; + sha256 = "0vjn3g6w4y4ayx0g766jp31vb78cipl90fcg0mccjr0a539qrpy6"; + }; + + goDeps = ./deps.nix; + + meta = with lib; { + description = "Golang security checker"; + homepage = https://github.com/securego/gosec; + license = licenses.asl20 ; + maintainers = with maintainers; [ kalbasit ]; + platforms = platforms.linux ++ platforms.darwin; + }; +} diff --git a/pkgs/development/tools/gosec/deps.nix b/pkgs/development/tools/gosec/deps.nix new file mode 100644 index 000000000000..80a77e7fb807 --- /dev/null +++ b/pkgs/development/tools/gosec/deps.nix @@ -0,0 +1,193 @@ +# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix) +[ + + { + goPackagePath = "github.com/davecgh/go-spew"; + fetch = { + type = "git"; + url = "https://github.com/davecgh/go-spew"; + rev = "v1.1.1"; + sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y"; + }; + } + + { + goPackagePath = "github.com/golang/protobuf"; + fetch = { + type = "git"; + url = "https://github.com/golang/protobuf"; + rev = "v1.2.0"; + sha256 = "0kf4b59rcbb1cchfny2dm9jyznp8ri2hsb14n8iak1q8986xa0ab"; + }; + } + + { + goPackagePath = "github.com/kisielk/gotool"; + fetch = { + type = "git"; + url = "https://github.com/kisielk/gotool"; + rev = "0de1eaf82fa3"; + sha256 = "177af7bjq6clmkqshnmnwlpwvx80kpi2277q275iwq59lp48viq1"; + }; + } + + { + goPackagePath = "github.com/kr/pretty"; + fetch = { + type = "git"; + url = "https://github.com/kr/pretty"; + rev = "v0.1.0"; + sha256 = "18m4pwg2abd0j9cn5v3k2ksk9ig4vlwxmlw9rrglanziv9l967qp"; + }; + } + + { + goPackagePath = "github.com/kr/pty"; + fetch = { + type = "git"; + url = "https://github.com/kr/pty"; + rev = "v1.1.1"; + sha256 = "0383f0mb9kqjvncqrfpidsf8y6ns5zlrc91c6a74xpyxjwvzl2y6"; + }; + } + + { + goPackagePath = "github.com/kr/text"; + fetch = { + type = "git"; + url = "https://github.com/kr/text"; + rev = "v0.1.0"; + sha256 = "1gm5bsl01apvc84bw06hasawyqm4q84vx1pm32wr9jnd7a8vjgj1"; + }; + } + + { + goPackagePath = "github.com/nbutton23/zxcvbn-go"; + fetch = { + type = "git"; + url = "https://github.com/nbutton23/zxcvbn-go"; + rev = "a22cb81b2ecd"; + sha256 = "0hm16vc7xrw0cqla6xcn59bb7n2sa0j8rkniywn5dqnbrpza12cd"; + }; + } + + { + goPackagePath = "github.com/onsi/ginkgo"; + fetch = { + type = "git"; + url = "https://github.com/onsi/ginkgo"; + rev = "11459a886d9c"; + sha256 = "1nswc1fnrrs792qbix05h91bilj8rr3wxmxgwi97p2gjk0r292zh"; + }; + } + + { + goPackagePath = "github.com/onsi/gomega"; + fetch = { + type = "git"; + url = "https://github.com/onsi/gomega"; + rev = "dcabb60a477c"; + sha256 = "1775lv5jbsgv3ghq5v2827slqlhqdadrzc1nkpq4y0hdv2qzrgkm"; + }; + } + + { + goPackagePath = "github.com/pmezard/go-difflib"; + fetch = { + type = "git"; + url = "https://github.com/pmezard/go-difflib"; + rev = "v1.0.0"; + sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw"; + }; + } + + { + goPackagePath = "github.com/ryanuber/go-glob"; + fetch = { + type = "git"; + url = "https://github.com/ryanuber/go-glob"; + rev = "256dc444b735"; + sha256 = "07rsd7hranghwc68ib0r2zxd9d5djanzjvd84j9dgj3wqsyg5mi2"; + }; + } + + { + goPackagePath = "github.com/stretchr/testify"; + fetch = { + type = "git"; + url = "https://github.com/stretchr/testify"; + rev = "v1.2.2"; + sha256 = "0dlszlshlxbmmfxj5hlwgv3r22x0y1af45gn1vd198nvvs3pnvfs"; + }; + } + + { + goPackagePath = "golang.org/x/net"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/net"; + rev = "8351a756f30f"; + sha256 = "0b6m579i3wrx1m69mqkdng5gjfssprxx0pg45kzrdi68sh0zr5d1"; + }; + } + + { + goPackagePath = "golang.org/x/sync"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sync"; + rev = "1d60e4601c6f"; + sha256 = "046jlanz2lkxq1r57x9bl6s4cvfqaic6p2xybsj8mq1120jv4rs6"; + }; + } + + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "164713f0dfce"; + sha256 = "1qn9vvyqsaaj0az0rbilzc4pfv9sl4vh78c2g37yya5gcdnarh3w"; + }; + } + + { + goPackagePath = "golang.org/x/text"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/text"; + rev = "1cbadb444a80"; + sha256 = "0ih9ysagh4ylj08393497sscf3yziybc6acg4mrh0wa7mld75j56"; + }; + } + + { + goPackagePath = "golang.org/x/tools"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/tools"; + rev = "e531a2a1c15f"; + sha256 = "0740w56nmjqdj7ld1h3gpcpi3x8n81bdx0pp267rz9hmwkrb2s1c"; + }; + } + + { + goPackagePath = "gopkg.in/check.v1"; + fetch = { + type = "git"; + url = "https://gopkg.in/check.v1"; + rev = "788fd7840127"; + sha256 = "0v3bim0j375z81zrpr5qv42knqs0y2qv2vkjiqi5axvb78slki1a"; + }; + } + + { + goPackagePath = "gopkg.in/yaml.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/yaml.v2"; + rev = "eb3733d160e7"; + sha256 = "1srhvcaa9db3a6xj29mkjr5kg33y71pclrlx4vcwz5m1lgb5c7q6"; + }; + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d358f043e380..4026889d21e6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14745,6 +14745,8 @@ with pkgs; gopkgs = callPackage ../development/tools/gopkgs { }; + gosec = callPackage ../development/tools/gosec { }; + govers = callPackage ../development/tools/govers { }; govendor = callPackage ../development/tools/govendor { };