Skip to content

Commit

Permalink
Merge pull request #31 from Conjur-Enterprise/fix-gosec
Browse files Browse the repository at this point in the history
CNJR-5372: Fix 'nosec' comments
  • Loading branch information
szh authored and GitHub Enterprise committed Jun 25, 2024
2 parents 510f413 + 1bb865c commit dbc5a3d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,17 @@ To run linting checks via the Code Climate golint engine, simply run:
./bin/check_style
```

### gosec

We use [gosec](https://github.com/securego/gosec) to perform static analysis of
our codebase in our CI for all changed code. To run gosec locally for the entire
repository, simply run:

```sh-session
go install github.com/securego/gosec/v2/cmd/gosec@latest
$(go env GOPATH)/bin/gosec ./...
```

### Testing Individual Connectors

For instructions on how to test individual connectors, see the README.md file in
Expand Down
3 changes: 1 addition & 2 deletions bin/juxtaposer/tester/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,12 @@ func (manager *DriverManager) ensureWantedDbDataState() error {
insertItemStatement := QueryTypes["insertItem"] +
fmt.Sprintf("(%s)", manager.Tester.GetQueryMarkers(5))

/* #nosec */
err = manager.Tester.Query(insertItemStatement,
fmt.Sprintf("%s%d", NameFieldPrefix, itemIndex),
itemIndex,
time.Now().AddDate(0, 0, itemIndex),
float32(itemIndex)*10,
rand.Int31()&0x1,
rand.Int31()&0x1, // #nosec
)

if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion third_party/go-mssqldb
Submodule go-mssqldb updated 3 files
+11 −11 go.mod
+2 −2 go.sum
+2 −4 tds.go

0 comments on commit dbc5a3d

Please sign in to comment.