Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apidef/mcp/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@
t.Run("return error when requested version is not of semver", func(t *testing.T) {
reqOASVersion := "a.0.3"
_, err = GetMCPSchema(reqOASVersion)
expectedErr := fmt.Errorf("Malformed version: %s", reqOASVersion)
expectedErr := fmt.Errorf("malformed version: %s", reqOASVersion)
assert.Equal(t, expectedErr, err)

Check warning on line 426 in apidef/mcp/validator_test.go

View check run for this annotation

probelabs / Visor: quality

architecture Issue

Asserting on the exact error string can lead to brittle tests that fail on minor, non-functional changes in dependency error messages. The capitalization change from 'Malformed' to 'malformed' that necessitated this change is a good example.
Raw output
Consider using `assert.ErrorContains(t, err, "malformed version")` to make the test more resilient to cosmetic changes in the error message, while still verifying that the correct type of error is returned.
})

t.Run("return 3.1 schema when version 3.1 is requested", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion apidef/oas/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@
t.Run("return error when requested version is not of semver", func(t *testing.T) {
reqOASVersion := "a.0.3"
_, err = GetOASSchema(reqOASVersion)
expectedErr := fmt.Errorf("Malformed version: %s", reqOASVersion)
expectedErr := fmt.Errorf("malformed version: %s", reqOASVersion)
assert.Equal(t, expectedErr, err)

Check warning on line 415 in apidef/oas/validator_test.go

View check run for this annotation

probelabs / Visor: quality

architecture Issue

Asserting on the exact error string can lead to brittle tests that fail on minor, non-functional changes in dependency error messages. The capitalization change from 'Malformed' to 'malformed' that necessitated this change is a good example.
Raw output
Consider using `assert.ErrorContains(t, err, "malformed version")` to make the test more resilient to cosmetic changes in the error message, while still verifying that the correct type of error is returned.
})

t.Run("return 3.1 schema when version 3.1 is requested", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion apidef/streams/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@
t.Run("return error when requested version is not of semver", func(t *testing.T) {
reqOASVersion := "a.0.3"
_, err = GetOASSchema(reqOASVersion)
expectedErr := fmt.Errorf("Malformed version: %s", reqOASVersion)
expectedErr := fmt.Errorf("malformed version: %s", reqOASVersion)
assert.Equal(t, expectedErr, err)

Check warning on line 302 in apidef/streams/validator_test.go

View check run for this annotation

probelabs / Visor: quality

architecture Issue

Asserting on the exact error string can lead to brittle tests that fail on minor, non-functional changes in dependency error messages. The capitalization change from 'Malformed' to 'malformed' that necessitated this change is a good example.
Raw output
Consider using `assert.ErrorContains(t, err, "malformed version")` to make the test more resilient to cosmetic changes in the error message, while still verifying that the correct type of error is returned.
})

t.Run("return 3.1 schema when version 3.1 is requested", func(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
github.com/TykTechnologies/graphql-translator v0.0.0-20250602105400-41c2e7514a36
github.com/TykTechnologies/murmur3 v0.0.0-20230310161213-aad17efd5632
github.com/TykTechnologies/openid2go v0.1.2
github.com/TykTechnologies/storage v1.3.0
github.com/TykTechnologies/tyk-pump v1.13.0-rc2.0.20251023125113-bc7641d42e63
github.com/TykTechnologies/storage v1.3.1
github.com/TykTechnologies/tyk-pump v1.14.1-rc2

Check warning on line 33 in go.mod

View check run for this annotation

probelabs / Visor: security

security Issue

This change updates core data handling dependencies (`storage` and `tyk-pump`) to support a new major version of the PostgreSQL driver (`pgx v5`). Such a significant upgrade within a dependency can introduce security vulnerabilities if the migration is not handled perfectly. Potential risks include new SQL injection vectors if parameterization APIs changed, or weakened TLS enforcement if connection logic was altered.
Raw output
It is crucial to verify that these updated dependencies have undergone a security review and targeted testing for issues related to the `pgx v5` migration. Confirm that the maintainers of `storage` and `tyk-pump` have validated their new versions against common database security risks before integrating them.

Check warning on line 33 in go.mod

View check run for this annotation

probelabs / Visor: architecture

architecture Issue

This PR updates core dependencies (`storage` and `tyk-pump`) to support a new major version of a transitive dependency, the database driver `pgx v5`. This constitutes a significant architectural change with the potential for behavioral shifts or regressions. The pull request description is empty and provides no context, motivation, or summary of testing for this critical update. Major dependency changes that affect core functionality must be thoroughly documented to allow for proper risk assessment and architectural review.
Raw output
Update the pull request description to detail the reasons for this dependency upgrade. The description should include: 1) The motivation for moving to `pgx v5`. 2) A summary of the key changes in `storage v1.3.1` and `tyk-pump v1.14.1-rc2`. 3) A description of the testing performed to validate that the gateway's PostgreSQL integration remains stable and performant.
github.com/akutz/memconn v0.1.0
github.com/bshuster-repo/logrus-logstash-hook v1.1.0
github.com/buger/jsonparser v1.1.2
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ github.com/TykTechnologies/openid2go v0.1.2 h1:WXctksOahA/epTVVvbn9iNUuMXKRr0ksr
github.com/TykTechnologies/openid2go v0.1.2/go.mod h1:gYfkqeWa+lY3Xz/Z2xYtIzmYXynlgKZaBIbPCqdcdMA=
github.com/TykTechnologies/opentelemetry v0.0.25 h1:Qen0fTy8EZHY7my1fokOrm0vcyOsBHwnyvXBG/bS87A=
github.com/TykTechnologies/opentelemetry v0.0.25/go.mod h1:FoJH6aRf8W+Rs9/Csvayfy3U2p4+vp46dj0CuGMBLSU=
github.com/TykTechnologies/storage v1.3.0 h1:y/ORW7hSZHw8Pr0aSaxN1bXH/u7tuhOW/RRiPkaQNLo=
github.com/TykTechnologies/storage v1.3.0/go.mod h1:psPnFQBWQ/gBQKGHrviJqXQ5HCz8EwTWm41RWpunosM=
github.com/TykTechnologies/storage v1.3.1 h1:UzfrAillaXXe5AHeIGUHVf/1niLPNJChMWrqgjCiAjY=
github.com/TykTechnologies/storage v1.3.1/go.mod h1:fw7yR9/LgVFVAlaQFLypFnfsIP/JOkF/tAsgAwMkKj0=
github.com/TykTechnologies/structviewer v1.2.0 h1:wV3AyTmWCZ3n7/llp+6xuDjnS/EJ/Ct/HG2pPE9+VX8=
github.com/TykTechnologies/structviewer v1.2.0/go.mod h1:XKJbqX8Q7n9FUrqTK58yVZUi5zWAkeRcULcPLDoWvvY=
github.com/TykTechnologies/tyk-pump v1.13.0-rc2.0.20251023125113-bc7641d42e63 h1:6n4yFtsBhcQayXzY8AdTKlmaJGw2Z3Uqm6ARIETmiVA=
github.com/TykTechnologies/tyk-pump v1.13.0-rc2.0.20251023125113-bc7641d42e63/go.mod h1:oTgH2TL6Qjon1Sh3PmcijwOxLetcyu+7DohJr4VwM+c=
github.com/TykTechnologies/tyk-pump v1.14.1-rc2 h1:FZVTGv+m/J1gU8PRtCUhvQgpfb2/umQVorstdv+xi1I=
github.com/TykTechnologies/tyk-pump v1.14.1-rc2/go.mod h1:av5P8OrDOrYtlXz2fqjw23lfBW/vZPleLwdc9+nmOv4=
github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
Expand Down
Loading