Skip to content

refactor: always use native Snyk Code workflow - #160

Open
fsargent wants to merge 1 commit into
mainfrom
refactor/always-use-native-code-workflow
Open

refactor: always use native Snyk Code workflow#160
fsargent wants to merge 1 commit into
mainfrom
refactor/always-use-native-code-workflow

Conversation

@fsargent

@fsargent fsargent commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Description

Remove the remaining legacy CLI dispatch branch from the code-client-go workflow. The code.test workflow now always records implementation=native, registers the SCLE auth URL when needed, and runs code_workflow.EntryPointNative directly.

This also removes the native/consistent-ignores feature-flag gate from Init, deletes the EntryPointLegacy wrapper, updates tests that previously exercised the legacy fallback, and updates README workflow documentation.

Checklist

  • Tests updated and all runnable tests succeed
  • Linted
  • README.md updated, if user-facing

Validation run locally:

  • make format
  • go mod tidy
  • go build ./...
  • go test -cover ./...
  • go test ./pkg/code ./internal/commands/code_workflow
  • gofmt -w -l -e pkg/code/code.go pkg/code/code_test.go
  • .bin/golangci-lint run --fix ./pkg/code/... ./internal/commands/code_workflow/...

Known local validation blocker:

  • make generate could not complete because scripts/download-test-api.py requires GITHUB_PAT to be set.

🚨 After having merged, please update the snyk-ls and CLI go.mod to pull in latest client.

Copy link
Copy Markdown
Contributor Author

How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@snyk-io

snyk-io Bot commented Jun 25, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues
Secrets 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@snyk-io

snyk-io Bot commented Jun 25, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@fsargent
fsargent marked this pull request as ready for review July 28, 2026 17:03
@fsargent
fsargent requested a review from a team as a code owner July 28, 2026 17:03
@snyk-pr-review-bot

This comment has been minimized.

@fsargent
fsargent force-pushed the refactor/always-use-native-code-workflow branch from 755d0e4 to 80d5e40 Compare August 14, 2026 15:52
@snyk-pr-review-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected
📚 Repository Context Analyzed

This review considered 13 relevant code sections from 11 files (average relevance: 0.96)

🤖 Repository instructions applied (from AGENTS.md)

Comment thread pkg/code/code.go

func useNativeImplementation(config configuration.Configuration, logger *zerolog.Logger, sastEnabled bool, scleEnabled bool) bool {
useConsistentIgnoresFF := config.GetBool(configuration.FF_CODE_CONSISTENT_IGNORES)
useNativeImplementationFF := config.GetBool(configuration.FF_CODE_NATIVE_IMPLEMENTATION)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the evaluation here?
The snykCodeClientNativeImplementation is disabled in fedRAMP env.
https://github.com/snyk/registry/blob/4b930c34f61661b32e27d9d2ceb086a71337b58d/helm/values/fedramp-production.yaml#L83

Comment thread pkg/code/code.go
}

func useNativeImplementation(config configuration.Configuration, logger *zerolog.Logger, sastEnabled bool, scleEnabled bool) bool {
useConsistentIgnoresFF := config.GetBool(configuration.FF_CODE_CONSISTENT_IGNORES)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still an org/group level feature flag.
https://github.com/snyk/registry/blob/4b930c34f61661b32e27d9d2ceb086a71337b58d/src/lib/domain/internal-developer-tooling/features/index.ts#L1249-L1251

Despite it is set to ' true ' by default, customers can still disable it in the org/group settings page.
Can we remove the evaluation here?

Comment thread pkg/code/code.go
}

scleEnabled := config.GetBool(ConfigurationSlceEnabled)
nativeImplementation := useNativeImplementation(config, logger, sastEnabled, scleEnabled)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance that both flags would be set to false?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants