Skip to content

feat: add code issues workflow for listing Snyk Code issues - #157

Draft
fsargent wants to merge 1 commit into
snyk-code-issuesfrom
snyk-code-issues-command
Draft

feat: add code issues workflow for listing Snyk Code issues#157
fsargent wants to merge 1 commit into
snyk-code-issuesfrom
snyk-code-issues-command

Conversation

@fsargent

@fsargent fsargent commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description

Introduces a new code issues workflow (code.issues) that lists Snyk Code issues for a resolved project via the Snyk REST API.

The workflow resolves a target project either by an explicit --project-id UUID or by looking it up using --remote-repo-url and --target-reference. Once resolved, it fetches issues from the /rest/orgs/{org}/issues endpoint, normalizes them into a consistent structure, and outputs results either as a formatted table or JSON.

Key behaviours:

  • Issues are filtered by an --ignored flag (true, false, or all) and an optional --severity-threshold.
  • Results are sorted by severity (highest first).
  • Pagination is supported via --limit (10–100) and --all to fetch all pages automatically.
  • Issue locations are extracted from a range of attribute shapes, including nested coordinates[].representations[].sourceLocation structures.
  • The raw JSON:API resource is preserved on each issue in the JSON output.

A new GetCodeIssuesFlagSet() function exposes the flag definitions, and WORKFLOWID_CODE_ISSUES registers the workflow with the engine during Init.

Checklist

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

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

@snyk-io

snyk-io Bot commented Jun 9, 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 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


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.

@fsargent fsargent mentioned this pull request Jun 9, 2026
3 tasks
@snyk-io

snyk-io Bot commented Jun 9, 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.

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.

1 participant