diff --git a/.github/workflows/veinmind-tools.yml b/.github/workflows/veinmind-tools.yml index b40d4a9e..55c91f0c 100644 --- a/.github/workflows/veinmind-tools.yml +++ b/.github/workflows/veinmind-tools.yml @@ -64,7 +64,7 @@ jobs: build-amd64-veinmind-malicious: runs-on: ubuntu-18.04 container: - image: veinmind/go1.16:1.0.5-stretch + image: veinmind/go1.16:1.1.0-stretch env: CI_GOOS: linux CI_GOARCH: amd64 @@ -104,7 +104,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-18.04 container: - image: veinmind/go1.16:1.0.5-stretch + image: veinmind/go1.16:1.1.0-stretch env: CI_GOOS: linux CI_GOARCH: amd64 diff --git a/veinmind-asset/Dockerfile b/veinmind-asset/Dockerfile index 84195cd3..7347321c 100644 --- a/veinmind-asset/Dockerfile +++ b/veinmind-asset/Dockerfile @@ -1,10 +1,10 @@ -FROM veinmind/go1.18:1.0.5-stretch as builder +FROM veinmind/go1.18:1.1.0-stretch as builder WORKDIR /build COPY . . RUN sed -i 's/\.\.\/veinmind-common/\.\/veinmind-common/g' go.mod RUN chmod +x script/build.sh && /bin/bash script/build.sh -FROM veinmind/base:1.0.5-stretch as release +FROM veinmind/base:1.1.0-stretch as release WORKDIR /tool COPY --from=builder /build/veinmind-asset . RUN echo "#!/bin/bash\n\n./veinmind-asset \$*" > /tool/entrypoint.sh && chmod +x /tool/entrypoint.sh && chmod +x /tool/veinmind-asset diff --git a/veinmind-asset/analyzer/analyzer.go b/veinmind-asset/analyzer/analyzer.go index 9121a98e..5a568427 100644 --- a/veinmind-asset/analyzer/analyzer.go +++ b/veinmind-asset/analyzer/analyzer.go @@ -36,13 +36,6 @@ func ScanImage(image api.Image, parallel int64) (model.ScanImageResult, error) { var artifactOpt artifact.Option var analysisOpt analyzer.AnalysisOptions - // 忽略存在seek的jar扫描和go binary扫描 - // artifactOpt.DisabledAnalyzers = []analyzer.Type{ - disableType := []analyzer.Type{ - analyzer.TypeJar, - analyzer.TypeGoBinary, - } - var result []types.BlobInfo ag := analyzer.NewAnalyzerGroup(artifactOpt.AnalyzerGroup, artifactOpt.DisabledAnalyzers) @@ -63,10 +56,10 @@ func ScanImage(image api.Image, parallel int64) (model.ScanImageResult, error) { if err != nil { return nil, err } - return AtempFile{file, nil}, nil + return file, nil } - ag.AnalyzeFile(ctx, &wg, limit, res, "", path, info, open, disableType, analysisOpt) + ag.AnalyzeFile(ctx, &wg, limit, res, "", path, info, open, nil, analysisOpt) return nil }) wg.Wait() @@ -104,10 +97,10 @@ func ScanImage(image api.Image, parallel int64) (model.ScanImageResult, error) { if err != nil { return nil, err } - return AtempFile{file, nil}, nil + return file, nil } - ag.AnalyzeFile(ctx, &wg, limit, res, "", path, info, open, disableType, analysisOpt) + ag.AnalyzeFile(ctx, &wg, limit, res, "", path, info, open, nil, analysisOpt) return nil }) wg.Wait() diff --git a/veinmind-asset/cmd/cli.go b/veinmind-asset/cmd/cli.go index 717024f4..ad55093c 100644 --- a/veinmind-asset/cmd/cli.go +++ b/veinmind-asset/cmd/cli.go @@ -1,9 +1,6 @@ package main import ( - "os" - "time" - "github.com/aquasecurity/fanal/types" api "github.com/chaitin/libveinmind/go" "github.com/chaitin/libveinmind/go/cmd" @@ -14,6 +11,8 @@ import ( "github.com/chaitin/veinmind-tools/veinmind-asset/utils" "github.com/chaitin/veinmind-tools/veinmind-common/go/service/report" "github.com/spf13/cobra" + "os" + "time" ) var results = []model.ScanImageResult{} diff --git a/veinmind-asset/go.mod b/veinmind-asset/go.mod index 8ee1c527..780edab6 100644 --- a/veinmind-asset/go.mod +++ b/veinmind-asset/go.mod @@ -7,8 +7,8 @@ replace github.com/chaitin/veinmind-tools/veinmind-common/go v0.0.0-202204260343 require ( github.com/aquasecurity/fanal v0.0.0-20220424145104-2e3e0044128c github.com/aquasecurity/go-dep-parser v0.0.0-20220422134844-880747206031 - github.com/chaitin/libveinmind v1.0.7 - github.com/chaitin/veinmind-tools/veinmind-common/go v0.0.0-20220426034314-a81ea749560f + github.com/chaitin/libveinmind v1.1.0 + github.com/chaitin/veinmind-tools/veinmind-common/go v0.0.0-20220526023645-674f9dea184f github.com/spf13/cobra v1.4.0 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c ) diff --git a/veinmind-asset/go.sum b/veinmind-asset/go.sum index 44269fe0..8e6e7e9c 100644 --- a/veinmind-asset/go.sum +++ b/veinmind-asset/go.sum @@ -245,8 +245,11 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chaitin/libveinmind v1.0.7 h1:+kC6Z4y81I9erSmS9tchbOF8ymmBhCKoK82ZoVL4MuQ= github.com/chaitin/libveinmind v1.0.7/go.mod h1:bUUjhkyZyZ9sTetpm5rOfj5TU3hr5moE3VQM+IgHrbw= +github.com/chaitin/libveinmind v1.1.0 h1:yqFpO1euqZGytN1wDPXJJ5hSAnbMGa5wb3ojf4yDLrQ= +github.com/chaitin/libveinmind v1.1.0/go.mod h1:bUUjhkyZyZ9sTetpm5rOfj5TU3hr5moE3VQM+IgHrbw= +github.com/chaitin/veinmind-tools/veinmind-common/go v0.0.0-20220526023645-674f9dea184f h1:hix53aJ0ujb23HN7U526T6t1d+8tkuhgx9ZPEAQwmPY= +github.com/chaitin/veinmind-tools/veinmind-common/go v0.0.0-20220526023645-674f9dea184f/go.mod h1:UdK75T5EhRBbCIaeJzjA3b9kly3uvTvzYITDzwHPQTA= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= diff --git a/veinmind-backdoor/Dockerfile b/veinmind-backdoor/Dockerfile index 153e2076..6ff48a7e 100644 --- a/veinmind-backdoor/Dockerfile +++ b/veinmind-backdoor/Dockerfile @@ -1,4 +1,4 @@ -FROM veinmind/python3:1.0.5-stretch +FROM veinmind/python3:1.1.0-stretch WORKDIR /tool ADD . . RUN pip install -r requirements.txt diff --git a/veinmind-backdoor/requirements.txt b/veinmind-backdoor/requirements.txt index 54cce410..88ed04bc 100644 --- a/veinmind-backdoor/requirements.txt +++ b/veinmind-backdoor/requirements.txt @@ -1,3 +1,3 @@ click==7.1.2 jsonpickle==2.1.0 -veinmind==1.0.7 +veinmind==1.1.0 diff --git a/veinmind-basic/go.mod b/veinmind-basic/go.mod index a5232e72..f32dd386 100644 --- a/veinmind-basic/go.mod +++ b/veinmind-basic/go.mod @@ -3,7 +3,7 @@ module github.com/chaitin/veinmind-tools/veinmind-basic go 1.17 require ( - github.com/chaitin/libveinmind v1.0.7 + github.com/chaitin/libveinmind v1.1.0 github.com/chaitin/veinmind-tools/veinmind-common/go v0.0.0-20220526023645-674f9dea184f github.com/distribution/distribution v2.8.1+incompatible github.com/pkg/errors v0.8.1 diff --git a/veinmind-history/Dockerfile b/veinmind-history/Dockerfile index 153e2076..6ff48a7e 100644 --- a/veinmind-history/Dockerfile +++ b/veinmind-history/Dockerfile @@ -1,4 +1,4 @@ -FROM veinmind/python3:1.0.5-stretch +FROM veinmind/python3:1.1.0-stretch WORKDIR /tool ADD . . RUN pip install -r requirements.txt diff --git a/veinmind-history/requirements.txt b/veinmind-history/requirements.txt index 9a9d3845..7fefedf2 100644 --- a/veinmind-history/requirements.txt +++ b/veinmind-history/requirements.txt @@ -1,4 +1,4 @@ click==7.1.2 jsonpickle==2.1.0 pytoml==0.1.21 -veinmind==1.0.7 +veinmind==1.1.0 diff --git a/veinmind-malicious/Dockerfile b/veinmind-malicious/Dockerfile index 76506442..9e2940d3 100644 --- a/veinmind-malicious/Dockerfile +++ b/veinmind-malicious/Dockerfile @@ -1,4 +1,4 @@ -FROM veinmind/base:1.0.5-stretch +FROM veinmind/base:1.1.0-stretch # install clamav COPY dockerfiles/sources.list /etc/apt/sources.list RUN apt update && apt-get install -y clamav clamav-daemon && freshclam diff --git a/veinmind-malicious/go.mod b/veinmind-malicious/go.mod index 35e79206..301eae63 100644 --- a/veinmind-malicious/go.mod +++ b/veinmind-malicious/go.mod @@ -7,7 +7,7 @@ replace github.com/chaitin/veinmind-tools/veinmind-common/go v1.0.0 => ../veinmi require ( code.cloudfoundry.org/bytefmt v0.0.0-20211005130812-5bb3c17173e5 github.com/VirusTotal/vt-go v0.0.0-20211209151516-855a1e790678 - github.com/chaitin/libveinmind v1.0.7 + github.com/chaitin/libveinmind v1.1.0 github.com/chaitin/veinmind-tools/veinmind-common/go v1.0.0 github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e github.com/joho/godotenv v1.4.0 diff --git a/veinmind-runner/Dockerfile b/veinmind-runner/Dockerfile index fcdb311d..67f147a9 100644 --- a/veinmind-runner/Dockerfile +++ b/veinmind-runner/Dockerfile @@ -1,4 +1,4 @@ -FROM veinmind/go1.16:1.0.5-stretch as builder +FROM veinmind/go1.16:1.1.0-stretch as builder WORKDIR /build COPY . . RUN sed -i 's/\.\.\/veinmind-common/\.\/veinmind-common/g' go.mod @@ -10,7 +10,7 @@ FROM veinmind/veinmind-sensitive:latest as sensitive FROM veinmind/veinmind-history:latest as history FROM veinmind/veinmind-backdoor:latest as backdoor -FROM veinmind/python3:1.0.5-stretch as release +FROM veinmind/python3:1.1.0-stretch as release WORKDIR /tool COPY --from=builder /build/veinmind-runner . COPY --from=weakpass /tool/veinmind-weakpass . diff --git a/veinmind-runner/go.mod b/veinmind-runner/go.mod index 40893f56..b2f3e4d8 100644 --- a/veinmind-runner/go.mod +++ b/veinmind-runner/go.mod @@ -7,7 +7,7 @@ replace github.com/chaitin/veinmind-tools/veinmind-common/go v1.0.0 => ../veinmi require ( github.com/BurntSushi/toml v0.3.1 github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/chaitin/libveinmind v1.0.7 + github.com/chaitin/libveinmind v1.1.0 github.com/chaitin/veinmind-tools/veinmind-common/go v1.0.0 github.com/containerd/containerd v1.6.4 github.com/distribution/distribution v2.8.1+incompatible diff --git a/veinmind-sensitive/Dockerfile b/veinmind-sensitive/Dockerfile index 153e2076..6ff48a7e 100644 --- a/veinmind-sensitive/Dockerfile +++ b/veinmind-sensitive/Dockerfile @@ -1,4 +1,4 @@ -FROM veinmind/python3:1.0.5-stretch +FROM veinmind/python3:1.1.0-stretch WORKDIR /tool ADD . . RUN pip install -r requirements.txt diff --git a/veinmind-sensitive/requirements.txt b/veinmind-sensitive/requirements.txt index faa49f16..3123711c 100644 --- a/veinmind-sensitive/requirements.txt +++ b/veinmind-sensitive/requirements.txt @@ -3,4 +3,4 @@ click==7.1.2 jsonpickle==2.1.0 python_magic==0.4.25 pytoml==0.1.21 -veinmind==1.0.7 +veinmind==1.1.0 diff --git a/veinmind-weakpass/Dockerfile b/veinmind-weakpass/Dockerfile index c0ac736c..fcb7d293 100644 --- a/veinmind-weakpass/Dockerfile +++ b/veinmind-weakpass/Dockerfile @@ -1,10 +1,10 @@ -FROM veinmind/go1.16:1.0.5-stretch as builder +FROM veinmind/go1.16:1.1.0-stretch as builder WORKDIR /build COPY . . RUN sed -i 's/\.\.\/veinmind-common/\.\/veinmind-common/g' go.mod RUN chmod +x script/build.sh && /bin/bash script/build.sh -FROM veinmind/base:1.0.5-stretch as release +FROM veinmind/base:1.1.0-stretch as release WORKDIR /tool COPY --from=builder /build/veinmind-weakpass . RUN echo "#!/bin/bash\n\n./veinmind-weakpass \$*" > /tool/entrypoint.sh && chmod +x /tool/entrypoint.sh && chmod +x /tool/veinmind-weakpass diff --git a/veinmind-weakpass/go.mod b/veinmind-weakpass/go.mod index e7ce0efd..c15ef24c 100644 --- a/veinmind-weakpass/go.mod +++ b/veinmind-weakpass/go.mod @@ -4,8 +4,8 @@ go 1.16 require ( github.com/Jeffail/tunny v0.1.4 - github.com/chaitin/libveinmind v1.0.7 - github.com/chaitin/veinmind-tools/veinmind-common/go v0.0.0-20220519060236-8e2e62c000b9 // indirect + github.com/chaitin/libveinmind v1.1.0 + github.com/chaitin/veinmind-tools/veinmind-common/go v0.0.0-20220519060236-8e2e62c000b9 github.com/sirupsen/logrus v1.8.1 github.com/spf13/cobra v1.3.0 golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce diff --git a/veinmind-weakpass/go.sum b/veinmind-weakpass/go.sum index b51d37f6..ce9dc3bf 100644 --- a/veinmind-weakpass/go.sum +++ b/veinmind-weakpass/go.sum @@ -71,9 +71,9 @@ github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/chaitin/libveinmind v1.0.4 h1:pn4ow8JHTwTDNygieawEGk9k+r0MIEBYuUfVuzz73pk= -github.com/chaitin/libveinmind v1.0.4/go.mod h1:bUUjhkyZyZ9sTetpm5rOfj5TU3hr5moE3VQM+IgHrbw= github.com/chaitin/libveinmind v1.0.7/go.mod h1:bUUjhkyZyZ9sTetpm5rOfj5TU3hr5moE3VQM+IgHrbw= +github.com/chaitin/libveinmind v1.1.0 h1:yqFpO1euqZGytN1wDPXJJ5hSAnbMGa5wb3ojf4yDLrQ= +github.com/chaitin/libveinmind v1.1.0/go.mod h1:bUUjhkyZyZ9sTetpm5rOfj5TU3hr5moE3VQM+IgHrbw= github.com/chaitin/veinmind-tools/veinmind-common/go v0.0.0-20220519060236-8e2e62c000b9 h1:XG1J/H9RbBmXFw16RiCLFkO1Ee++8czk2oJ55P1ADUI= github.com/chaitin/veinmind-tools/veinmind-common/go v0.0.0-20220519060236-8e2e62c000b9/go.mod h1:UdK75T5EhRBbCIaeJzjA3b9kly3uvTvzYITDzwHPQTA= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=