diff --git a/.circleci/config.yml b/.circleci/config.yml index 95e8423e26..5dcf9abc5e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -298,7 +298,7 @@ commands: parameters: items: type: string - default: go gradle python elixir composer gradle@6 maven sbt dotnet + default: go gradle python pipenv elixir composer gradle@6 maven sbt dotnet steps: - run: name: Installing Rosetta diff --git a/package-lock.json b/package-lock.json index f9aa1c7c18..634a39c747 100644 --- a/package-lock.json +++ b/package-lock.json @@ -78,7 +78,7 @@ "snyk-nuget-plugin": "2.7.4", "snyk-php-plugin": "1.9.2", "snyk-policy": "^1.25.0", - "snyk-python-plugin": "2.1.1", + "snyk-python-plugin": "2.2.1", "snyk-resolve-deps": "4.7.3", "snyk-sbt-plugin": "2.18.1", "snyk-swiftpm-plugin": "1.4.1", @@ -21213,9 +21213,9 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/snyk-python-plugin": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snyk-python-plugin/-/snyk-python-plugin-2.1.1.tgz", - "integrity": "sha512-TK2EecV9MQ9uKCybyR/7KotCHVVNmtc8QWp6w1O8NP8zPW9OZS1eXKoDf6ot0lnth4J+9Cec/2IgCUjJocC4uQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/snyk-python-plugin/-/snyk-python-plugin-2.2.1.tgz", + "integrity": "sha512-L4piOWEzwJv7IuI8FuP6dh48svLDIjGeBTvjcdKVg4cFdrCS8JXA45ePWZOGysHxo7T0rw3w+ZJ61TlfR4WH1Q==", "dependencies": { "@snyk/cli-interface": "^2.11.2", "@snyk/dep-graph": "^1.28.1", @@ -21253,17 +21253,6 @@ "node": ">=8" } }, - "node_modules/snyk-python-plugin/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/snyk-python-plugin/node_modules/object-hash": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", @@ -21276,6 +21265,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "dependencies": { "glob": "^7.1.3" }, @@ -21287,12 +21277,9 @@ } }, "node_modules/snyk-python-plugin/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "bin": { "semver": "bin/semver.js" }, @@ -21311,11 +21298,6 @@ "node": ">=8.17.0" } }, - "node_modules/snyk-python-plugin/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "node_modules/snyk-resolve": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/snyk-resolve/-/snyk-resolve-1.1.0.tgz", @@ -40420,9 +40402,9 @@ } }, "snyk-python-plugin": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snyk-python-plugin/-/snyk-python-plugin-2.1.1.tgz", - "integrity": "sha512-TK2EecV9MQ9uKCybyR/7KotCHVVNmtc8QWp6w1O8NP8zPW9OZS1eXKoDf6ot0lnth4J+9Cec/2IgCUjJocC4uQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/snyk-python-plugin/-/snyk-python-plugin-2.2.1.tgz", + "integrity": "sha512-L4piOWEzwJv7IuI8FuP6dh48svLDIjGeBTvjcdKVg4cFdrCS8JXA45ePWZOGysHxo7T0rw3w+ZJ61TlfR4WH1Q==", "requires": { "@snyk/cli-interface": "^2.11.2", "@snyk/dep-graph": "^1.28.1", @@ -40457,14 +40439,6 @@ "tslib": "^1.13.0" } }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, "object-hash": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", @@ -40479,12 +40453,9 @@ } }, "semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==" }, "tmp": { "version": "0.2.1", @@ -40493,11 +40464,6 @@ "requires": { "rimraf": "^3.0.0" } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, diff --git a/package.json b/package.json index 26b3b3ebf1..c1ad7c0952 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "snyk-nuget-plugin": "2.7.4", "snyk-php-plugin": "1.9.2", "snyk-policy": "^1.25.0", - "snyk-python-plugin": "2.1.1", + "snyk-python-plugin": "2.2.1", "snyk-resolve-deps": "4.7.3", "snyk-sbt-plugin": "2.18.1", "snyk-swiftpm-plugin": "1.4.1", diff --git a/test/jest/acceptance/snyk-test/basic-test-all-languages.spec.ts b/test/jest/acceptance/snyk-test/basic-test-all-languages.spec.ts index 270e063306..742a687e43 100644 --- a/test/jest/acceptance/snyk-test/basic-test-all-languages.spec.ts +++ b/test/jest/acceptance/snyk-test/basic-test-all-languages.spec.ts @@ -139,6 +139,29 @@ describe('`snyk test` of basic projects for each language/ecosystem', () => { expect(result.stderr).toMatch(wrongPythonCommand); }); + test('run `snyk test` on a pipenv project', async () => { + const project = await createProjectFromWorkspace('pipenv-app'); + let pythonCommand = 'python'; + + await runCommand(pythonCommand, ['--version']).catch(function() { + pythonCommand = 'python3'; + }); + + const pipenvResult = await runCommand('pipenv', ['install'], { + shell: true, + cwd: project.path(), + }); + + expect(pipenvResult.code).toEqual(0); + + const result = await runSnykCLI('test -d --command=' + pythonCommand, { + cwd: project.path(), + env, + }); + + expect(result.code).toEqual(0); + }); + test('run `snyk test` on a gradle project', async () => { const project = await createProjectFromWorkspace('gradle-app');