Add support for handling of snippet code#1054
Merged
attiasas merged 11 commits intojfrog:v3_erfrom Mar 4, 2026
Merged
Conversation
Contributor
|
I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
Contributor
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.

Depends on:
Add snippet code decoration to PR review comments
Summary
Add support for displaying public code snippet detections as inline review comments on pull requests. When license violations are identified as originating from copied public code snippets, Frogbot now generates review comments highlighting the affected lines with links to the original source and a table of associated license violations.
Changes
SnippetCommentreview comment type (utils/comment.go): Processes license violations whereImpactedDependencyVersion == "snippet", groups them by file and line, parses GitHub-style#L<start>-L<end>fragments from external reference URLs to determine the snippet span, and generates positioned review comments.utils/outputwriter/outputcontent.go): NewSnippetReviewContent()produces markdown content with a title, links to external source references, and a severity/license/watch/policies table.utils/scandetails.go): ReadsSnippetDetectionEnvVariableto conditionally enable snippet detection and passes the flag toCreateAuditResultsContext().go.mod,go.sum): Bumpedjfrog-cli-securityto v1.26.3; movedjfrog-cli-artifactoryto indirect.Checklist
Notes
JFROG_XRAY_SNIPPET_SCAN_ENABLEenvironment variable.