Skip to content

Commit

Permalink
Develop (#487)
Browse files Browse the repository at this point in the history
* fix data-races when running analysis (#477)

* fix possible wrong path concat on windows

* enable data race detection on make test

* fix data-races when running analysis

Previously when we start an analysis of language/tool we controlled the
state of execution using the monitor package, but many objects use the
same instance of monitor doing updates and reads concurrent resulting
in possible data races. This commit drops the monitor package and replace
to use the `sync.WaitGroup` to control the state of go routines.
An improvement was also made to control the timeout of analysis using
`time.After` function to receive the channel when timeout occurred or close
the `done` channel when analysis finish. An mutex was added on Service
to avoid data races when adding errors on Analysis.

* improvement on Swift rules description (#479)

* feature/dependency-check (#478)

* Adding owasp dependency check formatter

* Adding tests and fixing lint

* Adding flag to enable owasp dependency check

* Fixing pipeline errors

* Fixing some errors

* Updating devkit version

* Feature/dotnet cli (#480)

* Adding dotnet cli dependency check

* Fixing lint errors

* Adding lisence header

* Improving security code scan

* Adding validation to not found solution in scs, adding license headers

* Adding code in security code scan

* Updating csharp example with vulnerable dependencies, adding validation to failed build in security code scan

* Fixing some errors

* Adding code, line and filepath in dotnet cli. Fixing some errors

* Updating horusec json

* Fixing commit authors issues

* Fixing some issues found during tests

* Adding validation to dotnetcli output

* Fixing lint error

* Fixing lint errors

* Fixing lint error

* Updating horusec config json

* Updating go modules and adding missing unity test

* Fixing error to remove .horusec

* [skip ci] Update versioning file

* avoid time.Sleep to log analysis timeout status (#482)

Previously, to warn the user that the analysis is still running, we used
time.Sleep to print how much time is left for the timeout, however, if the
analysis has already been completed, we still need to wait for the end of
time.Sleep to finish the analysis. This change removes time.Sleep and uses
time.Tick to print the message, so, if the analysis is finished before the
next retry, we do not lock the analysis with time.Sleep.

* Feature/nancy (#483)

* Adding nancy dependency check for go

* Adding nancy unity tests

* Adding vulnerable dependencies in go example project

* Fixing errors found during tests

* Fixing unity tests and pipeline errors

* Updating devkit version

* Fixing pipeline errors

* Updating go dockerfile to use nancy binary from github

* Fixing go sum

* Updating config json

Co-authored-by: matheusalcantarazup <[email protected]>
Co-authored-by: nathanmartinszup <[email protected]>
Co-authored-by: wilian <[email protected]>
Co-authored-by: nathanmartinszup <[email protected]>
  • Loading branch information
5 people authored Jul 12, 2021
1 parent fea00fa commit 149ac46
Show file tree
Hide file tree
Showing 22 changed files with 2,026 additions and 52 deletions.
131 changes: 131 additions & 0 deletions examples/go/example1/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
module github.com/ZupIT/horusec/example1

go 1.16

require (
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 // indirect
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 // indirect
github.com/Microsoft/go-winio v0.4.15 // indirect
github.com/VividCortex/gohistogram v1.0.0 // indirect
github.com/ZupIT/horusec-engine v0.2.8 // indirect
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 // indirect
github.com/antchfx/xpath v1.1.11 // indirect
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a // indirect
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect
github.com/auth0/go-jwt-middleware v1.0.0 // indirect
github.com/bmatcuk/doublestar v1.3.2 // indirect
github.com/bmatcuk/doublestar/v2 v2.0.4 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec // indirect
github.com/containerd/containerd v1.4.1 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1 // indirect
github.com/dhui/dktest v0.3.2 // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v20.10.5+incompatible // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/edsrzf/mmap-go v1.0.0 // indirect
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 // indirect
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/gin-gonic/gin v1.6.3 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.1 // indirect
github.com/go-chi/chi v4.1.2+incompatible // indirect
github.com/go-chi/cors v1.1.1 // indirect
github.com/go-enry/go-enry/v2 v2.6.0 // indirect
github.com/go-logfmt/logfmt v0.5.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/swag v0.19.12 // indirect
github.com/go-ozzo/ozzo-validation/v4 v4.3.0 // indirect
github.com/go-resty/resty/v2 v2.3.0 // indirect
github.com/go-sql-driver/mysql v1.5.0 // indirect
github.com/gocarina/gocsv v0.0.0-20201208093247-67c824bc04d4 // indirect
github.com/gofrs/uuid v3.3.0+incompatible // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect
github.com/golang/protobuf v1.4.3 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/google/go-cmp v0.5.1 // indirect
github.com/google/renameio v0.1.0 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/graphql-go/graphql v0.7.9 // indirect
github.com/hashicorp/go-multierror v1.1.0 // indirect
github.com/hashicorp/go-version v1.2.0 // indirect
github.com/hudl/fargo v1.3.0 // indirect
github.com/iancoleman/strcase v0.1.3 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3 v1.1.0 // indirect
github.com/jackc/pgproto3/v2 v2.0.6 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/puddle v1.1.3 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/jstemmer/go-junit-report v0.9.1 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/kofalt/go-memoize v0.0.0-20200917044458-9b55a8d73e1c // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
github.com/kr/pty v1.1.8 // indirect
github.com/labstack/echo v3.3.10+incompatible
github.com/labstack/gommon v0.3.0 // indirect
github.com/lib/pq v1.10.0 // indirect
github.com/lunixbochs/vtclean v1.0.0 // indirect
github.com/magiconair/properties v1.8.4 // indirect
github.com/manifoldco/promptui v0.8.0 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/oklog/oklog v0.3.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 // indirect
github.com/otiai10/copy v1.5.0 // indirect
github.com/pborman/uuid v1.2.0 // indirect
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/performancecopilot/speed v3.0.0+incompatible // indirect
github.com/prometheus/client_golang v1.7.1 // indirect
github.com/prometheus/procfs v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.3.0 // indirect
github.com/segmentio/ksuid v1.0.3 // indirect
github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc // indirect
github.com/sony/gobreaker v0.4.1 // indirect
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.0.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/streadway/amqp v1.0.0 // indirect
github.com/stretchr/objx v0.3.0 // indirect
github.com/stretchr/testify v1.7.0 // indirect
github.com/urfave/cli/v2 v2.3.0 // indirect
go.uber.org/atomic v1.6.0 // indirect
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee // indirect
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 // indirect
golang.org/x/image v0.0.0-20190802002840-cff245a6509b // indirect
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 // indirect
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 // indirect
golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e // indirect
golang.org/x/text v0.3.4 // indirect
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20201106154455-f9bfe239b0ba // indirect
google.golang.org/grpc v1.36.0 // indirect
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.1 // indirect
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect
gopkg.in/gcfg.v1 v1.2.3 // indirect
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/ldap.v2 v2.5.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gorm.io/driver/sqlite v1.1.4 // indirect
gorm.io/gorm v1.20.12 // indirect
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 // indirect
)
Loading

0 comments on commit 149ac46

Please sign in to comment.