Skip to content

Commit

Permalink
✅ Update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tosone committed Apr 21, 2024
1 parent 1eab765 commit 6758f55
Show file tree
Hide file tree
Showing 53 changed files with 1,607 additions and 1,519 deletions.
58 changes: 31 additions & 27 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@ name: "CodeQL"

on:
push:
branches: [ "main" ]
branches:
- main
- gh-readonly-queue/main/*
- release-*
pull_request:
branches: [ "main" ]
branches:
- main
schedule:
- cron: '45 0 * * 4'
- cron: "0 0 * * *"

jobs:
analyze:
Expand All @@ -20,28 +24,28 @@ jobs:
fail-fast: false
matrix:
include:
- language: go
build-mode: manual
- language: go
build-mode: manual
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- run: corepack enable
- if: matrix.language == 'go'
run: |
cd web
yarn install --immutable
yarn build
cd ..
make build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- run: corepack enable
- if: matrix.language == 'go'
run: |
cd web
yarn install --immutable
yarn build
cd ..
make build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,12 @@ conf/sigma-dev.yaml

# database
*.db
*.db*

pkg/**/*.html

.vscode/
.zed/

*.tar.gz
*.tar
Expand Down
146 changes: 72 additions & 74 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ module github.com/go-sigma/sigma
go 1.22.0

