Skip to content

Commit

Permalink
Merge pull request #3446 from snyk/fix/bump-docker-plugin-go-modules
Browse files Browse the repository at this point in the history
fix: bump snyk docker plugin version golang fixes
  • Loading branch information
Yaron Schwimmer committed Jul 11, 2022
2 parents a300879 + 8d55bcd commit 235e60c
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 10 deletions.
30 changes: 21 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"semver": "^6.0.0",
"snyk-config": "4.0.0",
"snyk-cpp-plugin": "2.20.0",
"snyk-docker-plugin": "^4.38.0",
"snyk-docker-plugin": "^5.0.1",
"snyk-go-plugin": "1.19.0",
"snyk-gradle-plugin": "3.20.2",
"snyk-module": "3.1.0",
Expand Down
5 changes: 5 additions & 0 deletions src/cli/commands/monitor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ export default async function monitor(...args0: MethodArgs): Promise<any> {
throw new Error('`--remote-repo-url` is not supported for container scans');
}

// TODO remove once https://github.com/snyk/cli/pull/3433 is merged
if (options.docker && !options['app-vulns']) {
options['exclude-app-vulns'] = true;
}

// Handles no image arg provided to the container command until
// a validation interface is implemented in the docker plugin.
if (options.docker && paths.length === 0) {
Expand Down
5 changes: 5 additions & 0 deletions src/cli/commands/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export default async function test(
throw new MissingArgError();
}

// TODO remove once https://github.com/snyk/cli/pull/3433 is merged
if (options.docker && !options['app-vulns']) {
options['exclude-app-vulns'] = true;
}

const ecosystem = getEcosystemForTest(options);
if (ecosystem) {
try {
Expand Down
4 changes: 4 additions & 0 deletions test/tap/cli-monitor.acceptance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,7 @@ if (!isWindows) {
[
{
docker: true,
'exclude-app-vulns': true,
org: 'explicit-org',
path: 'foo:latest',
},
Expand Down Expand Up @@ -1809,6 +1810,7 @@ if (!isWindows) {
[
{
docker: true,
'exclude-app-vulns': true,
file: 'Dockerfile',
org: 'explicit-org',
path: 'foo:latest',
Expand Down Expand Up @@ -1876,6 +1878,7 @@ if (!isWindows) {
[
{
docker: true,
'exclude-app-vulns': true,
org: 'explicit-org',
'policy-path': 'custom-location',
path: 'foo:latest',
Expand Down Expand Up @@ -1939,6 +1942,7 @@ if (!isWindows) {
[
{
docker: true,
'exclude-app-vulns': true,
path: 'foo:latest',
platform,
},
Expand Down
6 changes: 6 additions & 0 deletions test/tap/cli-test/cli-test.docker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const DockerTests: AcceptanceTests = {
[
{
docker: true,
'exclude-app-vulns': true,
org: 'explicit-org',
projectName: null,
packageManager: null,
Expand Down Expand Up @@ -141,6 +142,7 @@ export const DockerTests: AcceptanceTests = {
[
{
docker: true,
'exclude-app-vulns': true,
org: 'explicit-org',
projectName: null,
packageManager: null,
Expand Down Expand Up @@ -293,6 +295,7 @@ export const DockerTests: AcceptanceTests = {
{
file: 'Dockerfile',
docker: true,
'exclude-app-vulns': true,
org: 'explicit-org',
projectName: null,
packageManager: null,
Expand Down Expand Up @@ -407,6 +410,7 @@ export const DockerTests: AcceptanceTests = {
[
{
docker: true,
'exclude-app-vulns': true,
org: 'explicit-org',
projectName: null,
packageManager: null,
Expand Down Expand Up @@ -482,6 +486,7 @@ export const DockerTests: AcceptanceTests = {
[
{
docker: true,
'exclude-app-vulns': true,
org: 'explicit-org',
projectName: null,
packageManager: null,
Expand Down Expand Up @@ -563,6 +568,7 @@ export const DockerTests: AcceptanceTests = {
[
{
docker: true,
'exclude-app-vulns': true,
org: 'explicit-org',
projectName: null,
packageManager: null,
Expand Down

0 comments on commit 235e60c

Please sign in to comment.