feat: enable stdout and file TOON for OS and Secrets - #7250
Closed
robertolopezlopez wants to merge 3 commits into
Closed
feat: enable stdout and file TOON for OS and Secrets#7250robertolopezlopez wants to merge 3 commits into
robertolopezlopez wants to merge 3 commits into
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
robertolopezlopez
force-pushed
the
func/CLI-1827
branch
from
September 9, 2026 13:58
e0d5f18 to
065d24f
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 065d24f. Configure here.
robertolopezlopez
marked this pull request as draft
September 9, 2026 14:00
robertolopezlopez
force-pushed
the
func/CLI-1827
branch
from
September 9, 2026 14:09
feca852 to
98a05d0
Compare
robertolopezlopez
marked this pull request as ready for review
September 9, 2026 14:39
This comment has been minimized.
This comment has been minimized.
PR Reviewer Guide 🔍
|
robertolopezlopez
marked this pull request as draft
September 9, 2026 16:50
robertolopezlopez
force-pushed
the
func/CLI-1827
branch
from
September 9, 2026 17:10
d8af2b6 to
4a5440b
Compare
robertolopezlopez
force-pushed
the
func/CLI-1827
branch
from
September 9, 2026 17:12
4a5440b to
dca39ae
Compare
robertolopezlopez
marked this pull request as ready for review
September 9, 2026 17:12
Contributor
|
Why do we want to add this here, instead of in GAF? |
robertolopezlopez
marked this pull request as draft
September 10, 2026 07:36
robertolopezlopez
added this pull request to stack #7254
September 10, 2026 07:50
octavian-snyk
force-pushed
the
chore/CLI-1828
branch
from
September 10, 2026 11:14
71c80d7 to
b3f11e5
Compare
robertolopezlopez
removed this pull request from stack #7254
September 10, 2026 11:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

To be merged after #7239
... cut because github does not allow such long text
... cut because github does not allow such long text
... cut because github does not allow such long text
... cut because github does not allow such long text
... cut because github does not allow such long text
... cut because github does not allow such long text
{"$schema": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json","version": "2.1.0","runs": [{"tool": {"driver" : {"name" : "Snyk Open Source","semanticVersion" : "1.1307.0-preview.c3e52bd2b8af9be2a8d746dd1e8623c4c1ceb0b4","version" : "1.1307.0-preview.c3e52bd2b8af9be2a8d746dd1e8623c4c1ceb0b4","informationUri" : asd... cut because github does not allow such long text
... cut because github does not allow such long text
... cut because github does not allow such long text
... cut because github does not allow such long text
... cut because github does not allow such long text
... cut because github does not allow such long text
... cut because github does not allow such long text
{"$schema": "https://docs.oasis-open.org/sarif/sarif/v2.1.0/errata01/os/schemas/sarif-schema-2.1.0.json","version": "2.1.0","runs": [{"tool": {"driver" : {"name" : "Snyk Secrets","semanticVersion" : "1.1307.0-preview.c3e52bd2b8af9be2a8d746dd1e8623c4c1ceb0b4","version" : "1.1307.0-preview.c3e52bd2b8af9be2a8d746dd1e8623c4c1ceb0b4","informationUri" : "https://docs.snyk.io/","rules" : [{"id": "generic-secret","shortDescription": {"text": "Generic Secret Key"},... cut because github does not allow such long text
Pull Request Submission Checklist
are release-note ready, emphasizing
what was changed, not how.
What does this PR do?
Wires TOON output for OS and Secrets using the existing GAF renderer.
--toonand--toon-file-output.--toonis set.Where should the reviewer start?
cliv2/pkg/core/main.go: flag registration,runTestCommand, andrunSecretsTestCommand. Thenmain_test.gofor coverage.Check that parsed
--toonreaches configuration before the OS presenter flag is read; the open review thread covers this.How should this be manually tested?
Build with
make build. From projects supported by OS and Secrets, run the built CLI withtestandsecrets test:--toon: TOON on stdout.--toon-file-output=result.toon: TOON in the file, normal stdout.Check clean and failing scans. Confirm exit codes and existing JSON/SARIF output still work.
What's the product update that needs to be communicated to CLI users?
TOON output for Open Source and Secrets scans via
--toonand--toon-file-output.Note
Medium Risk
Changes how primary
testandsecrets testcommands route structured output, which can affect CI and tooling that parse stdout; behavior is flag-gated and covered by new tests.Overview
Adds TOON as a scan output option for Open Source (
snyk test) and Secrets (snyk secrets test) by wiring new CLI flags into the existing GAF output workflow.Registers persistent
--toon(console) and--toon-file-outputflags on the root command.snyk testnow uses a dedicatedrunTestCommandhandler: when--toonis set, it setsinternal_use_ufm_presenterso stdout TOON is rendered via GAF instead of the local unified presenter; file-only TOON does not flip that flag.snyk secrets testextends the SARIF/JSON file-writer setup with an optional TOON file writer (viaextraFileWritersonrunTestCommandWithSarifEqualJson). Thetestandmonitorworkflow branches are split so onlytestgets the new runner.Unit tests cover TOON file emission for secrets, presenter-flag behavior, and flag parsing/idempotency.
Reviewed by Cursor Bugbot for commit dca39ae. Bugbot is set up for automated code reviews on this repo. Configure here.