@@ -19,6 +19,7 @@ package code
19
19
import (
20
20
"bytes"
21
21
"context"
22
+ "github.com/snyk/go-application-framework/pkg/local_workflows/code_workflow/sast_contract"
22
23
"os"
23
24
"sync"
24
25
"time"
@@ -47,8 +48,7 @@ import (
47
48
"github.com/snyk/snyk-ls/internal/progress"
48
49
"github.com/snyk/snyk-ls/internal/uri"
49
50
50
- "github.com/snyk/go-application-framework/pkg/common"
51
- "github.com/snyk/go-application-framework/pkg/configuration"
51
+ "github.com/snyk/go-application-framework/pkg/local_workflows/code_workflow"
52
52
)
53
53
54
54
type ScanStatus struct {
@@ -151,13 +151,13 @@ func (sc *Scanner) Scan(ctx context.Context, path types.FilePath, folderPath typ
151
151
return issues , err
152
152
}
153
153
gafConfig := sc .C .Engine ().GetConfiguration ()
154
- sastResponse := gafConfig .Get (configuration . SAST_SETTINGS )
154
+ sastResponse := gafConfig .Get (code_workflow . ConfigurationSastSettings )
155
155
156
- sastSettings , ok := sastResponse .(common .SastResponse )
156
+ sastSettingsPtr , ok := sastResponse .(* sast_contract .SastResponse )
157
157
if ! ok {
158
158
return issues , errors .New ("Failed to convert SAST settings to the correct type" )
159
159
}
160
-
160
+ sastSettings := * sastSettingsPtr
161
161
if ! sc .isSastEnabled (sastSettings ) {
162
162
return issues , errors .New ("SAST is not enabled" )
163
163
}
@@ -166,7 +166,7 @@ func (sc *Scanner) Scan(ctx context.Context, path types.FilePath, folderPath typ
166
166
sc .updateCodeApiLocalEngine (sastSettings )
167
167
}
168
168
169
- sc .C .SetDeepCodeAIFixEnabled (sastResponse .AutofixEnabled )
169
+ sc .C .SetDeepCodeAIFixEnabled (sastSettings .AutofixEnabled )
170
170
171
171
sc .changedFilesMutex .Lock ()
172
172
if sc .changedPaths [folderPath ] == nil {
0 commit comments