Skip to content

Commit c50b3ea

Browse files
committed
2 parents e814f1f + 056ba3c commit c50b3ea

File tree

4 files changed

+28
-15
lines changed

4 files changed

+28
-15
lines changed

.evergreen/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,14 @@ tasks:
657657
binary: bash
658658
args: [*task-runner, check-fmt, check-license, check-modules, lint]
659659

660+
- name: govulncheck
661+
tags: ["static-analysis"]
662+
commands:
663+
- command: subprocess.exec
664+
params:
665+
binary: bash
666+
args: [*task-runner, govulncheck]
667+
660668
- name: pull-request-helpers
661669
allowed_requesters: ["patch", "github_pr"]
662670
commands:

Taskfile.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ tasks:
8585
- GOOS=linux GOARCH=ppc64le etc/golangci-lint.sh
8686
- GOOS=linux GOARCH=s390x etc/golangci-lint.sh
8787

88+
govulncheck: bash etc/govulncheck.sh
89+
8890
update-notices: bash etc/generate_notices.pl > THIRD-PARTY-NOTICES
8991

9092
### Local testing tasks. ###

etc/govulncheck.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
4+
# Use a specific Go version so that local govulncheck results are consistent
5+
# with CI results.
6+
#
7+
# Note: this needs to be updated if the listed Go version has vulnerabilities
8+
# discovered because they will show up in the scan results along with Go Driver
9+
# and dependency vulnerabilities.
10+
GO_VERSION=1.24.5
11+
12+
go install golang.org/dl/go$GO_VERSION@latest
13+
go${GO_VERSION} download
14+
go install golang.org/x/vuln/cmd/govulncheck@latest
15+
16+
# govulncheck uses the Go binary it finds from the PATH, so modify PATH to point
17+
# to the Go version we just downloaded.
18+
PATH="$(go${GO_VERSION} env GOROOT)/bin:$PATH" govulncheck -show verbose ./...

internal/spectest/skip.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -212,21 +212,6 @@ var skipTests = map[string][]string{
212212
// TODO(GODRIVER-2016): Convert transactions spec tests to unified test
213213
// format.
214214
"Convert transactions spec tests to unified test format (GODRIVER-2016)": {
215-
"TestUnifiedSpec/transactions/tests/unified/error-labels.json/do_not_add_UnknownTransactionCommitResult_label_to_MaxTimeMSExpired_inside_transaction",
216-
"TestUnifiedSpec/transactions/tests/unified/error-labels.json/do_not_add_UnknownTransactionCommitResult_label_to_MaxTimeMSExpired_inside_transactions",
217-
"TestUnifiedSpec/transactions/tests/unified/error-labels.json/add_UnknownTransactionCommitResult_label_to_MaxTimeMSExpired",
218-
"TestUnifiedSpec/transactions/tests/unified/error-labels.json/add_UnknownTransactionCommitResult_label_to_writeConcernError_MaxTimeMSExpired",
219-
"TestUnifiedSpec/transactions/tests/unified/retryable-commit.json/commitTransaction_applies_majority_write_concern_on_retries",
220-
"TestUnifiedSpec/transactions/tests/unified/run-command.json/run_command_with_secondary_read_preference_in_client_option_and_primary_read_preference_in_transaction_options",
221-
"TestUnifiedSpec/transactions/tests/unified/transaction-options.json/transaction_options_inherited_from_client",
222-
"TestUnifiedSpec/transactions/tests/unified/transaction-options.json/transaction_options_inherited_from_defaultTransactionOptions",
223-
"TestUnifiedSpec/transactions/tests/unified/transaction-options.json/startTransaction_options_override_defaults",
224-
"TestUnifiedSpec/transactions/tests/unified/transaction-options.json/defaultTransactionOptions_override_client_options",
225-
"TestUnifiedSpec/transactions/tests/unified/transaction-options.json/readConcern_local_in_defaultTransactionOptions",
226-
"TestUnifiedSpec/transactions/tests/unified/transaction-options.json/readPreference_inherited_from_client",
227-
"TestUnifiedSpec/transactions/tests/unified/transaction-options.json/readPreference_inherited_from_defaultTransactionOptions",
228-
"TestUnifiedSpec/transactions/tests/unified/transaction-options.json/startTransaction_overrides_readPreference",
229-
"TestUnifiedSpec/transactions/tests/unified/retryable-commit.json/commitTransaction_fails_after_Interrupted",
230215
"TestUnifiedSpec/transactions-convenient-api/tests/unified/callback-retry.json/callback_is_not_retried_after_non-transient_error_(DuplicateKeyError)",
231216
"TestUnifiedSpec/transactions-convenient-api/tests/unified/callback-retry.json/callback_succeeds_after_multiple_connection_errors",
232217
"TestUnifiedSpec/transactions-convenient-api/tests/unified/commit-retry.json/commitTransaction_retry_only_overwrites_write_concern_w_option",

0 commit comments

Comments
 (0)