Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dep-graph json output file #5619

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Conversation

gitphill
Copy link
Contributor

@gitphill gitphill commented Dec 9, 2024

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)

What does this PR do?

When both --print-deps and --json-file-output are being used produce a depGraph object in the resulting JSON file.

Does not attempt to fix any existing --json output formats to reduce the potential of breaking changes.

This allows CLI users to see the dependency graph that was resolved by the plugin code and scanned.
Useful for those users that are interested in what dependencies where resolved by Snyk and for debugging.

How should this be manually tested?

snyk test --print-deps --json-file-output=out.json
cat out.json | jq .depGraph

@gitphill gitphill self-assigned this Dec 9, 2024
@gitphill gitphill force-pushed the feat/dep-graph-json-output-file branch 2 times, most recently from 704e838 to 1cf2540 Compare December 9, 2024 12:02
@gitphill gitphill force-pushed the feat/dep-graph-json-output-file branch from 1cf2540 to b213aa6 Compare December 16, 2024 13:08
@gitphill gitphill marked this pull request as ready for review December 16, 2024 13:13
@gitphill gitphill requested a review from a team as a code owner December 16, 2024 13:13
@gitphill gitphill force-pushed the feat/dep-graph-json-output-file branch from b213aa6 to be88506 Compare December 17, 2024 09:28
When both `--print-deps` and `--json-file-output` are being used
produce a depGraph object in the resulting JSON file.

Does not attempt to fix any existing `--json` output formats to reduce
the potential of breaking changes.

This allows CLI users to see the dependency graph that was resolved
by the plugin code and scanned.
@gitphill gitphill force-pushed the feat/dep-graph-json-output-file branch from be88506 to 90f24ec Compare December 19, 2024 10:58
@gitphill gitphill merged commit fc240b2 into main Dec 19, 2024
7 checks passed
@gitphill gitphill deleted the feat/dep-graph-json-output-file branch December 19, 2024 12:06
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