Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: snyk/cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.947.0
Choose a base ref
...
head repository: snyk/cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.948.0
Choose a head ref
  • 6 commits
  • 6 files changed
  • 3 contributors

Commits on Jun 7, 2022

  1. Unverified

    The email in this signature doesn’t match the committer email.
    Copy the full SHA
    2e09643 View commit details
  2. Merge pull request #3302 from snyk/bump_driftctl

    chore: bump driftctl version
    eliecharra authored Jun 7, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4876b68 View commit details

Commits on Jun 9, 2022

  1. feat: upgrade to snyk-docker-plugin@4.38.0

    Jahed Ahmed committed Jun 9, 2022

    Unverified

    No user is associated with the committer email.
    Copy the full SHA
    5b66290 View commit details
  2. chore(ci): persist v2 artifacts in a single job

    Involves persisting signed artifacts too which we previously didn't do.
    Jahed Ahmed committed Jun 9, 2022

    Unverified

    No user is associated with the committer email.
    Copy the full SHA
    d795b92 View commit details
  3. Merge pull request #3309 from snyk/chore/v2-prepare-release-job

    chore(ci): persist v2 artifacts in a single job
    Jahed Ahmed authored Jun 9, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bbb0e08 View commit details
  4. Merge pull request #3308 from snyk/feat/upgrade-docker-plugin+test

    feat: upgrade to snyk-docker-plugin@4.38.0
    Jahed Ahmed authored Jun 9, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a03786c View commit details
Showing with 264 additions and 55 deletions.
  1. +17 −3 .circleci/config.yml
  2. +200 −40 package-lock.json
  3. +1 −1 package.json
  4. +11 −11 src/lib/iac/drift/driftctl.ts
  5. +29 −0 test/jest/acceptance/snyk-container/container.spec.ts
  6. +6 −0 webpack.common.ts
20 changes: 17 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -626,13 +626,21 @@ jobs:
- save_cache:
key: go-build-{{ arch }}-{{ checksum "cliv2/go.sum" }}
paths: [/home/circleci/go/pkg/mod]
- store_artifacts:
path: ./cliv2/bin
- persist_to_workspace:
root: .
paths:
- ./cliv2/bin

v2-prepare-release:
executor: linux
working_directory: /home/circleci/snyk
steps:
- checkout
- attach_workspace:
at: .
- store_artifacts:
path: ./cliv2/bin

v2-test-linux-amd64:
executor: linux
working_directory: /home/circleci/snyk
@@ -1019,7 +1027,6 @@ workflows:
requires:
- v2 / Build (linux/amd64)
test_snyk_command: /mnt/ramdisk/snyk/cliv2/bin/snyk_linux_amd64

- v2-sign-darwin-amd64:
name: v2 / Sign (darwin/amd64)
context: snyk-macos-signing
@@ -1030,3 +1037,10 @@ workflows:
context: snyk-windows-signing
requires:
- v2 / Build (windows/amd64)
- v2-prepare-release:
name: v2 / Prepare Release
requires:
- v2 / Build (linux/amd64)
- v2 / Build (linux/arm64)
- v2 / Sign (darwin/amd64)
- v2 / Sign (windows/amd64)
240 changes: 200 additions & 40 deletions package-lock.json
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@
"semver": "^6.0.0",
"snyk-config": "4.0.0",
"snyk-cpp-plugin": "2.20.0",
"snyk-docker-plugin": "^4.36.0",
"snyk-docker-plugin": "^4.38.0",
"snyk-go-plugin": "1.18.0",
"snyk-gradle-plugin": "3.18.1",
"snyk-module": "3.1.0",
22 changes: 11 additions & 11 deletions src/lib/iac/drift/driftctl.ts
Original file line number Diff line number Diff line change
@@ -34,29 +34,29 @@ export const DCTL_EXIT_CODES = {
EXIT_ERROR: 2,
};

export const driftctlVersion = 'v0.32.0';
export const driftctlVersion = 'v0.32.1';

