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: add init-script argument to CLI for gradle #1647

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

juanamari94
Copy link
Contributor

This PR was submitted by @pwnslinger, this pull request was opened because CircleCI is unable to pull a forked repository. Credit where it's due, this fix was created by @pwnslinger as well.

  • Ready for review
  • Follows CONTRIBUTING rules
  • Reviewed by Snyk internal team

What does this PR do?

init-script is part of gradle and is used for certain use cases such as private artifact inventories.
This is required for reachability in order to get the classpath required for building the call graph.

How should this be manually tested?

Using a gradle project, create a file init.gradle for example and run

snyk test -d --file=./build.gradle --insecure --severity-threshold=medium --reachable --init-script=init.gradle

or

snyk monitor -d --file=./build.gradle --insecure --severity-threshold=medium --reachable --init-script=init.gradle

Any background context you want to provide?

We need the inner gradle commands of the java call graph builder to succeed in order to retrieve the classpath that allows us to get a call graph from the project.

What are the relevant tickets?

https://snyksec.atlassian.net/browse/FLOW-649

@juanamari94 juanamari94 force-pushed the feat/init-script branch 2 times, most recently from 0b3764c to f4dc37f Compare February 18, 2021 16:45
init-script is part of gradle and is used for certain use cases such as private artifact inventories.
This is required for reachability in order to get the classpath required for building the call graph.
Upgrades snyk-gradle-plugin to v3.13.0
@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2021

Expected release notes (by @juanamari94)

features:
add init-script argument to CLI for gradle (859f71d)

  • I hereby acknowledge these release notes are 🥙 AWESOME 🥙

@@ -179,6 +181,7 @@ export type SupportedUserReachableFacingCliArgs =
| 'reachable-vulns'
| 'reachable-timeout'
| 'reachable-vulns-timeout'
| 'init-script'
Copy link
Contributor

Choose a reason for hiding this comment

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

So you don't need to pass this option, it'll just be picked from the global options?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not quite certain what you mean. Should I remove it then? As far as I understand it's better to have types set here for documentation concerns.

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.

4 participants