Skip to content

Commit bffd91d

Browse files
authored
Merge pull request #6213 from snyk/chore/CLI-1187_update_1.1300
chore: update 1.1300
2 parents 1bcaafc + 6c0ae1d commit bffd91d

File tree

22 files changed

+353
-223
lines changed

22 files changed

+353
-223
lines changed

.circleci/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,8 +1165,8 @@ workflows:
11651165
- main
11661166
- '/release.*/'
11671167

1168-
- trigger-building-dxt:
1169-
name: Trigger building mcp-dxt (stable)
1168+
- trigger-build-agentic-integration:
1169+
name: Trigger building agentic-integration (stable)
11701170
context:
11711171
- team-hammerhead-common-deploy-tokens
11721172
- devex_cli_docker_hub
@@ -1744,13 +1744,13 @@ jobs:
17441744
command: ./release-scripts/upload-artifacts.sh trigger-snyk-images
17451745
- failed-release-notification
17461746

1747-
trigger-building-dxt:
1747+
trigger-build-agentic-integration:
17481748
executor: docker-amd64
17491749
steps:
17501750
- prepare-workspace
17511751
- run:
1752-
name: Trigger build-and-release workflow at mcp-dxt
1753-
command: ./release-scripts/upload-artifacts.sh trigger_build_dxt
1752+
name: Trigger build-and-release workflow at agentic-integration-wrappers
1753+
command: ./release-scripts/upload-artifacts.sh trigger_build_agentic_integration
17541754
- failed-release-notification
17551755

17561756
noop:

.gitleaksignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,4 @@ ccd03cce97470452766ab397f2ba770dbb2e002e:test/jest/unit/lib/iac/drift/fixtures/a
8686
test/jest/acceptance/instrumentation.spec.ts:snyk-api-token:19
8787
1b65935bc7c69b1029d7c63808af211ae6030c98:test/fixtures/sast/shallow_sast_webgoat/JWTFinalEndpointTest.java:jwt:31
8888
test/jest/acceptance/snyk-code/snyk-code-integration.spec.ts:snyk-api-token:181
89+
test/jest/acceptance/error-catalog.spec.ts:snyk-api-token:32

binary-releases/RELEASE_NOTES.md

Lines changed: 16 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,25 @@
1-
## [1.1300.0](https://github.com/snyk/snyk/compare/v1.1299.1...v1.1300.0) (2025-10-01)
1+
## [1.1300.0](https://github.com/snyk/snyk/compare/v1.1299.1...v1.1300.0) (2025-10-08)
22