const driftctlChecksums = {
'driftctl_windows_386.exe':
'01e466194743a0de29cf5eb89f7a9d664cf10ef7a54fd7caa5d8d548284ad7c4',
'225de60d9179dda00780df18f168473bfc30d23222bbf87aa9ee856d65e995cf',
driftctl_darwin_amd64:
'd75466d438dafc694accb12a88cbcab023abda70de3534f96b32a33584206bd5',
'd8665a9d9eab5254447053e5a35be93ef6d5f42069e1b5b4083d4503cd79f572',
driftctl_linux_386:
'dd5c067b69bafe7d9eb99a9fad69f85b5ce30be072840f37dcd5313c508da2d9',
'2469606111d599f5d72970acfccfa75ef43635c31bb4547a071514e91318ad4b',
driftctl_linux_amd64:
'8bbde304a5fca2814b5ccdd2c58d7e09607bcd31ef2cbfacede57326da5a9a53',
'd262961eb6ee005dd65d8ad481801d3b4d30184a8b8aa03c370669729cab07a9',
driftctl_linux_arm64:
'ec34390073d4625e281bc8d2ae1204ad5a01c4ebd358ffc64964bce20fc4442c',
'1b04652ed21c137ec69ebf2cde2d771da3b59a6d2ddad0de31efd4375174a2b2',
'driftctl_windows_arm64.exe':
'859202bacc72340661fd70bd29fce7655867f90569b0dc172c1de5a31eb8f132',
'03772784258c08a8ab6634a9801dcf7671f6648ab0f6b47a939e84364b468cb9',
driftctl_darwin_arm64:
'a814a65a9a96c92df66c95b3be9df1e84705a73e70a0077ebd67dccfd079f5f4',
'c04e520a9720abddb9e35b556497bd866abe7d2e0d34180ff5275cc45e0e383e',
'driftctl_windows_arm.exe':
'10e4c2299be45415a61985ae6eda7f09435567906070a443c2b6dd8a97370375',
'65c58c0495e4a0741216cb453e37774b17a615f02e532881e2b2473a2ac83c7c',
driftctl_linux_arm:
'72ebfeba1345e737b95d9774b4ed1817dff3f077a88d48e7daed5c3006fcf100',
'd32125770fefe789695e939a9be39c371ec4e48a4743efe24edf90d4b1ee0aca',
'driftctl_windows_amd64.exe':
'37ea51a796bca18f34f9f980c2ae6f43ff89bc3172969ae5af29096744dda5a0',
'46ab4c26231e01e336d35466136da72718ae51af35956875293c7f1e4e680307',
};

const dctlBaseUrl = 'https://static.snyk.io/cli/driftctl/';
29 changes: 29 additions & 0 deletions test/jest/acceptance/snyk-container/container.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import * as os from 'os';
import { startSnykCLI, TestCLI } from '../../util/startSnykCLI';

describe('snyk container', () => {
if (os.platform() === 'win32') {
// eslint-disable-next-line jest/no-focused-tests
it.only('Windows not yet supported', () => {
console.warn(
"Skipping as we don't have a Windows-compatible image to test against.",
);
});
}

let cli: TestCLI | null = null;

afterEach(async () => {
if (cli) {
await cli.stop();
cli = null;
}
});

it('finds dependencies in rpm sqlite databases', async () => {
cli = await startSnykCLI(
'container test amazonlinux:2022.0.20220504.1 --print-deps',
);
await expect(cli).toDisplay(`yum @ 4.9.0`, { timeout: 20 * 1000 });
});
});
6 changes: 6 additions & 0 deletions webpack.common.ts
Original file line number Diff line number Diff line change
@@ -47,6 +47,10 @@ export default {
from: 'node_modules/snyk-go-plugin/gosrc/',
to: '../gosrc/',
},
{
from: 'node_modules/sql.js/dist/sql-wasm.wasm',
to: './',
},
{
from:
'node_modules/@snyk/java-call-graph-builder/config.default.json',
@@ -66,6 +70,8 @@ export default {
loader: 'node-loader',
},
],
// noParse avoids breaking sql.js. https://github.com/sql-js/sql.js/issues/406#issuecomment-688594485
noParse: /node_modules\/sql\.js\/dist\/sql-wasm\.js$/,
},
resolve: {
extensions: ['.ts', '.js', '.json'],