Skip to content

Commit 1db741e

Browse files
TCE-1371 Bump Trivy 0.65.0 (#168)
* TCE-1371 Bump Trivy 0.65.0 * fix: Use flag `--vuln-severity-source auto` to make trivy compute results severity --------- Co-authored-by: André Meira <[email protected]>
1 parent a4a07c2 commit 1db741e

File tree

12 files changed

+617
-576
lines changed

12 files changed

+617
-576
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
version: 2.1
22

33
orbs:
4-
codacy: codacy/base@12.0.0
4+
codacy: codacy/base@12.2.0
55
codacy_plugins_test: codacy/[email protected]
66

77
references:
88
install_trivy_and_download_dbs: &install_trivy_and_download_dbs
99
persist_to_workspace: true
10-
# https://aquasecurity.github.io/trivy/v0.59/getting-started/installation/#install-script
10+
# https://aquasecurity.github.io/trivy/v0.65/getting-started/installation/#install-script
1111
cmd: |
12-
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b . v0.59.1
12+
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b . v0.65.0
1313
mkdir cache
1414
./trivy --cache-dir ./cache image --download-db-only
1515
1616
build_and_publish_docker: &build_and_publish_docker
1717
persist_to_workspace: true
1818
cmd: |
19-
docker build -t $CIRCLE_PROJECT_REPONAME:latest --build-arg TRIVY_VERSION=0.59.1 .
19+
docker build -t $CIRCLE_PROJECT_REPONAME:latest --build-arg TRIVY_VERSION=0.65.0 .
2020
docker save --output docker-image.tar $CIRCLE_PROJECT_REPONAME:latest
2121
2222
workflows:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ bin
1313
cache
1414
*.gen.go
1515
.codacyrc
16+
17+
18+
#Ignore vscode AI rules
19+
.github/copilot-instructions.md

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23-alpine as builder
1+
FROM golang:1.24-alpine as builder
22

33
ARG TRIVY_VERSION=dev
44
ENV TRIVY_VERSION=$TRIVY_VERSION

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ go mod download
2828
3. Run the DocGenerator:
2929

3030
```bash
31-
go run ./doc-generator.go &&\
32-
scala-cli doc-generator.sc
31+
go run ./cmd/docgen
3332
```
3433

3534
## Test

docs/description/vulnerability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
## Insecure dependencies detection (critical and high severity)
2-
Detects insecure dependencies (critical and high severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities.
2+
Detects insecure dependencies (critical and high severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
## Insecure dependencies detection (medium severity)
2-
Detects insecure dependencies (medium severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities.
2+
Detects insecure dependencies (medium severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
## Insecure dependencies detection (minor severity)
2-
Detects insecure dependencies (minor severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities.
2+
Detects insecure dependencies (minor severity) by checking the libraries declared in the package manager and flagging used library versions with known security vulnerabilities.

go.mod

Lines changed: 152 additions & 140 deletions
Large diffs are not rendered by default.

go.sum

Lines changed: 428 additions & 417 deletions
Large diffs are not rendered by default.

internal/tool/runner.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import (
99

1010
// RunnerFactory can create new Trivy runners.
1111
type RunnerFactory interface {
12-
NewRunner(ctx context.Context, config flag.Options) (artifact.Runner, error)
12+
NewRunner(ctx context.Context, config flag.Options, targetKind artifact.TargetKind, opts ...artifact.RunnerOption) (artifact.Runner, error)
1313
}
1414

1515
type defaultRunnerFactory struct{}
1616

17-
func (f defaultRunnerFactory) NewRunner(ctx context.Context, config flag.Options) (artifact.Runner, error) {
18-
runner, err := artifact.NewRunner(ctx, config)
17+
func (f defaultRunnerFactory) NewRunner(ctx context.Context, config flag.Options, targetKind artifact.TargetKind, opts ...artifact.RunnerOption) (artifact.Runner, error) {
18+
runner, err := artifact.NewRunner(ctx, config, targetKind, opts...)
1919
if err != nil {
2020
return nil, &ToolError{msg: "Failed to initialize Codacy Trivy", w: err}
2121
}

0 commit comments

Comments
 (0)