33
The Snyk CLI is being deployed to different deployment channels, users can select the stability level according to their needs. For details please see [this documentation](https://docs.snyk.io/snyk-cli/releases-and-channels-for-the-snyk-cli)
44

55
### Features
66

7-
* [CN-249] support scanning system JARs ([54e84d8](https://github.com/snyk/snyk/commit/54e84d8f4efda07f21b0e729f75440fa4608966c))
8-
* [CN-342] Add TargetOS to output of container scan ([aa55cd9](https://github.com/snyk/snyk/commit/aa55cd90683995d4143f43173eddee61ecf88167))
9-
* add linux static experimental binary ([86305ef](https://github.com/snyk/snyk/commit/86305ef4d9e769d483e33e51d84760685d8050c9))
10-
* add runAutomationDetails ID to SARIF output ([3e232e5](https://github.com/snyk/snyk/commit/3e232e52a105620c638b211bbc1a8baddeddb170))
11-
* add support for godot projects ([d9fc200](https://github.com/snyk/snyk/commit/d9fc2008287349c63b3144634549c77cb3864fd9))
12-
* enable reachability checks in OS extension [OSF-91] ([efaa4bc](https://github.com/snyk/snyk/commit/efaa4bc9554f187cebfd7705c0c2775c2d1f2459))
13-
* **monitor:** add --reachability-id support ([58af8cc](https://github.com/snyk/snyk/commit/58af8ccfca7c1f5cbe8c216abd181787c78cbaec))
14-
* re-enable sbom reachability user journey test ([ca72c3e](https://github.com/snyk/snyk/commit/ca72c3e63d8676060d9cc6435ab603b96911e2c2))
15-
* skip sbom reachability test ([ceb25b8](https://github.com/snyk/snyk/commit/ceb25b8c09ea1058acf01a227b6c57cf5f9f0048))
16-
* support new test service commit ID metadata ([1df4d26](https://github.com/snyk/snyk/commit/1df4d2619cee501cb4a1ac2e9480f0d2c7ddcf08))
17-
* **test:** Adds support for maven metaversions ([f321ffa](https://github.com/snyk/snyk/commit/f321ffa6efdf2f269f0b7fb1a87b91332a7da18e))
7+
* **general:** Improve SARIF compatibility by adding runAutomationDetails ([3e232e5](https://github.com/snyk/snyk/commit/3e232e52a105620c638b211bbc1a8baddeddb170))
8+
* **container:** Add support scanning system JARs ([54e84d8](https://github.com/snyk/snyk/commit/54e84d8f4efda07f21b0e729f75440fa4608966c))
9+
* **container:** Add TargetOS to output of container scan ([aa55cd9](https://github.com/snyk/snyk/commit/aa55cd90683995d4143f43173eddee61ecf88167))
10+
* **test:** Add support for godot projects ([d9fc200](https://github.com/snyk/snyk/commit/d9fc2008287349c63b3144634549c77cb3864fd9))
11+
* **test:** Add support for maven metaversions ([f321ffa](https://github.com/snyk/snyk/commit/f321ffa6efdf2f269f0b7fb1a87b91332a7da18e))
12+
* **language-server:** Add CVSSv4 Links in IDE Issue Details
13+
* **mcp:** Workflow and performance improvements
1814

1915

2016
### Bug Fixes
2117

22-
* adapt input directory handling to preserve whitespaces ([5a0f7eb](https://github.com/snyk/snyk/commit/5a0f7eb5dfb05b0d6a5fa5fc54fcf473bf3827e1))
23-
* **auth:** Fix improper regex during auth that can lead to SSRF ([18466b3](https://github.com/snyk/snyk/commit/18466b3bbe60b4b1aad6d409f1cab62ff2df3fb7))
24-
* changed fixture used for integration test for faster success ([a5ac939](https://github.com/snyk/snyk/commit/a5ac939e5b417237dcb290e150327119fb0c1f77))
25-
* **cicd:** "gobject-introspection: no bottle available" error when setting up macos acceptance tests ([7891cc2](https://github.com/snyk/snyk/commit/7891cc2da2d7949ee07c1b047a73f7242ab67508))
26-
* **cicd:** follow redirect with wget ([e267b96](https://github.com/snyk/snyk/commit/e267b96a9c12932b1458532cd6510be4930b0823))
27-
* conforming the way we take precedence of auth config values ([57ae3ca](https://github.com/snyk/snyk/commit/57ae3ca91b6a19e6e7850b803373664b91450fd9))
28-
* display error details for all project scans on failing targets ([36d14f9](https://github.com/snyk/snyk/commit/36d14f940003d093df0bdc9d22a32d9b26b6b252))
29-
* enhancing shell spawn hardening from OSS plugins ([f7881f1](https://github.com/snyk/snyk/commit/f7881f1c4b4dcce465fb6db7df24048a73a37e04))
30-
* Ensure to not redact crucial debug values ([8432371](https://github.com/snyk/snyk/commit/84323710d666431e6494f584677ae958ba9ac4ac))
31-
* Fix reduced configuration cache usage ([ae111a3](https://github.com/snyk/snyk/commit/ae111a32e9508db3366b37435e99002ed73a49f6))
32-
* fixing broken alpine installation ([57a5a92](https://github.com/snyk/snyk/commit/57a5a927c7f63b63c70521b2d81b05ad4bf3c9bf))
33-
* fixing host auto-detection bug in snyk auth ([1fd2e56](https://github.com/snyk/snyk/commit/1fd2e569d3f3a4022275b317be041e460996f4ba))
34-
* **iac:** upgrade iac components to address a vulnerability [IAC-3439] ([eaaaf84](https://github.com/snyk/snyk/commit/eaaaf844237b430d9d9ee7109ada5b5bd2e103a5))
35-
* ignore casing fix in the policy lib ([b432406](https://github.com/snyk/snyk/commit/b4324066fbdca2224e3a1aca223cde5b2b6e0ea2))
36-
* Increase tolerance for invalid input directories ([ce96a31](https://github.com/snyk/snyk/commit/ce96a3160de0b26a2b13ad1ea7eb58496f8fa1f6))
37-
* **instrumentation:** Fix mapping of floating point values ([c0be734](https://github.com/snyk/snyk/commit/c0be7342e1ef3d2e3116006ee86850cdbda20106))
38-
* **logging:** pass known CLI parameters to scrub out sensitive data ([0cf19a7](https://github.com/snyk/snyk/commit/0cf19a7dc8b761ec61d7ae0f3f5d160b0e2b0450))
39-
* making test fixtures in regression tests gradle 9 compatible ([5604157](https://github.com/snyk/snyk/commit/5604157481ae0bb68361f38826082c3f392a803b))
40-
* moving to a private docker repo ([2c96c50](https://github.com/snyk/snyk/commit/2c96c50a236e83e27b5195c22802ec28fa9d6c10))
41-
* requiring Node 20 as a minimum ([31254f3](https://github.com/snyk/snyk/commit/31254f3443045d7016a55ef054b7f41dda66b88e))
42-
* resolve project assets file path dynamically ([75a152e](https://github.com/snyk/snyk/commit/75a152ec29e91f9c37a26f0daed77a142cebef39))
43-
* updating wrong markdown files ([af688db](https://github.com/snyk/snyk/commit/af688db493b99b65e52583830509b26ac78b0370))
44-
* upgrade to go 1.24.6 ([045f864](https://github.com/snyk/snyk/commit/045f86465daaf5ff174f4541c673d4e43f79f9d2))
45-
* Use snyk-code-0006 for sast consistently ([e36f813](https://github.com/snyk/snyk/commit/e36f813ae20cd18c4012a744de9fbdc7d873a0e7))
46-
* using Gradle 9 on build image ([cc1f80d](https://github.com/snyk/snyk/commit/cc1f80dbcbb6492aa43c2b51a94ec4b1973c12f7))
47-
18+
* **container:** Fixed crashes when scanning docker images with very large files ([72cb040](https://github.com/snyk/snyk/commit/72cb04083d3c204d6755f194f7ccc6e522788f66))
19+
* **test:** Re-enable support for python 2.7 ([02c7fe3](https://github.com/snyk/snyk/commit/02c7fe373e3ec1a59d15de1f7fe87e461d3fafb5))
20+
* **test:** Improved error information when using --all-projects ([36d14f9](https://github.com/snyk/snyk/commit/36d14f940003d093df0bdc9d22a32d9b26b6b252))
21+
* **test:** Fix a bug due to case-sensitive ignores ([b432406](https://github.com/snyk/snyk/commit/b4324066fbdca2224e3a1aca223cde5b2b6e0ea2))
22+
* **test:** Resolve project assets file path dynamically ([75a152e](https://github.com/snyk/snyk/commit/75a152ec29e91f9c37a26f0daed77a142cebef39))
23+
* **iac:** Upgrade iac components to address a vulnerability [IAC-3439] ([eaaaf84](https://github.com/snyk/snyk/commit/eaaaf844237b430d9d9ee7109ada5b5bd2e103a5))
24+
* **logging:** Fix broken debug logs due to secret redaction by redacting all user input ([0cf19a7](https://github.com/snyk/snyk/commit/0cf19a7dc8b761ec61d7ae0f3f5d160b0e2b0450))
25+
* **language-server:** Multiple bugfixes

cliv2/cmd/cliv2/instrumentation.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ import _ "github.com/snyk/go-application-framework/pkg/networking/fips_enable"
66
import (
77
"os/exec"
88
"strings"
9+
"time"
910

1011
"github.com/snyk/go-application-framework/pkg/analytics"
1112
"github.com/snyk/go-application-framework/pkg/configuration"
13+
"github.com/snyk/go-application-framework/pkg/instrumentation"
14+
1215
localworkflows "github.com/snyk/go-application-framework/pkg/local_workflows"
1316
"github.com/snyk/go-application-framework/pkg/networking"
1417
"github.com/snyk/go-application-framework/pkg/networking/middleware"
@@ -48,3 +51,23 @@ func addRuntimeDetails(instrumentor analytics.InstrumentationCollector, ua netwo
4851
func addNetworkingDetails(instrumentor analytics.InstrumentationCollector, config configuration.Configuration) {
4952
instrumentor.AddExtension("network-request-attempts", config.GetInt(middleware.ConfigurationKeyRetryAttempts))
5053
}
54+
55+
func updateInstrumentationDataBeforeSending(cliAnalytics analytics.Analytics, startTime time.Time, ua networking.UserAgentInfo, exitCode int) {
56+
targetId, targetIdError := instrumentation.GetTargetId(globalConfiguration.GetString(configuration.INPUT_DIRECTORY), instrumentation.AutoDetectedTargetId, instrumentation.WithConfiguredRepository(globalConfiguration))
57+
if targetIdError != nil {
58+
globalLogger.Printf("Failed to derive target id, %v", targetIdError)
59+
}
60+
cliAnalytics.GetInstrumentation().SetTargetId(targetId)
61+
62+
if cliAnalytics.GetInstrumentation().GetDuration() == 0 {
63+
cliAnalytics.GetInstrumentation().SetDuration(time.Since(startTime))
64+
}
65+
66+
addRuntimeDetails(cliAnalytics.GetInstrumentation(), ua)
67+
addNetworkingDetails(cliAnalytics.GetInstrumentation(), globalConfiguration)
68+
69+
cliAnalytics.GetInstrumentation().AddExtension("exitcode", exitCode)
70+
if exitCode == 2 {
71+
cliAnalytics.GetInstrumentation().SetStatus(analytics.Failure)
72+
}
73+
}

cliv2/cmd/cliv2/logheaderfooter.go

Lines changed: 59 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -165,36 +165,54 @@ func writeLogHeader(config configuration.Configuration, networkAccess networking
165165
}
166166
}
167167

168-
func writeLogFooter(exitCode int, errs []error) {
168+
func writeLogFooter(exitCode int, errs []error, globalConfiguration configuration.Configuration, networkAccess networking.NetworkAccess) {
169+
const maxLength = 100
170+
globalLogger.Print("")
171+
globalLogger.Printf("------------ Summary ------------")
172+
// to make things easier to find, let's repeat the header before the footer
173+
writeLogHeader(globalConfiguration, networkAccess)
174+
169175
// output error details
170-
if exitCode > 1 && len(errs) > 0 {
171-
ecErrs := formatErrorCatalogErrors(errs)
176+
ecErrs := formatErrorCatalogErrors(errs)
177+
if len(ecErrs) > 0 {
178+
globalLogger.Print("")
179+
globalLogger.Printf("------------ Errors ------------")
172180

173-
for i, err := range ecErrs {
174-
tablePrint(fmt.Sprintf("Error (%d)", i), fmt.Sprintf("%s (%s)", err.ErrorCode, err.Title))
175-
tablePrint(" Type", err.Type)
176-
tablePrint(" Classification", err.Classification)
181+
for _, err := range ecErrs {
182+
tablePrint(strings.ToUpper(err.Level), fmt.Sprintf("%s (%s)", err.Title, err.ErrorCode))
177183

184+
description := err.Description
178185
// description
179-
if _, ok := err.Meta["description"]; ok && len(err.Description) == 0 {
180-
tablePrint(" Description", err.Meta["description"].(string))
186+
if _, ok := err.Meta["description"]; ok && len(description) == 0 {
187+
tmp, ok := err.Meta["description"].(string)
188+
if ok {
189+
description = tmp
190+
}
181191
}
182-
tablePrint(" Description", err.Description)
183192

184-
// details
185-
_, hasDetails := err.Meta["details"]
186-
if hasDetails && len(err.Meta["details"].([]string)) > 0 {
187-
tablePrint(" Details", "")
188-
for i, details := range utils.Dedupe(err.Meta["details"].([]string)) {
189-
tablePrint(fmt.Sprintf(" %d", i), details)
190-
}
193+
if len(description) > 0 {
194+
globalLogger.Print(" Description:")
195+
tablePrintMaxLength("", description, maxLength)
191196
}
192197

193198
// links
199+
err.Links = append(err.Links, err.Type)
194200
if len(err.Links) > 0 {
195201
tablePrint(" Links", "")
196-
for i, link := range err.Links {
197-
tablePrint(fmt.Sprintf(" %d", i), link)
202+
for _, link := range err.Links {
203+
tablePrint("", link)
204+
}
205+
}
206+
207+
globalLogger.Print("")
208+
209+
// details
210+
_, hasDetails := err.Meta["details"]
211+
if hasDetails && len(err.Meta["details"].([]string)) > 0 {
212+
for i, details := range utils.Dedupe(err.Meta["details"].([]string)) {
213+
globalLogger.Printf(" Instance %d:", i+1)
214+
tablePrintMaxLength("", details, maxLength)
215+
globalLogger.Print("")
198216
}
199217
}
200218

@@ -205,13 +223,34 @@ func writeLogFooter(exitCode int, errs []error) {
205223
for i, request := range err.Meta["requests"].([]string) {
206224
tablePrint(fmt.Sprintf(" %d", i), request)
207225
}
226+
globalLogger.Print("")
208227
}
209228
}
229+
} else {
230+
globalLogger.Print("")
210231
}
211-
tablePrint("Interaction", interactionId)
232+
212233
tablePrint("Exit Code", strconv.Itoa(exitCode))
213234
}
214235

236+
func tablePrintMaxLength(name string, value string, maxLength int) {
237+
for _, inputLine := range strings.Split(value, "\n") {
238+
tmp := inputLine
239+
for {
240+
line := tmp
241+
if len(tmp) > maxLength {
242+
line = tmp[:maxLength]
243+
}
244+
tmp = tmp[len(line):]
245+
tablePrint("", strings.TrimSpace(line))
246+
247+
if len(tmp) == 0 {
248+
break
249+
}
250+
}
251+
}
252+
}
253+
215254
func formatErrorCatalogErrors(errs []error) []snyk_errors.Error {
216255
var formattedErrs []snyk_errors.Error
217256

cliv2/cmd/cliv2/main.go

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ import (
3333
"github.com/spf13/cobra"
3434
"github.com/spf13/pflag"
3535

36+
"github.com/snyk/cli/cliv2/internal/cliv2"
37+
"github.com/snyk/cli/cliv2/internal/constants"
3638
cliv2utils "github.com/snyk/cli/cliv2/internal/utils"
3739

3840
localworkflows "github.com/snyk/go-application-framework/pkg/local_workflows"
@@ -42,8 +44,6 @@ import (
4244
workflows "github.com/snyk/go-application-framework/pkg/local_workflows/connectivity_check_extension"
4345
"github.com/snyk/go-application-framework/pkg/local_workflows/content_type"
4446

45-
"github.com/snyk/cli/cliv2/internal/cliv2"
46-
"github.com/snyk/cli/cliv2/internal/constants"
4747
ignoreworkflow "github.com/snyk/go-application-framework/pkg/local_workflows/ignore_workflow"
4848
"github.com/snyk/go-application-framework/pkg/local_workflows/json_schemas"
4949
"github.com/snyk/go-application-framework/pkg/local_workflows/output_workflow"
@@ -95,8 +95,7 @@ const (
9595
)
9696

9797
func main() {
98-
errorCode, errs := MainWithErrorCode()
99-
writeLogFooter(errorCode, errs)
98+
errorCode := MainWithErrorCode()
10099
os.Exit(errorCode)
101100
}
102101

@@ -520,7 +519,7 @@ func displayError(err error, userInterface ui.UserInterface, config configuratio
520519
}
521520
}
522521

523-
func MainWithErrorCode() (int, []error) {
522+
func MainWithErrorCode() int {
524523
initDebugBuild()
525524

526525
errorList := []error{}
@@ -612,7 +611,7 @@ func MainWithErrorCode() (int, []error) {
612611

613612
if err != nil {
614613
globalLogger.Print("Failed to init Workflow Engine!", err)
615-
return constants.SNYK_EXIT_CODE_ERROR, errorList
614+
return constants.SNYK_EXIT_CODE_ERROR
616615
}
617616

618617
// init context
@@ -674,23 +673,7 @@ func MainWithErrorCode() (int, []error) {
674673
exitCode := cliv2.DeriveExitCode(err)
675674
globalLogger.Printf("Deriving Exit Code %d (cause: %v)", exitCode, err)
676675

677-
targetId, targetIdError := instrumentation.GetTargetId(globalConfiguration.GetString(configuration.INPUT_DIRECTORY), instrumentation.AutoDetectedTargetId, instrumentation.WithConfiguredRepository(globalConfiguration))
678-
if targetIdError != nil {
679-
globalLogger.Printf("Failed to derive target id, %v", targetIdError)
680-
}
681-
cliAnalytics.GetInstrumentation().SetTargetId(targetId)
682-
683-
if cliAnalytics.GetInstrumentation().GetDuration() == 0 {
684-
cliAnalytics.GetInstrumentation().SetDuration(time.Since(startTime))
685-
}
686-
687-
addRuntimeDetails(cliAnalytics.GetInstrumentation(), ua)
688-
addNetworkingDetails(cliAnalytics.GetInstrumentation(), globalConfiguration)
689-
690-
cliAnalytics.GetInstrumentation().AddExtension("exitcode", exitCode)
691-
if exitCode == 2 {
692-
cliAnalytics.GetInstrumentation().SetStatus(analytics.Failure)
693-
}
676+
updateInstrumentationDataBeforeSending(cliAnalytics, startTime, ua, exitCode)
694677

695678
if !globalConfiguration.GetBool(configuration.ANALYTICS_DISABLED) {
696679
sendAnalytics(cliAnalytics, globalLogger)
@@ -704,7 +687,11 @@ func MainWithErrorCode() (int, []error) {
704687
globalLogger.Printf("Failed to cleanup %v", err)
705688
}
706689

707-
return exitCode, errorList
690+
if debugEnabled {
691+
writeLogFooter(exitCode, errorList, globalConfiguration, networkAccess)
692+
}
693+
694+
return exitCode
708695
}
709696

710697
func legacyCLITerminated(err error, errorList []error) error {

cliv2/cmd/cliv2/main_test.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func Test_MainWithErrorCode(t *testing.T) {
4545
os.Args = []string{"snyk", "--version"}
4646
defer func() { os.Args = oldArgs }()
4747

48-
errCode, _ := MainWithErrorCode()
48+
errCode := MainWithErrorCode()
4949
assert.False(t, globalConfiguration.GetBool(configuration.CONFIG_CACHE_DISABLED))
5050
assert.Equal(t, configuration.NoCacheExpiration, globalConfiguration.GetDuration(configuration.CONFIG_CACHE_TTL))
5151

@@ -60,18 +60,8 @@ func Test_MainWithErrorCode(t *testing.T) {
6060
os.Args = oldArgs
6161
}()
6262

63-
errCode, errs := MainWithErrorCode()
63+
errCode := MainWithErrorCode()
6464
assert.Equal(t, 2, errCode)
65-
66-
unauthorizedErrorCode := "SNYK-0005"
67-
var actualErrorCodes []string
68-
for _, err := range errs {
69-
var snykError snyk_errors.Error
70-
if errors.As(err, &snykError) {
71-
actualErrorCodes = append(actualErrorCodes, snykError.ErrorCode)
72-
}
73-
}
74-
assert.Contains(t, actualErrorCodes, unauthorizedErrorCode)
7565
})
7666
}
7767

cliv2/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ require (
1717
github.com/snyk/cli-extension-os-flows v0.0.0-20250915102829-6a59c2ef7e88
1818
github.com/snyk/cli-extension-sbom v0.0.0-20250801142135-ae472dafa4cd
1919
github.com/snyk/container-cli v0.0.0-20250321132345-1e2e01681dd7
20-
github.com/snyk/error-catalog-golang-public v0.0.0-20250912144134-a308b7983895
21-
github.com/snyk/go-application-framework v0.0.0-20251001122929-9233509171af
20+
github.com/snyk/error-catalog-golang-public v0.0.0-20251006093240-2d9cc5458485
21+
github.com/snyk/go-application-framework v0.0.0-20251006124522-e128dc93338d
2222
github.com/snyk/go-httpauth v0.0.0-20240307114523-1f5ea3f55c65
2323
github.com/snyk/snyk-iac-capture v0.6.5
24-
github.com/snyk/snyk-ls v0.0.0-20250930080011-490a08b5db19
24+
github.com/snyk/snyk-ls v0.0.0-20251007104647-18cf38d2c118
2525
github.com/spf13/cobra v1.9.1
2626
github.com/spf13/pflag v1.0.6
2727
github.com/stretchr/testify v1.10.0

0 commit comments

Comments
 (0)