require (
code.gitea.io/sdk/gitea v0.17.1
code.gitea.io/sdk/gitea v0.18.0
github.com/BurntSushi/toml v1.3.2
github.com/IBM/sarama v1.43.0
github.com/IBM/sarama v1.43.1
github.com/Masterminds/sprig/v3 v3.2.3
github.com/alicebob/miniredis/v2 v2.32.1
github.com/aliyun/aliyun-oss-go-sdk v3.0.2+incompatible
github.com/anchore/syft v1.0.1
github.com/aquasecurity/trivy v0.49.1
github.com/aws/aws-sdk-go v1.51.1
github.com/aws/aws-sdk-go v1.51.25
github.com/caarlos0/env/v9 v9.0.0
github.com/casbin/casbin/v2 v2.84.1
github.com/casbin/gorm-adapter/v3 v3.21.0
github.com/containers/podman/v5 v5.0.1
github.com/casbin/casbin/v2 v2.87.1
github.com/casbin/gorm-adapter/v3 v3.24.0
github.com/containers/podman/v5 v5.0.2
github.com/deckarep/golang-set/v2 v2.6.0
github.com/distribution/distribution/v3 v3.0.0-alpha.1
github.com/distribution/reference v0.5.0
github.com/distribution/reference v0.6.0
github.com/docker/cli v25.0.5+incompatible
github.com/docker/docker v25.0.5+incompatible
github.com/dustin/go-humanize v1.0.1
github.com/fatih/color v1.16.0
github.com/glebarez/sqlite v1.11.0
github.com/go-git/go-git/v5 v5.11.0
github.com/go-git/go-git/v5 v5.12.0
github.com/go-playground/validator v9.31.0+incompatible
github.com/go-resty/resty/v2 v2.11.0
github.com/go-sql-driver/mysql v1.8.0
github.com/go-resty/resty/v2 v2.12.0
github.com/go-sql-driver/mysql v1.8.1
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/golang-migrate/migrate/v4 v4.17.0
github.com/google/go-github/v53 v53.2.0
Expand All @@ -38,20 +38,20 @@ require (
github.com/jackc/pgx/v4 v4.18.3
github.com/jinzhu/copier v0.4.0
github.com/json-iterator/go v1.1.12
github.com/labstack/echo-contrib v0.15.0
github.com/labstack/echo/v4 v4.11.4
github.com/labstack/echo-contrib v0.17.1
github.com/labstack/echo/v4 v4.12.0
github.com/matoous/go-nanoid v1.5.0
github.com/matoous/go-nanoid/v2 v2.0.0
github.com/mattn/go-sqlite3 v1.14.22
github.com/mholt/archiver/v3 v3.5.1
github.com/moby/buildkit v0.13.0
github.com/opencontainers/distribution-spec/specs-go v0.0.0-20240315192218-7ac9a4cdd778
github.com/moby/buildkit v0.13.1
github.com/opencontainers/distribution-spec/specs-go v0.0.0-20240325152230-75d28161dfed
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.0
github.com/redis/go-redis/v9 v9.5.1
github.com/robfig/cron/v3 v3.0.1
github.com/rs/zerolog v1.32.0
github.com/sigstore/cosign/v2 v2.2.3
github.com/sigstore/cosign/v2 v2.2.4
github.com/smartystreets/goconvey v1.8.1
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.0
Expand All @@ -62,23 +62,23 @@ require (
github.com/tencentyun/cos-go-sdk-v5 v0.7.47
github.com/tidwall/gjson v1.17.1
github.com/wagslane/go-password-validator v0.3.0
github.com/xanzy/go-gitlab v0.100.0
github.com/xanzy/go-gitlab v0.103.0
go.uber.org/mock v0.4.0
golang.org/x/crypto v0.21.0
golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f
golang.org/x/net v0.22.0
golang.org/x/oauth2 v0.18.0
golang.org/x/crypto v0.22.0
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f
golang.org/x/net v0.24.0
golang.org/x/oauth2 v0.19.0
gopkg.in/yaml.v3 v3.0.1
gorm.io/driver/mysql v1.5.4
gorm.io/driver/mysql v1.5.6
gorm.io/driver/postgres v1.5.7
gorm.io/driver/sqlite v1.5.5
gorm.io/gen v0.3.25
gorm.io/gorm v1.25.7
gorm.io/gen v0.3.26
gorm.io/gorm v1.25.9
gorm.io/plugin/dbresolver v1.5.1
gorm.io/plugin/soft_delete v1.2.1
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
k8s.io/client-go v0.29.3
k8s.io/api v0.30.0
k8s.io/apimachinery v0.30.0
k8s.io/client-go v0.30.0
)

require (
Expand All @@ -90,14 +90,14 @@ require (
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/hcsshim v0.12.0-rc.3 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.0 // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
github.com/acobaugh/osrelease v0.1.0 // indirect
github.com/alicebob/gopher-json v0.0.0-20230218143504-906a9b012302 // indirect
github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a // indirect
github.com/anchore/go-struct-converter v0.0.0-20230627203149-c72ef8859ca9 // indirect
github.com/anchore/packageurl-go v0.1.1-0.20240202171727-877e1747d426 // indirect
github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 // indirect
github.com/anchore/packageurl-go v0.1.1-0.20240312213626-055233e539b4 // indirect
github.com/anchore/stereoscope v0.0.2-0.20240229175558-fe426d1b1c84 // indirect
github.com/andybalholm/brotli v1.0.6 // indirect
github.com/aquasecurity/trivy-db v0.0.0-20231005141211-4fc651f7ac8d // indirect
Expand All @@ -107,8 +107,8 @@ require (
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect
github.com/casbin/govaluate v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/casbin/govaluate v1.1.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chzyer/readline v1.5.1 // indirect
github.com/cilium/ebpf v0.11.0 // indirect
github.com/clbanning/mxj v1.8.4 // indirect
Expand All @@ -119,7 +119,7 @@ require (
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/containers/buildah v1.35.3 // indirect
github.com/containers/common v0.58.1 // indirect
github.com/containers/common v0.58.2 // indirect
github.com/containers/image/v5 v5.30.0 // indirect
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect
github.com/containers/ocicrypt v1.1.9 // indirect
Expand Down Expand Up @@ -158,16 +158,16 @@ require (
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/analysis v0.22.0 // indirect
github.com/go-openapi/errors v0.21.1 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/loads v0.21.5 // indirect
github.com/go-openapi/runtime v0.27.1 // indirect
github.com/go-openapi/spec v0.20.13 // indirect
github.com/go-openapi/strfmt v0.22.2 // indirect
github.com/go-openapi/swag v0.22.10 // indirect
github.com/go-openapi/validate v0.22.4 // indirect
github.com/go-openapi/analysis v0.23.0 // indirect
github.com/go-openapi/errors v0.22.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/loads v0.22.0 // indirect
github.com/go-openapi/runtime v0.28.0 // indirect
github.com/go-openapi/spec v0.21.0 // indirect
github.com/go-openapi/strfmt v0.23.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-openapi/validate v0.24.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466 // indirect
Expand All @@ -178,10 +178,10 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/certificate-transparency-go v1.1.7 // indirect
github.com/google/certificate-transparency-go v1.1.8 // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-containerregistry v0.19.0 // indirect
github.com/google/go-containerregistry v0.19.1 // indirect
github.com/google/go-intervals v0.0.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
Expand Down Expand Up @@ -225,7 +225,7 @@ require (
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/labstack/gommon v0.4.2 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/letsencrypt/boulder v0.0.0-20231026200631-000cd05d5491 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/magiconair/properties v1.8.7 // indirect
Expand All @@ -235,8 +235,7 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-shellwords v1.0.12 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/microsoft/go-mssqldb v1.5.0 // indirect
github.com/microsoft/go-mssqldb v1.6.0 // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/mistifyio/go-zfs/v3 v3.0.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
Expand Down Expand Up @@ -272,10 +271,10 @@ require (
github.com/pkg/sftp v1.13.6 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/proglottis/gpgme v0.1.3 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.53.0 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/rivo/uniseg v0.4.7 // indirect
Expand All @@ -285,15 +284,15 @@ require (
github.com/sassoftware/relic v7.2.1+incompatible // indirect
github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e // indirect
github.com/secure-systems-lab/go-securesystemslib v0.8.0 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/shibumi/go-pathspec v1.3.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sigstore/fulcio v1.4.3 // indirect
github.com/sigstore/rekor v1.3.4 // indirect
github.com/sigstore/sigstore v1.8.2 // indirect
github.com/sigstore/timestamp-authority v1.2.1 // indirect
github.com/sigstore/fulcio v1.4.5 // indirect
github.com/sigstore/rekor v1.3.6 // indirect
github.com/sigstore/sigstore v1.8.3 // indirect
github.com/sigstore/timestamp-authority v1.2.2 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
github.com/smarty/assertions v1.15.1 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spdx/tools-golang v0.5.4-0.20231108154018-0c0f394b5e1a // indirect
Expand Down Expand Up @@ -326,24 +325,23 @@ require (
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.18.0 // indirect
golang.org/x/tools v0.20.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/grpc v1.61.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
Expand All @@ -353,15 +351,15 @@ require (
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gorm.io/datatypes v1.2.0 // indirect
gorm.io/driver/sqlserver v1.5.1 // indirect
gorm.io/driver/sqlserver v1.5.3 // indirect
gorm.io/hints v1.1.2 // indirect
k8s.io/klog/v2 v2.120.0 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect
modernc.org/libc v1.41.0 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.7.2 // indirect
modernc.org/sqlite v1.29.2 // indirect
modernc.org/sqlite v1.29.6 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
Expand Down
Loading

0 comments on commit 6758f55

Please sign in to comment.