Socket
Socket
Sign inDemoInstall

snyk-gradle-plugin

Package Overview
Dependencies
Maintainers
1
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk-gradle-plugin - npm Package Compare versions

Comparing version 3.0.2 to 3.1.0

2

dist/index.d.ts

@@ -1,2 +0,2 @@

import { legacyPlugin as api, legacyCommon } from '@snyk/cli-interface';
import { legacyCommon, legacyPlugin as api } from '@snyk/cli-interface';
declare type DepTree = legacyCommon.DepTree;

@@ -3,0 +3,0 @@ export interface GradleInspectOptions {

@@ -11,4 +11,4 @@ "use strict";

const chalk_1 = require("chalk");
const cli_interface_1 = require("@snyk/cli-interface");
const debugModule = require("debug");
const cli_interface_1 = require("@snyk/cli-interface");
// To enable debugging output, use `snyk -d`

@@ -55,5 +55,7 @@ let logger = null;

}
const scannedProjects = yield getAllDepsAllProjects(root, targetFile, options);
plugin.meta = plugin.meta || {};
return {
plugin,
scannedProjects: yield getAllDepsAllProjects(root, targetFile, options),
scannedProjects,
};

@@ -69,2 +71,5 @@ }

package: depTreeAndDepRootNames.depTree,
meta: {
gradleProjectName: depTreeAndDepRootNames.gradleProjectName,
},
};

@@ -104,10 +109,12 @@ });

const allSubProjectNames = allProjectDeps.allSubProjectNames;
let depDict = {};
if (subProject) {
const { depTree, meta } = getDepsSubProject(root, subProject, allProjectDeps);
return {
depTree: getDepsSubProject(root, subProject, allProjectDeps),
depTree,
allSubProjectNames,
gradleProjectName: meta.gradleProjectName,
};
}
depDict = allProjectDeps.projects[allProjectDeps.defaultProject].depDict;
const { projects, defaultProject } = allProjectDeps;
const { depDict } = projects[defaultProject];
return {

@@ -123,2 +130,3 @@ depTree: {

allSubProjectNames,
gradleProjectName: defaultProject,
};

@@ -129,14 +137,19 @@ });

const packageName = `${path.basename(root)}/${subProject}`;
let depDict = {};
const gradleProjectName = `${allProjectDeps.defaultProject}/${subProject}`;
if (!allProjectDeps.projects || !allProjectDeps.projects[subProject]) {
throw new errors_1.MissingSubProjectError(subProject, Object.keys(allProjectDeps));
}
depDict = allProjectDeps.projects[subProject].depDict;
const depDict = allProjectDeps.projects[subProject].depDict;
return {
dependencies: depDict,
name: packageName,
// TODO: extract from project
// https://snyksec.atlassian.net/browse/BST-558
version: '0.0.0',
packageFormatVersion,
depTree: {
dependencies: depDict,
name: packageName,
// TODO: extract from project
// https://snyksec.atlassian.net/browse/BST-558
version: '0.0.0',
packageFormatVersion,
},
meta: {
gradleProjectName,
},
};

@@ -150,5 +163,10 @@ }

return Object.keys(allProjectDeps.projects).map((proj) => {
const packageName = proj === allProjectDeps.defaultProject ? basePackageName : basePackageName + '/' + proj;
const packageName = proj === allProjectDeps.defaultProject ? basePackageName : `${basePackageName}/${proj}`;
const defaultProject = allProjectDeps.defaultProject;
const gradleProjectName = proj === defaultProject ? defaultProject : `${defaultProject}/${proj}`;
return {
targetFile: targetFileFilteredForCompatibility(allProjectDeps.projects[proj].targetFile),
meta: {
gradleProjectName,
},
depTree: {

@@ -155,0 +173,0 @@ dependencies: allProjectDeps.projects[proj].depDict,

@@ -29,3 +29,2 @@ {

"devDependencies": {
"@snyk/cli-interface": "^2.0.1",
"@types/chalk": "^2.2.0",

@@ -45,2 +44,3 @@ "@types/jest": "^24.0.13",

"dependencies": {
"@snyk/cli-interface": "^2.1.0",
"@types/debug": "^4.1.4",

@@ -53,3 +53,3 @@ "chalk": "^2.4.2",

},
"version": "3.0.2"
"version": "3.1.0"
}

@@ -7,18 +7,55 @@ ![Snyk logo](https://snyk.io/style/asset/logo/snyk-print.svg)

## Snyk Gradle CLI Plugin
# Snyk Gradle CLI Plugin
This plugin provides dependency metadata for Gradle projects that use `gradle` and have a `build.gradle` file.
Supported Snyk command line arguments:
# Support
❓No issues expected but test not updated yet to verify
✅Supported and verified with tests
## Supported OS
| OS | Supported |
|---|---|
| Windows | ✅|
| Linux | ✅|
| OSX | ✅|
## Supported Node versions
| Node | Supported |
|---|---|
| 6 | ✅|
| 8 | ✅|
| 10 | ✅|
| 12 | ❓|
## Supported Java & Gradle versions
| Java / Gradle | 2.* | 3.* | 4.* | 5.* |
|---|---|---|---|---|
| 8 | ✅ | ✅ | ✅ | ✅ |
| 9 | ✅ | ✅ | ✅ | ✅ |
| 10 | ✅ | ✅ | ✅ | ✅ |
| 11 | ✅ | ✅ | ✅ | ✅ |
| 13 | ❓ | ❓ | ❓ | ❓ |
# Supported Snyk command line arguments:
* `--gradle-sub-project=foo` return dependencies for a specific subproject (by default, return only the
dependencies for the top-level project)
Additional command line arguments to Gradle can be provided after `--`, for example:
Additional command line arguments:
* `-- --configuration=foo` only fetch dependencies for a certain configuration (by default, merged deps for
all the configurations are returned).
- `--all-sub-projects` for "multi project" configurations, test all sub-projects.
- `--configuration-matching=<string>` Resolve dependencies using only configuration(s) that match the provided Java regular expression, e.g. '^releaseRuntimeClasspath$'.
- `--configuration-attributes=<string>` Select certain values of configuration attributes to resolve the dependencies. E.g.: 'buildtype:release,usage:java-runtime'
## Under the hood
See `lib/init.gradle` for the Groovy script injected in Gradle builds to gather and resolve the dependencies.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc