Skip to content

Commit c7fab0a

Browse files
authored
fixed more vulnerabilities (#3252)
A few benign "vulnerabilities" are being detected in our test code. This PR cleans up tests that need unnecessary dependencies or credentials (e.g. certs). 1. Removed unnecessary go.mod from codescan fixture (bug #3125): the go mod is now generated dynamically during the test 2. Removed certificates and keys generated for test or demo purpose Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
1 parent 9db3a02 commit c7fab0a

6 files changed

Lines changed: 21 additions & 62 deletions

File tree

fixtures/bugs/3125/full/api/api.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build testintegration
2+
13
package api
24

35
import (
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1+
//go:build testintegration
2+
13
// Package classification awesome.
24
//
35
// Documentation of our awesome API.
46
//
5-
// Schemes: http
6-
// BasePath: /
7-
// Version: 1.0.0
8-
// Host: some-url.com
7+
// Schemes: http
8+
// BasePath: /
9+
// Version: 1.0.0
10+
// Host: some-url.com
911
//
10-
// Consumes:
11-
// - application/json
12+
// Consumes:
13+
// - application/json
1214
//
13-
// Produces:
14-
// - application/json
15+
// Produces:
16+
// - application/json
1517
//
16-
// Security:
17-
// - basic
18+
// Security:
19+
// - basic
1820
//
19-
// SecurityDefinitions:
20-
// basic:
21-
// type: basic
21+
// SecurityDefinitions:
22+
// basic:
23+
// type: basic
2224
//
2325
// swagger:meta
2426
package docs

fixtures/bugs/3125/full/docs/foorbar.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build testintegration
2+
13
package docs
24

35
import "swagger/api"

fixtures/bugs/3125/full/go.mod

Lines changed: 0 additions & 18 deletions
This file was deleted.

fixtures/bugs/3125/full/go.sum

Lines changed: 0 additions & 31 deletions
This file was deleted.

fixtures/bugs/3125/full/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//go:build testintegration
2+
13
package main
24

35
import (

0 commit comments

Comments
 (0)