From bb53ffae82cb34751ef92d3d052a702f54b1d805 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jul 2020 19:54:48 +0000 Subject: [PATCH 01/25] Bump lodash from 4.17.15 to 4.17.19 Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] --- package-lock.json | 3012 ++++++++++++++++++++++----------------------- 1 file changed, 1506 insertions(+), 1506 deletions(-) diff --git a/package-lock.json b/package-lock.json index 661aced..873efe6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,1506 +1,1506 @@ -{ - "name": "dependencycheck-azuredevops", - "version": "0.0.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@types/jquery": { - "version": "2.0.48", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.48.tgz", - "integrity": "sha512-nNLzUrVjaRV/Ds1eHZLYTd7IZxs38cwwLSaqMJj8OTXY8xNUbxSK69bi9cMLvQ7dm/IBeQ1wHwQ0S1uYa0rd2w==" - }, - "@types/jqueryui": { - "version": "1.11.37", - "resolved": "https://registry.npmjs.org/@types/jqueryui/-/jqueryui-1.11.37.tgz", - "integrity": "sha512-aKT7dOhxYTTkLS43q5miBeuRpfyh916sgI7m/6EJJvJR6j36e5eRORONZyzD5twTLMdMw6uYR7vqhreIHps9tw==", - "requires": { - "@types/jquery": "*" - } - }, - "@types/knockout": { - "version": "3.4.46", - "resolved": "https://registry.npmjs.org/@types/knockout/-/knockout-3.4.46.tgz", - "integrity": "sha512-dsnfVF8CPQNv3mk7iQS2mGv7AAUVRcTGExbrlfwDD1AZPaV8cquHsVw3mLIFBsiHL8h4TiECiWtukqTF9dcEug==" - }, - "@types/mousetrap": { - "version": "1.5.34", - "resolved": "https://registry.npmjs.org/@types/mousetrap/-/mousetrap-1.5.34.tgz", - "integrity": "sha512-a2yhRIADupQfOFM75v7GfcQQLUxU705+i/xcZ3N/3PK3Xdo31SUfuCUByWPGOHB1e38m7MxTx/D8FPVsJXZKJw==" - }, - "@types/q": { - "version": "0.0.32", - "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", - "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=" - }, - "@types/react": { - "version": "16.0.22", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.0.22.tgz", - "integrity": "sha512-d8STysuhEgZ3MxMqY8PlTcUj2aJljBtQ+94SixlQdFgP3c5gh0fBBW5r73RxHuZqKohYvHb9nNbqGQfco7ReoQ==" - }, - "@types/requirejs": { - "version": "2.1.31", - "resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.31.tgz", - "integrity": "sha512-b2soeyuU76rMbcRJ4e0hEl0tbMhFwZeTC0VZnfuWlfGlk6BwWNsev6kFu/twKABPX29wkX84wU2o+cEJoXsiTw==" - }, - "app-root-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-1.0.0.tgz", - "integrity": "sha1-LHKZF0vGHLhv46SnmOAeSTt9U30=", - "dev": true - }, - "arch": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", - "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==", - "dev": true - }, - "archiver": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/archiver/-/archiver-2.0.3.tgz", - "integrity": "sha1-tDYLtYSvFDeZGUJxbyHXxSPR270=", - "dev": true, - "requires": { - "archiver-utils": "^1.3.0", - "async": "^2.0.0", - "buffer-crc32": "^0.2.1", - "glob": "^7.0.0", - "lodash": "^4.8.0", - "readable-stream": "^2.0.0", - "tar-stream": "^1.5.0", - "walkdir": "^0.0.11", - "zip-stream": "^1.2.0" - }, - "dependencies": { - "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, - "requires": { - "lodash": "^4.17.10" - } - } - } - }, - "archiver-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", - "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", - "dev": true, - "requires": { - "glob": "^7.0.0", - "graceful-fs": "^4.1.0", - "lazystream": "^1.0.0", - "lodash": "^4.8.0", - "normalize-path": "^2.0.0", - "readable-stream": "^2.0.0" - } - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", - "dev": true - }, - "bl": { - "version": "1.2.2", - "resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz", - "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", - "dev": true, - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "buffer-alloc": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", - "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", - "dev": true, - "requires": { - "buffer-alloc-unsafe": "^1.1.0", - "buffer-fill": "^1.0.0" - } - }, - "buffer-alloc-unsafe": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", - "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", - "dev": true - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", - "dev": true - }, - "buffer-fill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", - "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "camelcase-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", - "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", - "dev": true, - "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" - } - }, - "clipboardy": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-1.2.3.tgz", - "integrity": "sha512-2WNImOvCRe6r63Gk9pShfkwXsVtKCroMAevIbiae021mS850UkWPbevxsBz3tnvjZIEGvlwaqCPsw+4ulzNgJA==", - "dev": true, - "requires": { - "arch": "^2.1.0", - "execa": "^0.8.0" - } - }, - "colors": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", - "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==", - "dev": true - }, - "compress-commons": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", - "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", - "dev": true, - "requires": { - "buffer-crc32": "^0.2.1", - "crc32-stream": "^2.0.0", - "normalize-path": "^2.0.0", - "readable-stream": "^2.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "core-js": { - "version": "2.3.0", - "resolved": "http://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz", - "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "crc": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", - "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", - "dev": true, - "requires": { - "buffer": "^5.1.0" - } - }, - "crc32-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", - "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", - "dev": true, - "requires": { - "crc": "^3.4.4", - "readable-stream": "^2.0.0" - } - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "cycle": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", - "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=", - "dev": true - }, - "dateformat": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.11.tgz", - "integrity": "sha1-8ny+56ASu/uC6gUVYtOXf2CT27E=", - "dev": true, - "requires": { - "get-stdin": "*", - "meow": "*" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "dev": true, - "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - } - } - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "end-of-stream": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", - "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "dev": true, - "requires": { - "es-to-primitive": "^1.1.1", - "function-bind": "^1.1.1", - "has": "^1.0.1", - "is-callable": "^1.1.3", - "is-regex": "^1.0.4" - } - }, - "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es6-promise": { - "version": "3.0.2", - "resolved": "http://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", - "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=", - "dev": true - }, - "execa": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", - "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "eyes": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", - "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", - "dev": true - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "i": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/i/-/i-0.3.6.tgz", - "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=", - "dev": true - }, - "ieee754": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", - "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", - "dev": true - }, - "immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", - "dev": true - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "^1.0.1" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "dev": true, - "requires": { - "has-symbols": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, - "json-in-place": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-in-place/-/json-in-place-1.0.1.tgz", - "integrity": "sha1-ih7NJaac4ZAFUs1xUr2TdU3k4fA=", - "dev": true, - "requires": { - "json-lexer": "1.1.1" - } - }, - "json-lexer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/json-lexer/-/json-lexer-1.1.1.tgz", - "integrity": "sha1-vT7V1+Vgudma0iNPKMpwb7N3t9Q=", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "jszip": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", - "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", - "dev": true, - "requires": { - "core-js": "~2.3.0", - "es6-promise": "~3.0.2", - "lie": "~3.1.0", - "pako": "~1.0.2", - "readable-stream": "~2.0.6" - }, - "dependencies": { - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "readable-stream": { - "version": "2.0.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", - "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~0.10.x", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "dev": true, - "requires": { - "readable-stream": "^2.0.5" - } - }, - "lie": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", - "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", - "dev": true, - "requires": { - "immediate": "~3.0.5" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lru-cache": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.4.tgz", - "integrity": "sha512-EPstzZ23znHUVLKj+lcXO1KvZkrlw+ZirdwvOmnAnA/1PB4ggyXJ77LRkCqkff+ShQ+cqoxCxLQOh4cKITO5iA==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^3.0.2" - } - }, - "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", - "dev": true - }, - "meow": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", - "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", - "dev": true, - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0", - "yargs-parser": "^10.0.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "minimist-options": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "ncp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", - "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", - "dev": true - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", - "dev": true - }, - "object.getownpropertydescriptors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", - "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "es-abstract": "^1.5.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onecolor": { - "version": "2.5.0", - "resolved": "http://registry.npmjs.org/onecolor/-/onecolor-2.5.0.tgz", - "integrity": "sha1-Ila2UdyAfBAfAK7b1JklxXpEMcE=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pkginfo": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", - "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", - "dev": true - }, - "prompt": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/prompt/-/prompt-0.2.14.tgz", - "integrity": "sha1-V3VPZPVD/XsIRXB8gY7OYY8F/9w=", - "dev": true, - "requires": { - "pkginfo": "0.x.x", - "read": "1.0.x", - "revalidator": "0.1.x", - "utile": "0.2.x", - "winston": "0.8.x" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, - "quick-lru": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", - "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", - "dev": true - }, - "read": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", - "dev": true, - "requires": { - "mute-stream": "~0.0.4" - } - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "readable-stream": { - "version": "2.3.6", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "redent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", - "dev": true, - "requires": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" - } - }, - "remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "dev": true - }, - "revalidator": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", - "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=", - "dev": true - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "shelljs": { - "version": "0.5.3", - "resolved": "http://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", - "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "spdx-correct": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", - "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", - "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", - "dev": true - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "dev": true - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", - "dev": true - }, - "tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "dev": true, - "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - } - }, - "tfx-cli": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/tfx-cli/-/tfx-cli-0.6.3.tgz", - "integrity": "sha512-58sLayoikjA2jXrnv9pYsbkkLEwaips9qS6r+sPulVUywiom5PFnaNVRkD7bPSBIxZt1nwa/NbITVTZIzLvtRw==", - "dev": true, - "requires": { - "app-root-path": "1.0.0", - "archiver": "2.0.3", - "async": "^1.4.0", - "clipboardy": "~1.2.3", - "colors": "~1.3.0", - "glob": "7.1.2", - "json-in-place": "^1.0.1", - "jszip": "~3.1.5", - "lodash": "~4.17.0", - "minimist": "^1.1.2", - "mkdirp": "^0.5.1", - "onecolor": "^2.5.0", - "os-homedir": "^1.0.1", - "prompt": "^0.2.14", - "read": "^1.0.6", - "shelljs": "^0.5.1", - "tmp": "0.0.26", - "tracer": "0.7.4", - "util.promisify": "^1.0.0", - "uuid": "^3.0.1", - "validator": "^3.43.0", - "vso-node-api": "^5.0.0", - "winreg": "0.0.12", - "xml2js": "^0.4.16" - } - }, - "tinytim": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/tinytim/-/tinytim-0.1.1.tgz", - "integrity": "sha1-yWih5VWa2VUyJO92J7qzTjyu+Kg=", - "dev": true - }, - "tmp": { - "version": "0.0.26", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.26.tgz", - "integrity": "sha1-nvqCDOKhD4H4l5VVus4/FVJs4fI=", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.0" - } - }, - "to-buffer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", - "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", - "dev": true - }, - "tracer": { - "version": "0.7.4", - "resolved": "http://registry.npmjs.org/tracer/-/tracer-0.7.4.tgz", - "integrity": "sha1-d/oEN8+Ct2vNvNRLhHRHcuWeUlk=", - "dev": true, - "requires": { - "colors": "1.0.3", - "dateformat": "1.0.11", - "tinytim": "0.1.1" - }, - "dependencies": { - "colors": { - "version": "1.0.3", - "resolved": "http://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", - "dev": true - } - } - }, - "trim-newlines": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", - "dev": true - }, - "tunnel": { - "version": "0.0.4", - "resolved": "http://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", - "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=", - "dev": true - }, - "typescript": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.1.tgz", - "integrity": "sha1-7znN6ierrAtQAkLWcmq5DgyEZjE=", - "dev": true - }, - "underscore": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "utile": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/utile/-/utile-0.2.1.tgz", - "integrity": "sha1-kwyI6ZCY1iIINMNWy9mncFItkNc=", - "dev": true, - "requires": { - "async": "~0.2.9", - "deep-equal": "*", - "i": "0.3.x", - "mkdirp": "0.x.x", - "ncp": "0.4.x", - "rimraf": "2.x.x" - }, - "dependencies": { - "async": { - "version": "0.2.10", - "resolved": "http://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", - "dev": true - }, - "ncp": { - "version": "0.4.2", - "resolved": "http://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz", - "integrity": "sha1-q8xsvT7C7Spyn/bnwfqPAXhKhXQ=", - "dev": true - } - } - }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "validator": { - "version": "3.43.0", - "resolved": "http://registry.npmjs.org/validator/-/validator-3.43.0.tgz", - "integrity": "sha1-lkZLmS1BloM9l6GUv0Cxn/VLrgU=", - "dev": true - }, - "vso-node-api": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/vso-node-api/-/vso-node-api-5.1.2.tgz", - "integrity": "sha1-gXtm/+1uEcvXH5O5FvSxicljQls=", - "dev": true, - "requires": { - "q": "^1.0.1", - "tunnel": "0.0.4", - "underscore": "^1.8.3" - } - }, - "vss-web-extension-sdk": { - "version": "4.125.2", - "resolved": "https://registry.npmjs.org/vss-web-extension-sdk/-/vss-web-extension-sdk-4.125.2.tgz", - "integrity": "sha512-+xkiR+Fegk7OhoPo+AZwLJOWpfqozMC5FvaOtQ7/kBD8lX+ORT7nKZsQkEuIR0FNLXGTaSTOOM9DjRfW60mc3A==", - "requires": { - "@types/jquery": ">=2.0.34", - "@types/jqueryui": ">=1.11.31", - "@types/knockout": ">=3.4.46", - "@types/mousetrap": "~1.5.34", - "@types/q": "0.0.32", - "@types/react": ">=15.3.1", - "@types/requirejs": ">=2.1.28" - } - }, - "walkdir": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", - "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=", - "dev": true - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "winreg": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/winreg/-/winreg-0.0.12.tgz", - "integrity": "sha1-BxBVVLoanQiXklHRKUdb/64wBrc=", - "dev": true - }, - "winston": { - "version": "0.8.3", - "resolved": "http://registry.npmjs.org/winston/-/winston-0.8.3.tgz", - "integrity": "sha1-ZLar9M0Brcrv1QCTk7HY6L7BnbA=", - "dev": true, - "requires": { - "async": "0.2.x", - "colors": "0.6.x", - "cycle": "1.0.x", - "eyes": "0.1.x", - "isstream": "0.1.x", - "pkginfo": "0.3.x", - "stack-trace": "0.0.x" - }, - "dependencies": { - "async": { - "version": "0.2.10", - "resolved": "http://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", - "dev": true - }, - "colors": { - "version": "0.6.2", - "resolved": "http://registry.npmjs.org/colors/-/colors-0.6.2.tgz", - "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=", - "dev": true - }, - "pkginfo": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", - "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=", - "dev": true - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "dev": true, - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" - } - }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, - "yallist": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", - "dev": true - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - }, - "zip-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", - "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", - "dev": true, - "requires": { - "archiver-utils": "^1.3.0", - "compress-commons": "^1.2.0", - "lodash": "^4.8.0", - "readable-stream": "^2.0.0" - } - } - } -} +{ + "name": "dependencycheck-azuredevops", + "version": "0.0.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/jquery": { + "version": "2.0.48", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-2.0.48.tgz", + "integrity": "sha512-nNLzUrVjaRV/Ds1eHZLYTd7IZxs38cwwLSaqMJj8OTXY8xNUbxSK69bi9cMLvQ7dm/IBeQ1wHwQ0S1uYa0rd2w==" + }, + "@types/jqueryui": { + "version": "1.11.37", + "resolved": "https://registry.npmjs.org/@types/jqueryui/-/jqueryui-1.11.37.tgz", + "integrity": "sha512-aKT7dOhxYTTkLS43q5miBeuRpfyh916sgI7m/6EJJvJR6j36e5eRORONZyzD5twTLMdMw6uYR7vqhreIHps9tw==", + "requires": { + "@types/jquery": "*" + } + }, + "@types/knockout": { + "version": "3.4.46", + "resolved": "https://registry.npmjs.org/@types/knockout/-/knockout-3.4.46.tgz", + "integrity": "sha512-dsnfVF8CPQNv3mk7iQS2mGv7AAUVRcTGExbrlfwDD1AZPaV8cquHsVw3mLIFBsiHL8h4TiECiWtukqTF9dcEug==" + }, + "@types/mousetrap": { + "version": "1.5.34", + "resolved": "https://registry.npmjs.org/@types/mousetrap/-/mousetrap-1.5.34.tgz", + "integrity": "sha512-a2yhRIADupQfOFM75v7GfcQQLUxU705+i/xcZ3N/3PK3Xdo31SUfuCUByWPGOHB1e38m7MxTx/D8FPVsJXZKJw==" + }, + "@types/q": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz", + "integrity": "sha1-vShOV8hPEyXacCur/IKlMoGQwMU=" + }, + "@types/react": { + "version": "16.0.22", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.0.22.tgz", + "integrity": "sha512-d8STysuhEgZ3MxMqY8PlTcUj2aJljBtQ+94SixlQdFgP3c5gh0fBBW5r73RxHuZqKohYvHb9nNbqGQfco7ReoQ==" + }, + "@types/requirejs": { + "version": "2.1.31", + "resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.31.tgz", + "integrity": "sha512-b2soeyuU76rMbcRJ4e0hEl0tbMhFwZeTC0VZnfuWlfGlk6BwWNsev6kFu/twKABPX29wkX84wU2o+cEJoXsiTw==" + }, + "app-root-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-1.0.0.tgz", + "integrity": "sha1-LHKZF0vGHLhv46SnmOAeSTt9U30=", + "dev": true + }, + "arch": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz", + "integrity": "sha512-BLM56aPo9vLLFVa8+/+pJLnrZ7QGGTVHWsCwieAWT9o9K8UeGaQbzZbGoabWLOo2ksBCztoXdqBZBplqLDDCSg==", + "dev": true + }, + "archiver": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-2.0.3.tgz", + "integrity": "sha1-tDYLtYSvFDeZGUJxbyHXxSPR270=", + "dev": true, + "requires": { + "archiver-utils": "^1.3.0", + "async": "^2.0.0", + "buffer-crc32": "^0.2.1", + "glob": "^7.0.0", + "lodash": "^4.8.0", + "readable-stream": "^2.0.0", + "tar-stream": "^1.5.0", + "walkdir": "^0.0.11", + "zip-stream": "^1.2.0" + }, + "dependencies": { + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } + } + } + }, + "archiver-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-1.3.0.tgz", + "integrity": "sha1-5QtMCccL89aA4y/xt5lOn52JUXQ=", + "dev": true, + "requires": { + "glob": "^7.0.0", + "graceful-fs": "^4.1.0", + "lazystream": "^1.0.0", + "lodash": "^4.8.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + } + }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, + "bl": { + "version": "1.2.2", + "resolved": "http://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "brace-expansion": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "camelcase-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", + "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "map-obj": "^2.0.0", + "quick-lru": "^1.0.0" + } + }, + "clipboardy": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/clipboardy/-/clipboardy-1.2.3.tgz", + "integrity": "sha512-2WNImOvCRe6r63Gk9pShfkwXsVtKCroMAevIbiae021mS850UkWPbevxsBz3tnvjZIEGvlwaqCPsw+4ulzNgJA==", + "dev": true, + "requires": { + "arch": "^2.1.0", + "execa": "^0.8.0" + } + }, + "colors": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.2.tgz", + "integrity": "sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==", + "dev": true + }, + "compress-commons": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", + "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", + "dev": true, + "requires": { + "buffer-crc32": "^0.2.1", + "crc32-stream": "^2.0.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "core-js": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz", + "integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "crc": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", + "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", + "dev": true, + "requires": { + "buffer": "^5.1.0" + } + }, + "crc32-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", + "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", + "dev": true, + "requires": { + "crc": "^3.4.4", + "readable-stream": "^2.0.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "currently-unhandled": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", + "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, + "requires": { + "array-find-index": "^1.0.1" + } + }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=", + "dev": true + }, + "dateformat": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.11.tgz", + "integrity": "sha1-8ny+56ASu/uC6gUVYtOXf2CT27E=", + "dev": true, + "requires": { + "get-stdin": "*", + "meow": "*" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "dev": true, + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", + "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es6-promise": { + "version": "3.0.2", + "resolved": "http://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz", + "integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y=", + "dev": true + }, + "execa": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", + "integrity": "sha1-2NdrvBtVIX7RkP1t1J08d07PyNo=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=", + "dev": true + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + }, + "get-stream": { + "version": "3.0.0", + "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true + }, + "i": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/i/-/i-0.3.6.tgz", + "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=", + "dev": true + }, + "ieee754": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", + "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==", + "dev": true + }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=", + "dev": true + }, + "indent-string": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", + "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-builtin-module": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", + "dev": true + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "dev": true, + "requires": { + "has": "^1.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-symbol": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "json-in-place": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-in-place/-/json-in-place-1.0.1.tgz", + "integrity": "sha1-ih7NJaac4ZAFUs1xUr2TdU3k4fA=", + "dev": true, + "requires": { + "json-lexer": "1.1.1" + } + }, + "json-lexer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/json-lexer/-/json-lexer-1.1.1.tgz", + "integrity": "sha1-vT7V1+Vgudma0iNPKMpwb7N3t9Q=", + "dev": true + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "jszip": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz", + "integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==", + "dev": true, + "requires": { + "core-js": "~2.3.0", + "es6-promise": "~3.0.2", + "lie": "~3.1.0", + "pako": "~1.0.2", + "readable-stream": "~2.0.6" + }, + "dependencies": { + "process-nextick-args": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", + "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "dev": true + }, + "readable-stream": { + "version": "2.0.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz", + "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~0.10.x", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + } + }, + "lie": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", + "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=", + "dev": true, + "requires": { + "immediate": "~3.0.5" + } + }, + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "dev": true + }, + "loud-rejection": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", + "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, + "requires": { + "currently-unhandled": "^0.4.1", + "signal-exit": "^3.0.0" + } + }, + "lru-cache": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.4.tgz", + "integrity": "sha512-EPstzZ23znHUVLKj+lcXO1KvZkrlw+ZirdwvOmnAnA/1PB4ggyXJ77LRkCqkff+ShQ+cqoxCxLQOh4cKITO5iA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^3.0.2" + } + }, + "map-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", + "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", + "dev": true + }, + "meow": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", + "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", + "dev": true, + "requires": { + "camelcase-keys": "^4.0.0", + "decamelize-keys": "^1.0.0", + "loud-rejection": "^1.0.0", + "minimist-options": "^3.0.1", + "normalize-package-data": "^2.3.4", + "read-pkg-up": "^3.0.0", + "redent": "^2.0.0", + "trim-newlines": "^2.0.0", + "yargs-parser": "^10.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "minimist-options": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", + "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0" + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "ncp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", + "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=", + "dev": true + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", + "dev": true + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onecolor": { + "version": "2.5.0", + "resolved": "http://registry.npmjs.org/onecolor/-/onecolor-2.5.0.tgz", + "integrity": "sha1-Ila2UdyAfBAfAK7b1JklxXpEMcE=", + "dev": true + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pako": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", + "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==", + "dev": true + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pkginfo": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", + "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "dev": true + }, + "prompt": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/prompt/-/prompt-0.2.14.tgz", + "integrity": "sha1-V3VPZPVD/XsIRXB8gY7OYY8F/9w=", + "dev": true, + "requires": { + "pkginfo": "0.x.x", + "read": "1.0.x", + "revalidator": "0.1.x", + "utile": "0.2.x", + "winston": "0.8.x" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "quick-lru": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", + "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", + "dev": true + }, + "read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", + "dev": true, + "requires": { + "mute-stream": "~0.0.4" + } + }, + "read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "requires": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + } + }, + "read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "redent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", + "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", + "dev": true, + "requires": { + "indent-string": "^3.0.0", + "strip-indent": "^2.0.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "revalidator": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", + "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=", + "dev": true + }, + "rimraf": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "dev": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shelljs": { + "version": "0.5.3", + "resolved": "http://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", + "integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "spdx-correct": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", + "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", + "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", + "dev": true + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-indent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", + "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", + "dev": true + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, + "tfx-cli": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/tfx-cli/-/tfx-cli-0.6.3.tgz", + "integrity": "sha512-58sLayoikjA2jXrnv9pYsbkkLEwaips9qS6r+sPulVUywiom5PFnaNVRkD7bPSBIxZt1nwa/NbITVTZIzLvtRw==", + "dev": true, + "requires": { + "app-root-path": "1.0.0", + "archiver": "2.0.3", + "async": "^1.4.0", + "clipboardy": "~1.2.3", + "colors": "~1.3.0", + "glob": "7.1.2", + "json-in-place": "^1.0.1", + "jszip": "~3.1.5", + "lodash": "~4.17.0", + "minimist": "^1.1.2", + "mkdirp": "^0.5.1", + "onecolor": "^2.5.0", + "os-homedir": "^1.0.1", + "prompt": "^0.2.14", + "read": "^1.0.6", + "shelljs": "^0.5.1", + "tmp": "0.0.26", + "tracer": "0.7.4", + "util.promisify": "^1.0.0", + "uuid": "^3.0.1", + "validator": "^3.43.0", + "vso-node-api": "^5.0.0", + "winreg": "0.0.12", + "xml2js": "^0.4.16" + } + }, + "tinytim": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/tinytim/-/tinytim-0.1.1.tgz", + "integrity": "sha1-yWih5VWa2VUyJO92J7qzTjyu+Kg=", + "dev": true + }, + "tmp": { + "version": "0.0.26", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.26.tgz", + "integrity": "sha1-nvqCDOKhD4H4l5VVus4/FVJs4fI=", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.0" + } + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, + "tracer": { + "version": "0.7.4", + "resolved": "http://registry.npmjs.org/tracer/-/tracer-0.7.4.tgz", + "integrity": "sha1-d/oEN8+Ct2vNvNRLhHRHcuWeUlk=", + "dev": true, + "requires": { + "colors": "1.0.3", + "dateformat": "1.0.11", + "tinytim": "0.1.1" + }, + "dependencies": { + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", + "dev": true + } + } + }, + "trim-newlines": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", + "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", + "dev": true + }, + "tunnel": { + "version": "0.0.4", + "resolved": "http://registry.npmjs.org/tunnel/-/tunnel-0.0.4.tgz", + "integrity": "sha1-LTeFoVjBdMmhbcLARuxfxfF0IhM=", + "dev": true + }, + "typescript": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.6.1.tgz", + "integrity": "sha1-7znN6ierrAtQAkLWcmq5DgyEZjE=", + "dev": true + }, + "underscore": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", + "dev": true + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "utile": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/utile/-/utile-0.2.1.tgz", + "integrity": "sha1-kwyI6ZCY1iIINMNWy9mncFItkNc=", + "dev": true, + "requires": { + "async": "~0.2.9", + "deep-equal": "*", + "i": "0.3.x", + "mkdirp": "0.x.x", + "ncp": "0.4.x", + "rimraf": "2.x.x" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", + "dev": true + }, + "ncp": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz", + "integrity": "sha1-q8xsvT7C7Spyn/bnwfqPAXhKhXQ=", + "dev": true + } + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validator": { + "version": "3.43.0", + "resolved": "http://registry.npmjs.org/validator/-/validator-3.43.0.tgz", + "integrity": "sha1-lkZLmS1BloM9l6GUv0Cxn/VLrgU=", + "dev": true + }, + "vso-node-api": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/vso-node-api/-/vso-node-api-5.1.2.tgz", + "integrity": "sha1-gXtm/+1uEcvXH5O5FvSxicljQls=", + "dev": true, + "requires": { + "q": "^1.0.1", + "tunnel": "0.0.4", + "underscore": "^1.8.3" + } + }, + "vss-web-extension-sdk": { + "version": "4.125.2", + "resolved": "https://registry.npmjs.org/vss-web-extension-sdk/-/vss-web-extension-sdk-4.125.2.tgz", + "integrity": "sha512-+xkiR+Fegk7OhoPo+AZwLJOWpfqozMC5FvaOtQ7/kBD8lX+ORT7nKZsQkEuIR0FNLXGTaSTOOM9DjRfW60mc3A==", + "requires": { + "@types/jquery": ">=2.0.34", + "@types/jqueryui": ">=1.11.31", + "@types/knockout": ">=3.4.46", + "@types/mousetrap": "~1.5.34", + "@types/q": "0.0.32", + "@types/react": ">=15.3.1", + "@types/requirejs": ">=2.1.28" + } + }, + "walkdir": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", + "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "winreg": { + "version": "0.0.12", + "resolved": "https://registry.npmjs.org/winreg/-/winreg-0.0.12.tgz", + "integrity": "sha1-BxBVVLoanQiXklHRKUdb/64wBrc=", + "dev": true + }, + "winston": { + "version": "0.8.3", + "resolved": "http://registry.npmjs.org/winston/-/winston-0.8.3.tgz", + "integrity": "sha1-ZLar9M0Brcrv1QCTk7HY6L7BnbA=", + "dev": true, + "requires": { + "async": "0.2.x", + "colors": "0.6.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "pkginfo": "0.3.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", + "dev": true + }, + "colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=", + "dev": true + }, + "pkginfo": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=", + "dev": true + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "xml2js": { + "version": "0.4.19", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", + "dev": true + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "dev": true + }, + "yargs-parser": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", + "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + }, + "zip-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-1.2.0.tgz", + "integrity": "sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ=", + "dev": true, + "requires": { + "archiver-utils": "^1.3.0", + "compress-commons": "^1.2.0", + "lodash": "^4.8.0", + "readable-stream": "^2.0.0" + } + } + } +} From 0464977428fb10deaa41f22edadd49f93e07be71 Mon Sep 17 00:00:00 2001 From: Philip Teilmeier Date: Thu, 12 Nov 2020 10:07:19 +0100 Subject: [PATCH 02/25] Fixed image paths --- overview.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/overview.md b/overview.md index 36c97a3..06ff709 100644 --- a/overview.md +++ b/overview.md @@ -20,15 +20,15 @@ The OWASP Dependency Check Azure DevOps Extension enables the following features - Press the **+** icon to add a new **OWASP Dependency Check** build task. - + - Search for the **OWASP Dependency Check** task and press the **Add** button. - + - Configure the build task with the appropriate [Dependency Check Command Line Arguments](https://jeremylong.github.io/DependencyCheck/dependency-check-cli/arguments.html). - + ## Executing Dependency Check @@ -36,29 +36,29 @@ The OWASP Dependency Check Azure DevOps Extension enables the following features - Review the build logs and ensure the the Dependency Check task successfully completed. - + - Click on the Dependency Check build task to view the build output. - + ## Dependency Check Reports - Each of the selected report formats are uploaded to the **Artifacts** for downloading. - + - Select **Dependency Check** to open the **Artifact Explorer** and download the Dependency Check reports. - + - Dependency Check supports exporting the results to JUNIT formatted test results. To parse the JUNIT test results, create a new **Publish Test Results** build task with the following configuration. - + - View the **Tests** screen to view the passing and failing Dependency Check tests. - + ## Learn More From d35d2f973e749218158e58e829133b4810ec78f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Sat, 6 Feb 2021 23:42:25 -0500 Subject: [PATCH 03/25] init task-v2 --- .gitignore | 10 +- .../dependency-check-build-task.js | 132 +++++++++++++++ .../dependency-check-build-task.ts | 142 ++++++++++++++++ .../dependency-check/data/README.md | 3 + .../dependency-check-build-task-v2/icon.png | Bin 0 -> 11786 bytes .../package.json | 22 +++ .../dependency-check-build-task-v2/task.json | 159 ++++++++++++++++++ .../tsconfig.json | 9 + 8 files changed, 474 insertions(+), 3 deletions(-) create mode 100644 src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js create mode 100644 src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts create mode 100644 src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md create mode 100644 src/Tasks/dependency-check-build-task-v2/icon.png create mode 100644 src/Tasks/dependency-check-build-task-v2/package.json create mode 100644 src/Tasks/dependency-check-build-task-v2/task.json create mode 100644 src/Tasks/dependency-check-build-task-v2/tsconfig.json diff --git a/.gitignore b/.gitignore index b589001..4a783a1 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,11 @@ node_modules .vscode *.vsix +.taskkey + # Dep check data directory files -src/Tasks/dependency-check-build-task/dependency-check/data/*.json -src/Tasks/dependency-check-build-task/dependency-check/data/*.db -src/Tasks/dependency-check-build-task/dependency-check-*.zip +src/Tasks/dependency-check-build-task*/dependency-check/* +src/Tasks/dependency-check-build-task*/dependency-check/data/* +!src/Tasks/dependency-check-build-task*/dependency-check/data +!src/Tasks/dependency-check-build-task*/dependency-check/data/README.md +src/Tasks/dependency-check-build-task*/dependency-check-*.zip diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js new file mode 100644 index 0000000..4a3d47b --- /dev/null +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js @@ -0,0 +1,132 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const tl = require("azure-pipelines-task-lib/task"); +const httpClient = require("typed-rest-client/HttpClient"); +const unzipper = require("unzipper"); +const client = new httpClient.HttpClient('DC_AGENT'); +const releaseApi = 'https://api.github.com/repos/jeremylong/DependencyCheck/releases'; +function run() { + return __awaiter(this, void 0, void 0, function* () { + console.log("Starting Dependency Check..."); + try { + // Get inputs from build task. + let projectName = tl.getInput('projectName', true); + let scanPath = tl.getPathInput('scanPath', true, true); + let excludePath = tl.getPathInput('excludePath'); + let format = tl.getInput('format', true); + let failOnCVSS = tl.getBoolInput('failOnCVSS'); + let suppressionPath = tl.getPathInput('suppressionPath'); + let reportsDirectory = tl.getPathInput('reportsDirectory'); + let enableExperimental = tl.getBoolInput('enableExperimental', true); + let enableRetired = tl.getBoolInput('enableRetired', true); + let enableVerbose = tl.getBoolInput('enableVerbose', true); + let localInstallPath = tl.getPathInput('localInstallPath'); + let dependencyCheckVersion = tl.getInput('dependencyCheckVersion') || 'latest'; + let dataMirror = tl.getInput('dataMirror'); + let customRepo = tl.getInput('customRepo'); + let additionalArguments = tl.getInput('additionalArguments'); + // Trim the strings + projectName = projectName === null || projectName === void 0 ? void 0 : projectName.trim(); + scanPath = scanPath === null || scanPath === void 0 ? void 0 : scanPath.trim(); + excludePath = excludePath === null || excludePath === void 0 ? void 0 : excludePath.trim(); + suppressionPath = suppressionPath === null || suppressionPath === void 0 ? void 0 : suppressionPath.trim(); + reportsDirectory = reportsDirectory === null || reportsDirectory === void 0 ? void 0 : reportsDirectory.trim(); + additionalArguments = additionalArguments === null || additionalArguments === void 0 ? void 0 : additionalArguments.trim(); + localInstallPath = localInstallPath === null || localInstallPath === void 0 ? void 0 : localInstallPath.trim(); + let testDir = tl.getVariable('Common.TestResultsDirectory'); + // Set reports directory (if necessary) + if (!reportsDirectory) { + reportsDirectory = `${testDir}\\dependency-check`; + } + console.log(`Setting report directory to ${reportsDirectory}`); + // Create report directory (if necessary) + if (!tl.exist(reportsDirectory)) { + console.log(`Creating report directory at ${reportsDirectory}`); + tl.mkdirP(reportsDirectory); + } + // Default args + let args = `--project "${projectName}" --scan "${scanPath}" --out "${reportsDirectory}"`; + // Exclude switch + if (excludePath) { + args += ` --exclude "${excludePath}"`; + } + // Format types + let outputTypes = format === null || format === void 0 ? void 0 : format.split(','); + outputTypes === null || outputTypes === void 0 ? void 0 : outputTypes.forEach(function (outputType) { + args += ` --format ${outputType}`; + }); + // Fail on CVSS switch + if (failOnCVSS) { + args += ` --failOnCVSS ${failOnCVSS}`; + } + // Suppression switch + if (suppressionPath) { + args += ` --suppression "${suppressionPath}"`; + } + // Set enableExperimental option if requested + if (enableExperimental) { + args += ' --enableExperimental'; + } + // Set enableRetired option if requested + if (enableRetired) { + args += ' --enableRetired'; + } + // Set log switch if requested + if (enableVerbose) { + args += ` --log "${reportsDirectory}\log"`; + } + // additionalArguments + if (additionalArguments) { + args += ` ${additionalArguments}`; + } + // Set installation location + if (!localInstallPath) { + localInstallPath = 'dependency-check'; + let url; + if (customRepo) { + console.log(`Downloading Dependency Check installer from ${customRepo}...`); + url = customRepo; + } + else { + console.log(`Downloading Dependency Check ${dependencyCheckVersion} installer from GitHub..`); + url = yield getUrl(dependencyCheckVersion); + } + yield unzip(url); + } + console.log(args); + } + catch (err) { + console.log(err.message); + tl.error(err.message); + tl.setResult(tl.TaskResult.Failed, 'Unhandled error condition detected.'); + } + console.log("Ending Dependency Check..."); + }); +} +function getUrl(version) { + return __awaiter(this, void 0, void 0, function* () { + let url = `${releaseApi}/tags/v${version}`; + if (version == 'latest') + url = `${releaseApi}/${version}`; + let response = yield client.get(url); + let releaseInfo = JSON.parse(yield response.readBody()); + let asset = releaseInfo['assets'].find(asset => asset['content_type'] == 'application/zip'); + return asset['browser_download_url']; + }); +} +function unzip(url) { + return __awaiter(this, void 0, void 0, function* () { + let response = yield client.get(url); + yield response.message.pipe(unzipper.Extract({ path: './' })); + }); +} +run(); diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts new file mode 100644 index 0000000..c361e53 --- /dev/null +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts @@ -0,0 +1,142 @@ +import tl = require('azure-pipelines-task-lib/task'); +import fs = require('fs'); +import { release } from 'os'; +import httpClient = require('typed-rest-client/HttpClient'); +import unzipper = require('unzipper'); + +const client = new httpClient.HttpClient('DC_AGENT'); +const releaseApi = 'https://api.github.com/repos/jeremylong/DependencyCheck/releases'; + +async function run() { + console.log("Starting Dependency Check...") + try { + // Get inputs from build task. + let projectName: string | undefined = tl.getInput('projectName', true); + let scanPath: string | undefined = tl.getPathInput('scanPath', true, true); + let excludePath: string | undefined = tl.getPathInput('excludePath'); + let format: string | undefined = tl.getInput('format', true); + let failOnCVSS: boolean | undefined = tl.getBoolInput('failOnCVSS'); + let suppressionPath: string | undefined = tl.getPathInput('suppressionPath'); + let reportsDirectory: string | undefined = tl.getPathInput('reportsDirectory'); + let enableExperimental: boolean | undefined = tl.getBoolInput('enableExperimental', true); + let enableRetired: boolean | undefined = tl.getBoolInput('enableRetired', true); + let enableVerbose: boolean | undefined = tl.getBoolInput('enableVerbose', true); + let localInstallPath: string | undefined = tl.getPathInput('localInstallPath'); + let dependencyCheckVersion: string | undefined = tl.getInput('dependencyCheckVersion') || 'latest'; + let dataMirror: string | undefined = tl.getInput('dataMirror'); + let customRepo: string | undefined = tl.getInput('customRepo'); + let additionalArguments: string | undefined = tl.getInput('additionalArguments'); + + // Trim the strings + projectName = projectName?.trim() + scanPath = scanPath?.trim(); + excludePath = excludePath?.trim(); + suppressionPath = suppressionPath?.trim(); + reportsDirectory = reportsDirectory?.trim(); + additionalArguments = additionalArguments?.trim(); + localInstallPath = localInstallPath?.trim(); + + let testDir = tl.getVariable('Common.TestResultsDirectory'); + + // Set reports directory (if necessary) + if (!reportsDirectory) { + reportsDirectory = `${testDir}\\dependency-check`; + } + console.log(`Setting report directory to ${reportsDirectory}`); + + // Create report directory (if necessary) + if (!tl.exist(reportsDirectory!)) { + console.log(`Creating report directory at ${reportsDirectory}`); + tl.mkdirP(reportsDirectory!); + } + + // Default args + let args = `--project "${projectName}" --scan "${scanPath}" --out "${reportsDirectory}"`; + + // Exclude switch + if (excludePath) { + args += ` --exclude "${excludePath}"`; + } + + // Format types + let outputTypes = format?.split(','); + outputTypes?.forEach(function (outputType) { + args += ` --format ${outputType}`; + }); + + // Fail on CVSS switch + if (failOnCVSS) { + args += ` --failOnCVSS ${failOnCVSS}`; + } + + // Suppression switch + if (suppressionPath) { + args += ` --suppression "${suppressionPath}"`; + } + + // Set enableExperimental option if requested + if (enableExperimental) { + args += ' --enableExperimental'; + } + + // Set enableRetired option if requested + if (enableRetired) { + args += ' --enableRetired'; + } + + // Set log switch if requested + if (enableVerbose) { + args += ` --log "${reportsDirectory}\log"`; + } + + // additionalArguments + if (additionalArguments) { + args += ` ${additionalArguments}`; + } + + // Set installation location + if (!localInstallPath) { + localInstallPath = 'dependency-check'; + + let url; + if (customRepo) { + console.log(`Downloading Dependency Check installer from ${customRepo}...`); + url = customRepo; + } + else { + console.log(`Downloading Dependency Check ${dependencyCheckVersion} installer from GitHub..`); + url = await getUrl(dependencyCheckVersion); + } + + await unzip(url); + } + + console.log(args); + } + catch (err) { + console.log(err.message); + tl.error(err.message); + tl.setResult(tl.TaskResult.Failed, 'Unhandled error condition detected.'); + } + + console.log("Ending Dependency Check..."); +} + +async function getUrl(version) { + let url = `${releaseApi}/tags/v${version}`; + if (version == 'latest') + url = `${releaseApi}/${version}`; + + let response = await client.get(url); + let releaseInfo = JSON.parse(await response.readBody()); + let asset = releaseInfo['assets'].find(asset => asset['content_type'] == 'application/zip'); + + return asset['browser_download_url']; +} + +async function unzip(url) { + let response = await client.get(url); + await response.message.pipe(unzipper.Extract({ path: './' })); +} + +run(); \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md b/src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md new file mode 100644 index 0000000..51ca064 --- /dev/null +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md @@ -0,0 +1,3 @@ +# Vulnerability data directory + +Files cannot be shipped with the VSIX due to size limitations on the upload. Cached files will be pulled into this directory from a CDN prior to executing the scan to avoid downloading and processing from the ground up on every build. diff --git a/src/Tasks/dependency-check-build-task-v2/icon.png b/src/Tasks/dependency-check-build-task-v2/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..dd7c1d9971caa2372249cbf1eabc386de985a346 GIT binary patch literal 11786 zcmY+qWmFwNlP!AS;O-V2f;$9v2=4Cg9-IINhl9JjySux)6N0-1hv3|NGxO%%+iSH{ z)$YBky8rZ#4p&l;L`EP$0002U(o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oosA)JV>&Yr3+0&1a(_o7D=IEI->spQdM zD&I+n*wmXDMs&YhZ=`YXem+jZ3f=dgv&r|a4`##YwWTKeY!lx2%FSNz zaRAY@BH($`G`w2hAtj&<`_0g$0c@XTf?aqgLvT$+U4mrHA3Nq^j-95aHvM)ZRK^4VJs`kiG8%oqI!9s`mK@6|6>0(~q9*PWm60Qu#?84wop0B>GtD!Dxh@8@a1(KHf42P@`|O)zQPUJ2(p;yILN4r!WzsWyr#9sa z-KoW+5CXgOEQSY2xAJm$Ex;DN>1yQG@1YJCtXJblTDT)-CCG0=eSD{on_R!-TGT#| zi7#Fp!gINdGRiZ9-w`VZqx$;$rDgBvyfCw+c*5L4b98e51Yb#NI;s%Z>w;FJv`I+! zDi>Lgz(O#R?C-4B@H;@dQ!r*#u)J@77ku|?Dyw!KAcL&=k=1Ll1C`^>&{q4e@4Qg6 zM?&~7F1BZ{>26D6pt0OtztZlOUIZFR6N#ca0dBxprpU|Cnm9ME*o0;q)29x4ZfIhf z3E>yZ%X2v+qXm6`)T%QCa2^Z3<CoH6!=Bxe^ufTtPTuXmf5U&w63j9B!9}*@2 literal 0 HcmV?d00001 diff --git a/src/Tasks/dependency-check-build-task-v2/package.json b/src/Tasks/dependency-check-build-task-v2/package.json new file mode 100644 index 0000000..0ed22e1 --- /dev/null +++ b/src/Tasks/dependency-check-build-task-v2/package.json @@ -0,0 +1,22 @@ +{ + "name": "dependency-check-build-task", + "version": "1.0.0", + "description": "", + "main": "dependency-check-build-task.js", + "scripts": { + "install-libs": "npm install", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Dependency Check", + "license": "Apache-2.0", + "dependencies": { + "azure-pipelines-task-lib": "^3.0.6-preview.1", + "typed-rest-client": "^1.8.1", + "unzipper": "^0.10.11" + }, + "devDependencies": { + "@types/node": "^14.14.25", + "@types/q": "^1.5.4", + "typescript": "^4.0.2" + } +} diff --git a/src/Tasks/dependency-check-build-task-v2/task.json b/src/Tasks/dependency-check-build-task-v2/task.json new file mode 100644 index 0000000..ebee2de --- /dev/null +++ b/src/Tasks/dependency-check-build-task-v2/task.json @@ -0,0 +1,159 @@ +{ + "id": "[task id]", + "name": "[task name]", + "friendlyName": "OWASP Dependency Check", + "description": "Dependency Check is a Software Composition Analysis (SCA) tool that attempts to detect publicly disclosed vulnerabilities contained within a project's dependencies.", + "helpMarkDown": "[More Information](https://jeremylong.github.io/DependencyCheck/index.html)", + "category": "Build", + "visibility": [ "Build" ], + "author": "Dependency Check", + "version": { + "Major": "[major]", + "Minor": "[minor]", + "Patch": "[patchrev]" + }, + "demands": [], + "minimumAgentVersion": "2.0.0", + "inputs": [ + { + "name": "projectName", + "type": "string", + "label": "Project Name", + "helpMarkDown": "The name of the project being scanned.", + "defaultValue": "", + "required": true + }, + { + "name": "scanPath", + "type": "filePath", + "label": "Scan Path", + "helpMarkDown": "The path to scan. Supports Ant style paths (e.g. 'directory/**/*.jar').", + "defaultValue": "", + "required": true + }, + { + "name": "excludePath", + "type": "filePath", + "label": "Exclude Path", + "helpMarkDown": "The path patterns to exclude from the scan. Supports Ant style path patterns (e.g. /exclude/).", + "defaultValue": "", + "required": false + }, + { + "name": "format", + "type": "pickList", + "label": "Report Format", + "defaultValue": "HTML", + "required": true, + "helpMarkDown": "The output format to write to (XML, HTML, CSV, JSON, JUNIT, ALL). Multiple formats can be selected. The default is HTML.", + "properties": { + "EditableOptions": "False", + "MultiSelectFlatList": "True" + }, + "options": { + "XML": "XML", + "HTML": "HTML", + "CSV": "CSV", + "JSON": "JSON", + "JUNIT": "JUNIT", + "ALL": "ALL" + } + }, + { + "name": "failOnCVSS", + "type": "string", + "label": "CVSS Failure Threshold", + "defaultValue": "", + "required": false, + "helpMarkDown": "Threshold between 0 and 10 that will cause Dependency Check will return the exit code if a vulnerability with a CVSS score equal to or higher was identified." + }, + { + "name": "suppressionPath", + "type": "filePath", + "label": "Suppression Paths", + "defaultValue": "", + "required": false, + "helpMarkDown": "The file path to the suppression XML file used to suppress false positives. This can be specified more than once to utilize multiple suppression files. The argument can be a local file path, a URL to a suppression file, or even a reference to a file on the class path." + }, + { + "name": "reportsDirectory", + "type": "filePath", + "label": "Report Directory", + "defaultValue": "", + "required": false, + "helpMarkDown": "Report output directory. On-prem build agents can specify a local directory to override the default location. The default location is the $COMMON_TESTRESULTSDIRECTORY\\dependency-check directory." + }, + { + "name": "enableExperimental", + "type": "boolean", + "label": "Experimental Analyzers", + "defaultValue": "false", + "required": false, + "helpMarkDown": "Enable the experimental analyzers." + }, + { + "name": "enableRetired", + "type": "boolean", + "label": "Retired Analyzers", + "defaultValue": "false", + "required": false, + "helpMarkDown": "Enable the retired analyzers." + }, + { + "name": "enableVerbose", + "type": "boolean", + "label": "Verbose", + "defaultValue": "false", + "required": false, + "helpMarkDown": "Enable verbose logging." + }, + { + "name": "additionalArguments", + "type": "multiLine", + "label": "Additional Arguments", + "defaultValue": "", + "required": false, + "helpMarkDown": "Pass additional command line arguments to the Dependency Check command line interface." + }, + { + "name": "localInstallPath", + "type": "filePath", + "label": "Local Install Path", + "helpMarkDown": "The local path to the `dependency-check` installation directory (on-prem build agents only). Setting this field will run the Dependency Check locally instead of downloading the installer onto the build agent.", + "defaultValue": "", + "required": false + }, + { + "name": "customRepo", + "type": "string", + "label": "Custom Installer Repository URL", + "helpMarkDown": "By default, the build task downloads the installer from the Dependency Check GitHub releases. Entering a value for this field will pull the installer package from a custom endpoint.", + "defaultValue": "", + "required": false + }, + { + "name": "dependencyCheckVersion", + "type": "string", + "label": "Installer Version", + "helpMarkDown": "By default, the build task downloads the installer from the Dependency Check GitHub releases. Setting this field will change the Dependency Check version downloaded onto the build agent.", + "defaultValue": "6.0.2", + "required": false + }, + { + "name": "dataMirror", + "type": "string", + "label": "Data Mirror Archive URL", + "helpMarkDown": "The https path to the compressed Dependency Check data directory (containing the odc.mv.db and jsrepository.json files).", + "defaultValue": "", + "required": false + } + ], + "instanceNameFormat": "Dependency Check", + "execution": { + "Node10": { + "target": "$(currentDirectory)\\dependency-check-build-task.js", + "argumentFormat": "", + "workingDirectory": "$(currentDirectory)" + } + } +} diff --git a/src/Tasks/dependency-check-build-task-v2/tsconfig.json b/src/Tasks/dependency-check-build-task-v2/tsconfig.json new file mode 100644 index 0000000..5db1d7c --- /dev/null +++ b/src/Tasks/dependency-check-build-task-v2/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "target": "ES6", + "module": "commonjs" + }, + "exclude": [ + "node_modules" + ] +} \ No newline at end of file From 31ac19aff7cd6fbd3ed8d03e71bc87e42ae8856c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Tue, 9 Feb 2021 10:30:21 -0500 Subject: [PATCH 04/25] run locally --- .../dependency-check-build-task.ts | 8 +- .../package-lock.json | 560 ++++++++++++++++++ .../package.json | 3 +- 3 files changed, 568 insertions(+), 3 deletions(-) create mode 100644 src/Tasks/dependency-check-build-task-v2/package-lock.json diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts index c361e53..960a331 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts @@ -1,12 +1,18 @@ import tl = require('azure-pipelines-task-lib/task'); import fs = require('fs'); -import { release } from 'os'; import httpClient = require('typed-rest-client/HttpClient'); import unzipper = require('unzipper'); const client = new httpClient.HttpClient('DC_AGENT'); const releaseApi = 'https://api.github.com/repos/jeremylong/DependencyCheck/releases'; +// Install prerequisites : https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=azure-devops#prerequisites +// To test locally Run: +// cd ./Tasks/dependency-check-build-task-v2/ +// npm install +// tsc +// node dependency-check-build-task.js + async function run() { console.log("Starting Dependency Check...") try { diff --git a/src/Tasks/dependency-check-build-task-v2/package-lock.json b/src/Tasks/dependency-check-build-task-v2/package-lock.json new file mode 100644 index 0000000..0c45b94 --- /dev/null +++ b/src/Tasks/dependency-check-build-task-v2/package-lock.json @@ -0,0 +1,560 @@ +{ + "name": "dependency-check-build-task", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/concat-stream": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.0.tgz", + "integrity": "sha1-OU2+C7X+5Gs42JZzXoto7yOQ0A0=", + "requires": { + "@types/node": "*" + } + }, + "@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha1-yayFsqX9GENbjIXZ7LUObWyJP/g=", + "requires": { + "@types/node": "*" + } + }, + "@types/node": { + "version": "14.14.25", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.25.tgz", + "integrity": "sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ==" + }, + "@types/q": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==", + "dev": true + }, + "@types/qs": { + "version": "6.9.5", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz", + "integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==" + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "azure-pipelines-task-lib": { + "version": "3.0.6-preview.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.0.6-preview.1.tgz", + "integrity": "sha512-whe4Bk3MwZfcQhO7K3Y6YjPRRacvnM8qswKr+y8LFllEeRojK0QCRXNinw9feMUWwCL6bqc4rDoEJa+5TX95Pg==", + "requires": { + "minimatch": "3.0.4", + "mockery": "^1.7.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.4", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "big-integer": { + "version": "1.6.48", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", + "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" + }, + "binary": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", + "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", + "requires": { + "buffers": "~0.1.1", + "chainsaw": "~0.1.0" + } + }, + "bluebird": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", + "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "buffer-indexof-polyfill": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", + "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==" + }, + "buffers": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", + "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chainsaw": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", + "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", + "requires": { + "traverse": ">=0.3.0 <0.4" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "requires": { + "readable-stream": "^2.0.2" + } + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fstream": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw=" + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.5.tgz", + "integrity": "sha512-kBBSQbz2K0Nyn+31j/w36fUfxkBW9/gfwRWdUY1ULReH3iokVJgddZAFcD1D0xlgTmFxJCbUkUclAlc6/IDJkw==" + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "requires": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + } + }, + "http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "requires": { + "@types/node": "^10.0.3" + }, + "dependencies": { + "@types/node": { + "version": "10.17.51", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.51.tgz", + "integrity": "sha512-KANw+MkL626tq90l++hGelbl67irOJzGhUJk6a1Bt8QHOeh9tztJx+L0AqttraWKinmZn7Qi5lJZJzx45Gq0dg==" + } + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "requires": { + "has": "^1.0.3" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "listenercount": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", + "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=" + }, + "mime-db": { + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==" + }, + "mime-types": { + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", + "requires": { + "mime-db": "1.45.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "mockery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", + "integrity": "sha1-9O3g2HUMHJcnwnLqLGBiniyaHE8=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha1-juqz5U+laSD+Fro493+iGqzC104=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "promise": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", + "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", + "requires": { + "asap": "~2.0.6" + } + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + }, + "qs": { + "version": "6.9.6", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz", + "integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + }, + "resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "requires": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" + }, + "shelljs": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", + "integrity": "sha512-7gk3UZ9kOfPLIAbslLzyWeGiEqx9e3rxwZM0KE6EL8GlGwjym9Mrlx5/p33bWTu9YG6vcS4MBxYZDHYr5lr8BQ==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "requires": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + } + }, + "sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "requires": { + "get-port": "^3.1.0" + } + }, + "then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "requires": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" + } + } + }, + "traverse": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", + "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=" + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "typed-rest-client": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.1.tgz", + "integrity": "sha512-7JbJFBZZuu3G64u6ksklN1xtVGfqBKiR5MQoTe5oLTi68OyB6pRuuIQCllfK/BdGjQtZYp62rgUOnEYDz4e9Xg==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "1.8.3" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "typescript": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", + "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", + "dev": true + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" + }, + "unzipper": { + "version": "0.10.11", + "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.11.tgz", + "integrity": "sha512-+BrAq2oFqWod5IESRjL3S8baohbevGcVA+teAIOYWM3pDVdseogqbzhhvvmiyQrUNKFUnDMtELW3X8ykbyDCJw==", + "requires": { + "big-integer": "^1.6.17", + "binary": "~0.3.0", + "bluebird": "~3.4.1", + "buffer-indexof-polyfill": "~1.0.0", + "duplexer2": "~0.1.4", + "fstream": "^1.0.12", + "graceful-fs": "^4.2.2", + "listenercount": "~1.0.1", + "readable-stream": "~2.3.6", + "setimmediate": "~1.0.4" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + } + } +} diff --git a/src/Tasks/dependency-check-build-task-v2/package.json b/src/Tasks/dependency-check-build-task-v2/package.json index 0ed22e1..3e64782 100644 --- a/src/Tasks/dependency-check-build-task-v2/package.json +++ b/src/Tasks/dependency-check-build-task-v2/package.json @@ -4,8 +4,7 @@ "description": "", "main": "dependency-check-build-task.js", "scripts": { - "install-libs": "npm install", - "test": "echo \"Error: no test specified\" && exit 1" + "install-libs": "npm install" }, "author": "Dependency Check", "license": "Apache-2.0", From 1593b93c83213b005bee48c8a994fbd7c1258886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Tue, 9 Feb 2021 14:30:58 -0500 Subject: [PATCH 05/25] invoking... --- .../dependency-check-build-task.js | 28 +++++++++++++++++-- .../dependency-check-build-task.ts | 25 +++++++++++++++-- 2 files changed, 47 insertions(+), 6 deletions(-) diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js index 4a3d47b..313e5f7 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js @@ -14,6 +14,12 @@ const httpClient = require("typed-rest-client/HttpClient"); const unzipper = require("unzipper"); const client = new httpClient.HttpClient('DC_AGENT'); const releaseApi = 'https://api.github.com/repos/jeremylong/DependencyCheck/releases'; +// Install prerequisites : https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=azure-devops#prerequisites +// To test locally Run: +// cd ./Tasks/dependency-check-build-task-v2/ +// npm install +// tsc +// node dependency-check-build-task.js function run() { return __awaiter(this, void 0, void 0, function* () { console.log("Starting Dependency Check..."); @@ -102,7 +108,23 @@ function run() { } yield unzip(url); } - console.log(args); + // Get dependency check data dir path + let dataDirectory = `${localInstallPath}/data`; + // Pull cached data archive + if (dataMirror && tl.exist(dataDirectory)) { + console.log('Downloading Dependency Check data cache archive...'); + unzip(dataMirror, dataDirectory); + } + // Get dependency check script path + let depCheck = 'dependency-check.bat'; + if (tl.osType().match(/^Linux/)) + depCheck = 'dependency-check.sh'; + let depCheckPath = `${localInstallPath}/bin/${depCheck}`; + console.log(`Dependency Check installer set to ${depCheckPath}`); + tl.checkPath(depCheckPath, 'Dependency Check installer'); + console.log('Invoking Dependency Check...'); + console.log(`Path: ${depCheckPath}`); + console.log(`Arguments: ${args}`); } catch (err) { console.log(err.message); @@ -123,10 +145,10 @@ function getUrl(version) { return asset['browser_download_url']; }); } -function unzip(url) { +function unzip(url, directory) { return __awaiter(this, void 0, void 0, function* () { let response = yield client.get(url); - yield response.message.pipe(unzipper.Extract({ path: './' })); + yield response.message.pipe(unzipper.Extract({ path: directory !== null && directory !== void 0 ? directory : './' })); }); } run(); diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts index 960a331..95f6c07 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts @@ -2,6 +2,7 @@ import tl = require('azure-pipelines-task-lib/task'); import fs = require('fs'); import httpClient = require('typed-rest-client/HttpClient'); import unzipper = require('unzipper'); +import os = require('os'); const client = new httpClient.HttpClient('DC_AGENT'); const releaseApi = 'https://api.github.com/repos/jeremylong/DependencyCheck/releases'; @@ -117,7 +118,25 @@ async function run() { await unzip(url); } - console.log(args); + // Get dependency check data dir path + let dataDirectory = `${localInstallPath}/data`; + + // Pull cached data archive + if (dataMirror && tl.exist(dataDirectory)) { + console.log('Downloading Dependency Check data cache archive...'); + unzip(dataMirror, dataDirectory); + } + + // Get dependency check script path + let depCheck = 'dependency-check.bat'; + if (tl.osType().match(/^Linux/)) depCheck = 'dependency-check.sh'; + let depCheckPath = `${localInstallPath}/bin/${depCheck}`; + console.log(`Dependency Check installer set to ${depCheckPath}`); + + tl.checkPath(depCheckPath, 'Dependency Check installer'); + console.log('Invoking Dependency Check...'); + console.log(`Path: ${depCheckPath}`); + console.log(`Arguments: ${args}`); } catch (err) { console.log(err.message); @@ -140,9 +159,9 @@ async function getUrl(version) { return asset['browser_download_url']; } -async function unzip(url) { +async function unzip(url, directory?) { let response = await client.get(url); - await response.message.pipe(unzipper.Extract({ path: './' })); + await response.message.pipe(unzipper.Extract({ path: directory ?? './' })); } run(); \ No newline at end of file From ac29aca8430c5746dd181bc9175afccd9cd694b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Thu, 11 Feb 2021 11:02:20 -0500 Subject: [PATCH 06/25] run --- .../dependency-check-build-task.js | 94 +++++++---- .../dependency-check-build-task.ts | 109 ++++++++----- .../dependency-check/data/README.md | 3 - .../package-lock.json | 153 +++++++++--------- .../package.json | 4 +- 5 files changed, 210 insertions(+), 153 deletions(-) delete mode 100644 src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js index 313e5f7..c13d36c 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js @@ -11,7 +11,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", { value: true }); const tl = require("azure-pipelines-task-lib/task"); const httpClient = require("typed-rest-client/HttpClient"); -const unzipper = require("unzipper"); +const fs = require("fs"); +const url = require("url"); +const path = require("path"); +const DecompressZip = require("decompress-zip"); const client = new httpClient.HttpClient('DC_AGENT'); const releaseApi = 'https://api.github.com/repos/jeremylong/DependencyCheck/releases'; // Install prerequisites : https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=azure-devops#prerequisites @@ -50,9 +53,8 @@ function run() { localInstallPath = localInstallPath === null || localInstallPath === void 0 ? void 0 : localInstallPath.trim(); let testDir = tl.getVariable('Common.TestResultsDirectory'); // Set reports directory (if necessary) - if (!reportsDirectory) { - reportsDirectory = `${testDir}\\dependency-check`; - } + if (!reportsDirectory) + reportsDirectory = tl.resolve(testDir, 'dependency-check'); console.log(`Setting report directory to ${reportsDirectory}`); // Create report directory (if necessary) if (!tl.exist(reportsDirectory)) { @@ -62,41 +64,35 @@ function run() { // Default args let args = `--project "${projectName}" --scan "${scanPath}" --out "${reportsDirectory}"`; // Exclude switch - if (excludePath) { + if (excludePath) args += ` --exclude "${excludePath}"`; - } // Format types let outputTypes = format === null || format === void 0 ? void 0 : format.split(','); outputTypes === null || outputTypes === void 0 ? void 0 : outputTypes.forEach(function (outputType) { args += ` --format ${outputType}`; }); // Fail on CVSS switch - if (failOnCVSS) { + if (failOnCVSS) args += ` --failOnCVSS ${failOnCVSS}`; - } // Suppression switch - if (suppressionPath) { + if (suppressionPath) args += ` --suppression "${suppressionPath}"`; - } // Set enableExperimental option if requested - if (enableExperimental) { + if (enableExperimental) args += ' --enableExperimental'; - } // Set enableRetired option if requested - if (enableRetired) { + if (enableRetired) args += ' --enableRetired'; - } // Set log switch if requested - if (enableVerbose) { - args += ` --log "${reportsDirectory}\log"`; - } + if (enableVerbose) + args += ` --log "${tl.resolve(reportsDirectory, 'log')}"`; // additionalArguments - if (additionalArguments) { + if (additionalArguments) args += ` ${additionalArguments}`; - } // Set installation location if (!localInstallPath) { - localInstallPath = 'dependency-check'; + localInstallPath = tl.resolve('./dependency-check'); + tl.checkPath(localInstallPath, 'Dependency Check installer'); let url; if (customRepo) { console.log(`Downloading Dependency Check installer from ${customRepo}...`); @@ -104,27 +100,38 @@ function run() { } else { console.log(`Downloading Dependency Check ${dependencyCheckVersion} installer from GitHub..`); - url = yield getUrl(dependencyCheckVersion); + url = yield getZipUrl(dependencyCheckVersion); } - yield unzip(url); + tl.rmRF(localInstallPath); + yield unzipFromUrl(url, tl.resolve('./')); } // Get dependency check data dir path - let dataDirectory = `${localInstallPath}/data`; + let dataDirectory = tl.resolve(localInstallPath, 'data'); // Pull cached data archive if (dataMirror && tl.exist(dataDirectory)) { console.log('Downloading Dependency Check data cache archive...'); - unzip(dataMirror, dataDirectory); + yield unzipFromUrl(dataMirror, dataDirectory); } // Get dependency check script path let depCheck = 'dependency-check.bat'; if (tl.osType().match(/^Linux/)) depCheck = 'dependency-check.sh'; - let depCheckPath = `${localInstallPath}/bin/${depCheck}`; - console.log(`Dependency Check installer set to ${depCheckPath}`); - tl.checkPath(depCheckPath, 'Dependency Check installer'); + let depCheckPath = tl.resolve(localInstallPath, 'bin', depCheck); + console.log(`Dependency Check script set to ${depCheckPath}`); + tl.checkPath(depCheckPath, 'Dependency Check script'); + // Console output for the log file console.log('Invoking Dependency Check...'); console.log(`Path: ${depCheckPath}`); console.log(`Arguments: ${args}`); + // Set Java args + tl.setVariable('JAVA_OPTS', '-Xss8192k'); + // Version smoke test + yield tl.tool(depCheckPath).arg('--version').exec({ failOnStdErr: true }); + // Run the scan + let exitCode = yield tl.tool(depCheckPath).line(args).exec(); + console.log(`Dependency Check completed with exit code ${exitCode}.`); + console.log('Dependency check reports:'); + console.log(tl.find(reportsDirectory)); } catch (err) { console.log(err.message); @@ -134,7 +141,7 @@ function run() { console.log("Ending Dependency Check..."); }); } -function getUrl(version) { +function getZipUrl(version) { return __awaiter(this, void 0, void 0, function* () { let url = `${releaseApi}/tags/v${version}`; if (version == 'latest') @@ -145,10 +152,35 @@ function getUrl(version) { return asset['browser_download_url']; }); } -function unzip(url, directory) { +function unzipFromUrl(zipUrl, unzipLocation) { return __awaiter(this, void 0, void 0, function* () { - let response = yield client.get(url); - yield response.message.pipe(unzipper.Extract({ path: directory !== null && directory !== void 0 ? directory : './' })); + let fileName = path.basename(url.parse(zipUrl).pathname); + let zipLocation = tl.resolve(fileName); + let response = yield client.get(zipUrl); + yield new Promise(function (resolve, reject) { + let writer = fs.createWriteStream(zipLocation); + writer.on('error', err => reject(err)); + writer.on('finish', log => resolve()); + response.message.pipe(writer); + }); + yield unzipFromFile(zipLocation, unzipLocation); + tl.rmRF(zipLocation); + }); +} +function unzipFromFile(zipLocation, unzipLocation) { + return __awaiter(this, void 0, void 0, function* () { + yield new Promise(function (resolve, reject) { + tl.debug('Extracting ' + zipLocation + ' to ' + unzipLocation); + var unzipper = new DecompressZip(zipLocation); + unzipper.on('error', err => reject(err)); + unzipper.on('extract', log => { + tl.debug('Extracted ' + zipLocation + ' to ' + unzipLocation + ' successfully'); + return resolve(); + }); + unzipper.extract({ + path: unzipLocation + }); + }); }); } run(); diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts index 95f6c07..0ccceea 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts @@ -1,8 +1,9 @@ import tl = require('azure-pipelines-task-lib/task'); -import fs = require('fs'); import httpClient = require('typed-rest-client/HttpClient'); -import unzipper = require('unzipper'); -import os = require('os'); +import fs = require('fs'); +import url = require("url"); +import path = require("path"); +import DecompressZip = require('decompress-zip'); const client = new httpClient.HttpClient('DC_AGENT'); const releaseApi = 'https://api.github.com/repos/jeremylong/DependencyCheck/releases'; @@ -46,9 +47,8 @@ async function run() { let testDir = tl.getVariable('Common.TestResultsDirectory'); // Set reports directory (if necessary) - if (!reportsDirectory) { - reportsDirectory = `${testDir}\\dependency-check`; - } + if (!reportsDirectory) + reportsDirectory = tl.resolve(testDir, 'dependency-check'); console.log(`Setting report directory to ${reportsDirectory}`); // Create report directory (if necessary) @@ -61,9 +61,8 @@ async function run() { let args = `--project "${projectName}" --scan "${scanPath}" --out "${reportsDirectory}"`; // Exclude switch - if (excludePath) { + if (excludePath) args += ` --exclude "${excludePath}"`; - } // Format types let outputTypes = format?.split(','); @@ -72,38 +71,34 @@ async function run() { }); // Fail on CVSS switch - if (failOnCVSS) { + if (failOnCVSS) args += ` --failOnCVSS ${failOnCVSS}`; - } // Suppression switch - if (suppressionPath) { + if (suppressionPath) args += ` --suppression "${suppressionPath}"`; - } // Set enableExperimental option if requested - if (enableExperimental) { + if (enableExperimental) args += ' --enableExperimental'; - } // Set enableRetired option if requested - if (enableRetired) { + if (enableRetired) args += ' --enableRetired'; - } // Set log switch if requested - if (enableVerbose) { - args += ` --log "${reportsDirectory}\log"`; - } + if (enableVerbose) + args += ` --log "${tl.resolve(reportsDirectory, 'log')}"`; // additionalArguments - if (additionalArguments) { + if (additionalArguments) args += ` ${additionalArguments}`; - } // Set installation location if (!localInstallPath) { - localInstallPath = 'dependency-check'; + localInstallPath = tl.resolve('./dependency-check'); + + tl.checkPath(localInstallPath, 'Dependency Check installer'); let url; if (customRepo) { @@ -112,31 +107,46 @@ async function run() { } else { console.log(`Downloading Dependency Check ${dependencyCheckVersion} installer from GitHub..`); - url = await getUrl(dependencyCheckVersion); + url = await getZipUrl(dependencyCheckVersion); } - await unzip(url); + tl.rmRF(localInstallPath); + await unzipFromUrl(url, tl.resolve('./')); } // Get dependency check data dir path - let dataDirectory = `${localInstallPath}/data`; + let dataDirectory = tl.resolve(localInstallPath, 'data'); // Pull cached data archive if (dataMirror && tl.exist(dataDirectory)) { console.log('Downloading Dependency Check data cache archive...'); - unzip(dataMirror, dataDirectory); + await unzipFromUrl(dataMirror, dataDirectory); } // Get dependency check script path let depCheck = 'dependency-check.bat'; if (tl.osType().match(/^Linux/)) depCheck = 'dependency-check.sh'; - let depCheckPath = `${localInstallPath}/bin/${depCheck}`; - console.log(`Dependency Check installer set to ${depCheckPath}`); + let depCheckPath = tl.resolve(localInstallPath, 'bin', depCheck); + console.log(`Dependency Check script set to ${depCheckPath}`); + + tl.checkPath(depCheckPath, 'Dependency Check script'); - tl.checkPath(depCheckPath, 'Dependency Check installer'); + // Console output for the log file console.log('Invoking Dependency Check...'); console.log(`Path: ${depCheckPath}`); console.log(`Arguments: ${args}`); + + // Set Java args + tl.setVariable('JAVA_OPTS', '-Xss8192k'); + + // Version smoke test + await tl.tool(depCheckPath).arg('--version').exec({ failOnStdErr: true }); + + // Run the scan + let exitCode = await tl.tool(depCheckPath).line(args).exec(); + console.log(`Dependency Check completed with exit code ${exitCode}.`); + console.log('Dependency check reports:'); + console.log(tl.find(reportsDirectory)); } catch (err) { console.log(err.message); @@ -147,10 +157,9 @@ async function run() { console.log("Ending Dependency Check..."); } -async function getUrl(version) { +async function getZipUrl(version: string): Promise { let url = `${releaseApi}/tags/v${version}`; - if (version == 'latest') - url = `${releaseApi}/${version}`; + if (version == 'latest') url = `${releaseApi}/${version}`; let response = await client.get(url); let releaseInfo = JSON.parse(await response.readBody()); @@ -159,9 +168,37 @@ async function getUrl(version) { return asset['browser_download_url']; } -async function unzip(url, directory?) { - let response = await client.get(url); - await response.message.pipe(unzipper.Extract({ path: directory ?? './' })); +async function unzipFromUrl(zipUrl: string, unzipLocation: string): Promise { + let fileName = path.basename(url.parse(zipUrl).pathname); + let zipLocation = tl.resolve(fileName) + + let response = await client.get(zipUrl); + + await new Promise(function (resolve, reject) { + let writer = fs.createWriteStream(zipLocation); + writer.on('error', err => reject(err)); + writer.on('finish', log => resolve()); + response.message.pipe(writer); + }); + + await unzipFromFile(zipLocation, unzipLocation); + tl.rmRF(zipLocation); +} + +async function unzipFromFile(zipLocation: string, unzipLocation: string): Promise { + await new Promise(function (resolve, reject) { + tl.debug('Extracting ' + zipLocation + ' to ' + unzipLocation); + + var unzipper = new DecompressZip(zipLocation); + unzipper.on('error', err => reject(err)); + unzipper.on('extract', log => { + tl.debug('Extracted ' + zipLocation + ' to ' + unzipLocation + ' successfully'); + return resolve(); + }); + unzipper.extract({ + path: unzipLocation + }); + }); } -run(); \ No newline at end of file +run(); diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md b/src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md deleted file mode 100644 index 51ca064..0000000 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Vulnerability data directory - -Files cannot be shipped with the VSIX due to size limitations on the upload. Cached files will be pulled into this directory from a CDN prior to executing the scan to avoid downloading and processing from the ground up on every build. diff --git a/src/Tasks/dependency-check-build-task-v2/package-lock.json b/src/Tasks/dependency-check-build-task-v2/package-lock.json index 0c45b94..f5e7b90 100644 --- a/src/Tasks/dependency-check-build-task-v2/package-lock.json +++ b/src/Tasks/dependency-check-build-task-v2/package-lock.json @@ -36,6 +36,11 @@ "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.5.tgz", "integrity": "sha512-/JHkVHtx/REVG0VVToGRGH2+23hsYLHdyG+GrvoUGlGAd0ErauXDyvHtRI/7H7mzLm+tBCKA7pfcpkQ1lf58iQ==" }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -65,11 +70,6 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, - "big-integer": { - "version": "1.6.48", - "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.48.tgz", - "integrity": "sha512-j51egjPa7/i+RdiRuJbPdJ2FIUYYPhvYLjzoYbcMMm62ooO6F94fETG4MTs46zPAF9Brs04OajboA/qTGuz78w==" - }, "binary": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", @@ -79,11 +79,6 @@ "chainsaw": "~0.1.0" } }, - "bluebird": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", - "integrity": "sha1-9y12C+Cbf3bQjtj66Ysomo0F+rM=" - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -98,11 +93,6 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" }, - "buffer-indexof-polyfill": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/buffer-indexof-polyfill/-/buffer-indexof-polyfill-1.0.2.tgz", - "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==" - }, "buffers": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", @@ -150,19 +140,48 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "decompress-zip": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.3.tgz", + "integrity": "sha512-/fy1L4s+4jujqj3kNptWjilFw3E6De8U6XUFvqmh4npN3Vsypm3oT2V0bXcmbBWS+5j5tr4okYaFrOmyZkszEg==", + "requires": { + "binary": "^0.3.0", + "graceful-fs": "^4.1.3", + "mkpath": "^0.1.0", + "nopt": "^3.0.1", + "q": "^1.1.2", + "readable-stream": "^1.1.8", + "touch": "0.0.3" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, - "duplexer2": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", - "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", - "requires": { - "readable-stream": "^2.0.2" - } - }, "form-data": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", @@ -178,17 +197,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, - "fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -283,11 +291,6 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "listenercount": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", - "integrity": "sha1-hMinKrWcRyUyFIDJdeZQg0LnCTc=" - }, "mime-db": { "version": "1.45.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", @@ -309,24 +312,24 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } + "mkpath": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/mkpath/-/mkpath-0.1.0.tgz", + "integrity": "sha1-dVSm+Nhxg0zJe1RisSLEwSTW3pE=" }, "mockery": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", "integrity": "sha1-9O3g2HUMHJcnwnLqLGBiniyaHE8=" }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "requires": { + "abbrev": "1" + } + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -404,14 +407,6 @@ "path-parse": "^1.0.6" } }, - "rimraf": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", - "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", - "requires": { - "glob": "^7.1.3" - } - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -422,11 +417,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, "shelljs": { "version": "0.8.4", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.4.tgz", @@ -488,6 +478,24 @@ } } }, + "touch": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz", + "integrity": "sha1-Ua7z1ElXHU8oel2Hyci0kYGg2x0=", + "requires": { + "nopt": "~1.0.10" + }, + "dependencies": { + "nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", + "requires": { + "abbrev": "1" + } + } + } + }, "traverse": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", @@ -524,23 +532,6 @@ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=" }, - "unzipper": { - "version": "0.10.11", - "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.10.11.tgz", - "integrity": "sha512-+BrAq2oFqWod5IESRjL3S8baohbevGcVA+teAIOYWM3pDVdseogqbzhhvvmiyQrUNKFUnDMtELW3X8ykbyDCJw==", - "requires": { - "big-integer": "^1.6.17", - "binary": "~0.3.0", - "bluebird": "~3.4.1", - "buffer-indexof-polyfill": "~1.0.0", - "duplexer2": "~0.1.4", - "fstream": "^1.0.12", - "graceful-fs": "^4.2.2", - "listenercount": "~1.0.1", - "readable-stream": "~2.3.6", - "setimmediate": "~1.0.4" - } - }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/src/Tasks/dependency-check-build-task-v2/package.json b/src/Tasks/dependency-check-build-task-v2/package.json index 3e64782..a0d26e9 100644 --- a/src/Tasks/dependency-check-build-task-v2/package.json +++ b/src/Tasks/dependency-check-build-task-v2/package.json @@ -10,8 +10,8 @@ "license": "Apache-2.0", "dependencies": { "azure-pipelines-task-lib": "^3.0.6-preview.1", - "typed-rest-client": "^1.8.1", - "unzipper": "^0.10.11" + "decompress-zip": "^0.3.3", + "typed-rest-client": "^1.8.1" }, "devDependencies": { "@types/node": "^14.14.25", From 8115a46763145d5e23f90ad0dbcbc84c3eb84569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Thu, 11 Feb 2021 11:05:40 -0500 Subject: [PATCH 07/25] git ignore --- .gitignore | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 4a783a1..185a0c2 100644 --- a/.gitignore +++ b/.gitignore @@ -32,8 +32,7 @@ node_modules .taskkey # Dep check data directory files -src/Tasks/dependency-check-build-task*/dependency-check/* -src/Tasks/dependency-check-build-task*/dependency-check/data/* -!src/Tasks/dependency-check-build-task*/dependency-check/data -!src/Tasks/dependency-check-build-task*/dependency-check/data/README.md -src/Tasks/dependency-check-build-task*/dependency-check-*.zip +src/Tasks/dependency-check-build-task/dependency-check/data/*.json +src/Tasks/dependency-check-build-task/dependency-check/data/*.db +src/Tasks/dependency-check-build-task/dependency-check-*.zip +src/Tasks/dependency-check-build-task-v2/dependency-check From 0280122f180e490deb6240d0c5665d226565943b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Thu, 11 Feb 2021 11:22:35 -0500 Subject: [PATCH 08/25] zipurl --- .../dependency-check-build-task.js | 8 ++++---- .../dependency-check-build-task.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js index c13d36c..a1a6864 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js @@ -93,17 +93,17 @@ function run() { if (!localInstallPath) { localInstallPath = tl.resolve('./dependency-check'); tl.checkPath(localInstallPath, 'Dependency Check installer'); - let url; + let zipUrl; if (customRepo) { console.log(`Downloading Dependency Check installer from ${customRepo}...`); - url = customRepo; + zipUrl = customRepo; } else { console.log(`Downloading Dependency Check ${dependencyCheckVersion} installer from GitHub..`); - url = yield getZipUrl(dependencyCheckVersion); + zipUrl = yield getZipUrl(dependencyCheckVersion); } tl.rmRF(localInstallPath); - yield unzipFromUrl(url, tl.resolve('./')); + yield unzipFromUrl(zipUrl, tl.resolve('./')); } // Get dependency check data dir path let dataDirectory = tl.resolve(localInstallPath, 'data'); diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts index 0ccceea..1583868 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts @@ -100,18 +100,18 @@ async function run() { tl.checkPath(localInstallPath, 'Dependency Check installer'); - let url; + let zipUrl; if (customRepo) { console.log(`Downloading Dependency Check installer from ${customRepo}...`); - url = customRepo; + zipUrl = customRepo; } else { console.log(`Downloading Dependency Check ${dependencyCheckVersion} installer from GitHub..`); - url = await getZipUrl(dependencyCheckVersion); + zipUrl = await getZipUrl(dependencyCheckVersion); } tl.rmRF(localInstallPath); - await unzipFromUrl(url, tl.resolve('./')); + await unzipFromUrl(zipUrl, tl.resolve('./')); } // Get dependency check data dir path From 1007ff87cfe0a0d03b0c0e8fac7449bcae206584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Thu, 11 Feb 2021 12:08:06 -0500 Subject: [PATCH 09/25] clean local install path directory --- .gitignore | 8 ++++---- .../dependency-check-build-task.js | 6 +++++- .../dependency-check-build-task.ts | 7 ++++++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 185a0c2..dd755b2 100644 --- a/.gitignore +++ b/.gitignore @@ -32,7 +32,7 @@ node_modules .taskkey # Dep check data directory files -src/Tasks/dependency-check-build-task/dependency-check/data/*.json -src/Tasks/dependency-check-build-task/dependency-check/data/*.db -src/Tasks/dependency-check-build-task/dependency-check-*.zip -src/Tasks/dependency-check-build-task-v2/dependency-check +src/Tasks/dependency-check-build-task*/dependency-check/* +src/Tasks/dependency-check-build-task*/dependency-check/data/* +!src/Tasks/dependency-check-build-task*/dependency-check/data +!src/Tasks/dependency-check-build-task*/dependency-check/data/README.md \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js index a1a6864..6af870e 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js @@ -102,7 +102,7 @@ function run() { console.log(`Downloading Dependency Check ${dependencyCheckVersion} installer from GitHub..`); zipUrl = yield getZipUrl(dependencyCheckVersion); } - tl.rmRF(localInstallPath); + cleanLocalInstallPath(localInstallPath); yield unzipFromUrl(zipUrl, tl.resolve('./')); } // Get dependency check data dir path @@ -141,6 +141,10 @@ function run() { console.log("Ending Dependency Check..."); }); } +function cleanLocalInstallPath(localInstallPath) { + let files = tl.findMatch(localInstallPath, ['**', '!data', '!data/**']); + files.forEach(file => tl.rmRF(file)); +} function getZipUrl(version) { return __awaiter(this, void 0, void 0, function* () { let url = `${releaseApi}/tags/v${version}`; diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts index 1583868..9b5d202 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts @@ -110,7 +110,7 @@ async function run() { zipUrl = await getZipUrl(dependencyCheckVersion); } - tl.rmRF(localInstallPath); + cleanLocalInstallPath(localInstallPath); await unzipFromUrl(zipUrl, tl.resolve('./')); } @@ -157,6 +157,11 @@ async function run() { console.log("Ending Dependency Check..."); } +function cleanLocalInstallPath(localInstallPath: string) { + let files = tl.findMatch(localInstallPath, ['**', '!data', '!data/**']); + files.forEach(file => tl.rmRF(file)); +} + async function getZipUrl(version: string): Promise { let url = `${releaseApi}/tags/v${version}`; if (version == 'latest') url = `${releaseApi}/${version}`; From 1fb9355392fb88cf73ac048d05d60bd875d9ac26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Thu, 11 Feb 2021 13:26:50 -0500 Subject: [PATCH 10/25] process exit code --- .../dependency-check-build-task.js | 23 +++++++++++++--- .../dependency-check-build-task.ts | 26 ++++++++++++++++--- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js index 6af870e..901fd72 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js @@ -32,7 +32,7 @@ function run() { let scanPath = tl.getPathInput('scanPath', true, true); let excludePath = tl.getPathInput('excludePath'); let format = tl.getInput('format', true); - let failOnCVSS = tl.getBoolInput('failOnCVSS'); + let failOnCVSS = tl.getInput('failOnCVSS'); let suppressionPath = tl.getPathInput('suppressionPath'); let reportsDirectory = tl.getPathInput('reportsDirectory'); let enableExperimental = tl.getBoolInput('enableExperimental', true); @@ -86,7 +86,7 @@ function run() { // Set log switch if requested if (enableVerbose) args += ` --log "${tl.resolve(reportsDirectory, 'log')}"`; - // additionalArguments + // Set additionalArguments if (additionalArguments) args += ` ${additionalArguments}`; // Set installation location @@ -130,8 +130,25 @@ function run() { // Run the scan let exitCode = yield tl.tool(depCheckPath).line(args).exec(); console.log(`Dependency Check completed with exit code ${exitCode}.`); - console.log('Dependency check reports:'); + console.log('Dependency Check reports:'); console.log(tl.find(reportsDirectory)); + // Process based on exit code + let failed = exitCode != 0; + let isViolation = exitCode == 1; + // Process scan artifacts is required + let processArtifacts = !failed || isViolation; + if (processArtifacts) { + console.log("Attachments:"); + let reports = tl.find(reportsDirectory); + console.log(reports); + } + if (failed) { + let message = "Dependency Check exited with an error code."; + if (isViolation) + message = "CVSS threshold violation."; + tl.error(message); + tl.setResult(tl.TaskResult.Failed, message); + } } catch (err) { console.log(err.message); diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts index 9b5d202..0e344a7 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts @@ -23,7 +23,7 @@ async function run() { let scanPath: string | undefined = tl.getPathInput('scanPath', true, true); let excludePath: string | undefined = tl.getPathInput('excludePath'); let format: string | undefined = tl.getInput('format', true); - let failOnCVSS: boolean | undefined = tl.getBoolInput('failOnCVSS'); + let failOnCVSS: string | undefined = tl.getInput('failOnCVSS'); let suppressionPath: string | undefined = tl.getPathInput('suppressionPath'); let reportsDirectory: string | undefined = tl.getPathInput('reportsDirectory'); let enableExperimental: boolean | undefined = tl.getBoolInput('enableExperimental', true); @@ -90,7 +90,7 @@ async function run() { if (enableVerbose) args += ` --log "${tl.resolve(reportsDirectory, 'log')}"`; - // additionalArguments + // Set additionalArguments if (additionalArguments) args += ` ${additionalArguments}`; @@ -145,8 +145,28 @@ async function run() { // Run the scan let exitCode = await tl.tool(depCheckPath).line(args).exec(); console.log(`Dependency Check completed with exit code ${exitCode}.`); - console.log('Dependency check reports:'); + console.log('Dependency Check reports:'); console.log(tl.find(reportsDirectory)); + + // Process based on exit code + let failed = exitCode != 0; + let isViolation = exitCode == 1; + + // Process scan artifacts is required + let processArtifacts = !failed || isViolation; + if (processArtifacts) { + console.log("Attachments:"); + let reports = tl.find(reportsDirectory); + console.log(reports); + } + + if (failed) { + let message = "Dependency Check exited with an error code."; + if (isViolation) message = "CVSS threshold violation."; + + tl.error(message); + tl.setResult(tl.TaskResult.Failed, message); + } } catch (err) { console.log(err.message); From d14389ec4eea825245947ce230a94618e353a04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Thu, 11 Feb 2021 14:30:26 -0500 Subject: [PATCH 11/25] add attachements --- .../dependency-check-build-task.js | 31 ++++++++++++----- .../dependency-check-build-task.ts | 33 ++++++++++++++----- 2 files changed, 46 insertions(+), 18 deletions(-) diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js index 901fd72..f054394 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js @@ -51,11 +51,13 @@ function run() { reportsDirectory = reportsDirectory === null || reportsDirectory === void 0 ? void 0 : reportsDirectory.trim(); additionalArguments = additionalArguments === null || additionalArguments === void 0 ? void 0 : additionalArguments.trim(); localInstallPath = localInstallPath === null || localInstallPath === void 0 ? void 0 : localInstallPath.trim(); - let testDir = tl.getVariable('Common.TestResultsDirectory'); + let testDirectory = tl.getVariable('Common.TestResultsDirectory'); // Set reports directory (if necessary) if (!reportsDirectory) - reportsDirectory = tl.resolve(testDir, 'dependency-check'); + reportsDirectory = tl.resolve(testDirectory, 'dependency-check'); console.log(`Setting report directory to ${reportsDirectory}`); + // Set logs file + let logFile = tl.resolve(reportsDirectory, 'log'); // Create report directory (if necessary) if (!tl.exist(reportsDirectory)) { console.log(`Creating report directory at ${reportsDirectory}`); @@ -68,7 +70,7 @@ function run() { args += ` --exclude "${excludePath}"`; // Format types let outputTypes = format === null || format === void 0 ? void 0 : format.split(','); - outputTypes === null || outputTypes === void 0 ? void 0 : outputTypes.forEach(function (outputType) { + outputTypes === null || outputTypes === void 0 ? void 0 : outputTypes.forEach(outputType => { args += ` --format ${outputType}`; }); // Fail on CVSS switch @@ -85,7 +87,7 @@ function run() { args += ' --enableRetired'; // Set log switch if requested if (enableVerbose) - args += ` --log "${tl.resolve(reportsDirectory, 'log')}"`; + args += ` --log "${logFile}"`; // Set additionalArguments if (additionalArguments) args += ` ${additionalArguments}`; @@ -126,9 +128,9 @@ function run() { // Set Java args tl.setVariable('JAVA_OPTS', '-Xss8192k'); // Version smoke test - yield tl.tool(depCheckPath).arg('--version').exec({ failOnStdErr: true }); + yield tl.tool(depCheckPath).arg('--version').exec(); // Run the scan - let exitCode = yield tl.tool(depCheckPath).line(args).exec(); + let exitCode = yield tl.tool(depCheckPath).line(args).exec({ failOnStdErr: false, ignoreReturnCode: false }); console.log(`Dependency Check completed with exit code ${exitCode}.`); console.log('Dependency Check reports:'); console.log(tl.find(reportsDirectory)); @@ -138,9 +140,20 @@ function run() { // Process scan artifacts is required let processArtifacts = !failed || isViolation; if (processArtifacts) { - console.log("Attachments:"); - let reports = tl.find(reportsDirectory); - console.log(reports); + console.debug("Attachments:"); + let reports = tl.findMatch(reportsDirectory, '**/*.*'); + reports.forEach(filePath => { + let fileName = path.basename(filePath).replace('.', '%2E'); + let fileExt = path.extname(filePath); + console.debug(`Attachment name: ${fileName}`); + console.debug(`Attachment path: ${filePath}`); + console.debug(`Attachment type: ${fileExt}`); + console.log(`##vso[task.addattachment type=dependencycheck-artifact;name=${fileName};]${filePath}`); + console.log(`##vso[artifact.upload containerfolder=dependency-check;artifactname=Dependency Check;]${filePath}`); + }); + // Upload logs + if (enableVerbose) + console.log(`##vso[build.uploadlog]${logFile}`); } if (failed) { let message = "Dependency Check exited with an error code."; diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts index 0e344a7..2caec4a 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts @@ -44,13 +44,16 @@ async function run() { additionalArguments = additionalArguments?.trim(); localInstallPath = localInstallPath?.trim(); - let testDir = tl.getVariable('Common.TestResultsDirectory'); + let testDirectory = tl.getVariable('Common.TestResultsDirectory'); // Set reports directory (if necessary) if (!reportsDirectory) - reportsDirectory = tl.resolve(testDir, 'dependency-check'); + reportsDirectory = tl.resolve(testDirectory, 'dependency-check'); console.log(`Setting report directory to ${reportsDirectory}`); + // Set logs file + let logFile = tl.resolve(reportsDirectory, 'log'); + // Create report directory (if necessary) if (!tl.exist(reportsDirectory!)) { console.log(`Creating report directory at ${reportsDirectory}`); @@ -66,7 +69,7 @@ async function run() { // Format types let outputTypes = format?.split(','); - outputTypes?.forEach(function (outputType) { + outputTypes?.forEach(outputType => { args += ` --format ${outputType}`; }); @@ -88,7 +91,7 @@ async function run() { // Set log switch if requested if (enableVerbose) - args += ` --log "${tl.resolve(reportsDirectory, 'log')}"`; + args += ` --log "${logFile}"`; // Set additionalArguments if (additionalArguments) @@ -140,10 +143,10 @@ async function run() { tl.setVariable('JAVA_OPTS', '-Xss8192k'); // Version smoke test - await tl.tool(depCheckPath).arg('--version').exec({ failOnStdErr: true }); + await tl.tool(depCheckPath).arg('--version').exec(); // Run the scan - let exitCode = await tl.tool(depCheckPath).line(args).exec(); + let exitCode = await tl.tool(depCheckPath).line(args).exec({ failOnStdErr: false, ignoreReturnCode: false }); console.log(`Dependency Check completed with exit code ${exitCode}.`); console.log('Dependency Check reports:'); console.log(tl.find(reportsDirectory)); @@ -155,9 +158,21 @@ async function run() { // Process scan artifacts is required let processArtifacts = !failed || isViolation; if (processArtifacts) { - console.log("Attachments:"); - let reports = tl.find(reportsDirectory); - console.log(reports); + console.debug("Attachments:"); + let reports = tl.findMatch(reportsDirectory, '**/*.*'); + reports.forEach(filePath => { + let fileName = path.basename(filePath).replace('.', '%2E'); + let fileExt = path.extname(filePath); + console.debug(`Attachment name: ${fileName}`); + console.debug(`Attachment path: ${filePath}`); + console.debug(`Attachment type: ${fileExt}`); + console.log(`##vso[task.addattachment type=dependencycheck-artifact;name=${fileName};]${filePath}`); + console.log(`##vso[artifact.upload containerfolder=dependency-check;artifactname=Dependency Check;]${filePath}`); + }) + + // Upload logs + if (enableVerbose) + console.log(`##vso[build.uploadlog]${logFile}`); } if (failed) { From 2c5d152eb48d6cfda95146667f1d4004168a287e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Thu, 11 Feb 2021 14:50:10 -0500 Subject: [PATCH 12/25] missing readme --- .../dependency-check/data/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md b/src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md new file mode 100644 index 0000000..51ca064 --- /dev/null +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md @@ -0,0 +1,3 @@ +# Vulnerability data directory + +Files cannot be shipped with the VSIX due to size limitations on the upload. Cached files will be pulled into this directory from a CDN prior to executing the scan to avoid downloading and processing from the ground up on every build. From f42d995043c1ceab5b241b982b3c2e7a15c3b729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Thu, 11 Feb 2021 15:11:28 -0500 Subject: [PATCH 13/25] exec node --- src/Tasks/dependency-check-build-task-v2/task.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tasks/dependency-check-build-task-v2/task.json b/src/Tasks/dependency-check-build-task-v2/task.json index ebee2de..31f73db 100644 --- a/src/Tasks/dependency-check-build-task-v2/task.json +++ b/src/Tasks/dependency-check-build-task-v2/task.json @@ -150,7 +150,7 @@ ], "instanceNameFormat": "Dependency Check", "execution": { - "Node10": { + "Node": { "target": "$(currentDirectory)\\dependency-check-build-task.js", "argumentFormat": "", "workingDirectory": "$(currentDirectory)" From f33844b5ef6d72201a0c95d47722b193a91aa805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Fri, 12 Feb 2021 08:41:40 -0500 Subject: [PATCH 14/25] fix default path --- .../dependency-check-build-task.js | 19 ++++++++++--------- .../dependency-check-build-task.ts | 19 ++++++++++--------- .../dependency-check-build-task-v2/task.json | 4 ++-- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js index f054394..ae470f8 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js @@ -51,9 +51,10 @@ function run() { reportsDirectory = reportsDirectory === null || reportsDirectory === void 0 ? void 0 : reportsDirectory.trim(); additionalArguments = additionalArguments === null || additionalArguments === void 0 ? void 0 : additionalArguments.trim(); localInstallPath = localInstallPath === null || localInstallPath === void 0 ? void 0 : localInstallPath.trim(); + let sourcesDirectory = tl.getVariable('Build.SourcesDirectory'); let testDirectory = tl.getVariable('Common.TestResultsDirectory'); // Set reports directory (if necessary) - if (!reportsDirectory) + if (reportsDirectory == sourcesDirectory) reportsDirectory = tl.resolve(testDirectory, 'dependency-check'); console.log(`Setting report directory to ${reportsDirectory}`); // Set logs file @@ -66,7 +67,7 @@ function run() { // Default args let args = `--project "${projectName}" --scan "${scanPath}" --out "${reportsDirectory}"`; // Exclude switch - if (excludePath) + if (excludePath != sourcesDirectory) args += ` --exclude "${excludePath}"`; // Format types let outputTypes = format === null || format === void 0 ? void 0 : format.split(','); @@ -77,7 +78,7 @@ function run() { if (failOnCVSS) args += ` --failOnCVSS ${failOnCVSS}`; // Suppression switch - if (suppressionPath) + if (suppressionPath != sourcesDirectory) args += ` --suppression "${suppressionPath}"`; // Set enableExperimental option if requested if (enableExperimental) @@ -92,7 +93,7 @@ function run() { if (additionalArguments) args += ` ${additionalArguments}`; // Set installation location - if (!localInstallPath) { + if (localInstallPath == sourcesDirectory) { localInstallPath = tl.resolve('./dependency-check'); tl.checkPath(localInstallPath, 'Dependency Check installer'); let zipUrl; @@ -133,21 +134,21 @@ function run() { let exitCode = yield tl.tool(depCheckPath).line(args).exec({ failOnStdErr: false, ignoreReturnCode: false }); console.log(`Dependency Check completed with exit code ${exitCode}.`); console.log('Dependency Check reports:'); - console.log(tl.find(reportsDirectory)); + console.log(tl.findMatch(reportsDirectory, '**/*.*')); // Process based on exit code let failed = exitCode != 0; let isViolation = exitCode == 1; // Process scan artifacts is required let processArtifacts = !failed || isViolation; if (processArtifacts) { - console.debug("Attachments:"); + console.log('##[debug]Attachments:'); let reports = tl.findMatch(reportsDirectory, '**/*.*'); reports.forEach(filePath => { let fileName = path.basename(filePath).replace('.', '%2E'); let fileExt = path.extname(filePath); - console.debug(`Attachment name: ${fileName}`); - console.debug(`Attachment path: ${filePath}`); - console.debug(`Attachment type: ${fileExt}`); + console.log(`##[debug]Attachment name: ${fileName}`); + console.log(`##[debug]Attachment path: ${filePath}`); + console.log(`##[debug]Attachment type: ${fileExt}`); console.log(`##vso[task.addattachment type=dependencycheck-artifact;name=${fileName};]${filePath}`); console.log(`##vso[artifact.upload containerfolder=dependency-check;artifactname=Dependency Check;]${filePath}`); }); diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts index 2caec4a..a5ccece 100644 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts +++ b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts @@ -44,10 +44,11 @@ async function run() { additionalArguments = additionalArguments?.trim(); localInstallPath = localInstallPath?.trim(); + let sourcesDirectory = tl.getVariable('Build.SourcesDirectory'); let testDirectory = tl.getVariable('Common.TestResultsDirectory'); // Set reports directory (if necessary) - if (!reportsDirectory) + if (reportsDirectory == sourcesDirectory) reportsDirectory = tl.resolve(testDirectory, 'dependency-check'); console.log(`Setting report directory to ${reportsDirectory}`); @@ -64,7 +65,7 @@ async function run() { let args = `--project "${projectName}" --scan "${scanPath}" --out "${reportsDirectory}"`; // Exclude switch - if (excludePath) + if (excludePath != sourcesDirectory) args += ` --exclude "${excludePath}"`; // Format types @@ -78,7 +79,7 @@ async function run() { args += ` --failOnCVSS ${failOnCVSS}`; // Suppression switch - if (suppressionPath) + if (suppressionPath != sourcesDirectory) args += ` --suppression "${suppressionPath}"`; // Set enableExperimental option if requested @@ -98,7 +99,7 @@ async function run() { args += ` ${additionalArguments}`; // Set installation location - if (!localInstallPath) { + if (localInstallPath == sourcesDirectory) { localInstallPath = tl.resolve('./dependency-check'); tl.checkPath(localInstallPath, 'Dependency Check installer'); @@ -149,7 +150,7 @@ async function run() { let exitCode = await tl.tool(depCheckPath).line(args).exec({ failOnStdErr: false, ignoreReturnCode: false }); console.log(`Dependency Check completed with exit code ${exitCode}.`); console.log('Dependency Check reports:'); - console.log(tl.find(reportsDirectory)); + console.log(tl.findMatch(reportsDirectory, '**/*.*')); // Process based on exit code let failed = exitCode != 0; @@ -158,14 +159,14 @@ async function run() { // Process scan artifacts is required let processArtifacts = !failed || isViolation; if (processArtifacts) { - console.debug("Attachments:"); + console.log('##[debug]Attachments:'); let reports = tl.findMatch(reportsDirectory, '**/*.*'); reports.forEach(filePath => { let fileName = path.basename(filePath).replace('.', '%2E'); let fileExt = path.extname(filePath); - console.debug(`Attachment name: ${fileName}`); - console.debug(`Attachment path: ${filePath}`); - console.debug(`Attachment type: ${fileExt}`); + console.log(`##[debug]Attachment name: ${fileName}`); + console.log(`##[debug]Attachment path: ${filePath}`); + console.log(`##[debug]Attachment type: ${fileExt}`); console.log(`##vso[task.addattachment type=dependencycheck-artifact;name=${fileName};]${filePath}`); console.log(`##vso[artifact.upload containerfolder=dependency-check;artifactname=Dependency Check;]${filePath}`); }) diff --git a/src/Tasks/dependency-check-build-task-v2/task.json b/src/Tasks/dependency-check-build-task-v2/task.json index 31f73db..b0d88c6 100644 --- a/src/Tasks/dependency-check-build-task-v2/task.json +++ b/src/Tasks/dependency-check-build-task-v2/task.json @@ -136,7 +136,7 @@ "type": "string", "label": "Installer Version", "helpMarkDown": "By default, the build task downloads the installer from the Dependency Check GitHub releases. Setting this field will change the Dependency Check version downloaded onto the build agent.", - "defaultValue": "6.0.2", + "defaultValue": "latest", "required": false }, { @@ -151,7 +151,7 @@ "instanceNameFormat": "Dependency Check", "execution": { "Node": { - "target": "$(currentDirectory)\\dependency-check-build-task.js", + "target": "$(currentDirectory)/dependency-check-build-task.js", "argumentFormat": "", "workingDirectory": "$(currentDirectory)" } From 2f32def88a9fe358e417cbf85cc3babdb6dac795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Fri, 12 Feb 2021 08:46:18 -0500 Subject: [PATCH 15/25] remove compiled source --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index dd755b2..07a0271 100644 --- a/.gitignore +++ b/.gitignore @@ -34,5 +34,6 @@ node_modules # Dep check data directory files src/Tasks/dependency-check-build-task*/dependency-check/* src/Tasks/dependency-check-build-task*/dependency-check/data/* +src/Tasks/dependency-check-build-task*/dependency-check-build-task.js !src/Tasks/dependency-check-build-task*/dependency-check/data !src/Tasks/dependency-check-build-task*/dependency-check/data/README.md \ No newline at end of file From 92fdcca72f243e7e6e752813a9c0dd89ee0d8481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Fri, 12 Feb 2021 09:39:33 -0500 Subject: [PATCH 16/25] remove js file from source --- .../dependency-check-build-task.js | 221 ------------------ 1 file changed, 221 deletions(-) delete mode 100644 src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js b/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js deleted file mode 100644 index ae470f8..0000000 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.js +++ /dev/null @@ -1,221 +0,0 @@ -"use strict"; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -const tl = require("azure-pipelines-task-lib/task"); -const httpClient = require("typed-rest-client/HttpClient"); -const fs = require("fs"); -const url = require("url"); -const path = require("path"); -const DecompressZip = require("decompress-zip"); -const client = new httpClient.HttpClient('DC_AGENT'); -const releaseApi = 'https://api.github.com/repos/jeremylong/DependencyCheck/releases'; -// Install prerequisites : https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=azure-devops#prerequisites -// To test locally Run: -// cd ./Tasks/dependency-check-build-task-v2/ -// npm install -// tsc -// node dependency-check-build-task.js -function run() { - return __awaiter(this, void 0, void 0, function* () { - console.log("Starting Dependency Check..."); - try { - // Get inputs from build task. - let projectName = tl.getInput('projectName', true); - let scanPath = tl.getPathInput('scanPath', true, true); - let excludePath = tl.getPathInput('excludePath'); - let format = tl.getInput('format', true); - let failOnCVSS = tl.getInput('failOnCVSS'); - let suppressionPath = tl.getPathInput('suppressionPath'); - let reportsDirectory = tl.getPathInput('reportsDirectory'); - let enableExperimental = tl.getBoolInput('enableExperimental', true); - let enableRetired = tl.getBoolInput('enableRetired', true); - let enableVerbose = tl.getBoolInput('enableVerbose', true); - let localInstallPath = tl.getPathInput('localInstallPath'); - let dependencyCheckVersion = tl.getInput('dependencyCheckVersion') || 'latest'; - let dataMirror = tl.getInput('dataMirror'); - let customRepo = tl.getInput('customRepo'); - let additionalArguments = tl.getInput('additionalArguments'); - // Trim the strings - projectName = projectName === null || projectName === void 0 ? void 0 : projectName.trim(); - scanPath = scanPath === null || scanPath === void 0 ? void 0 : scanPath.trim(); - excludePath = excludePath === null || excludePath === void 0 ? void 0 : excludePath.trim(); - suppressionPath = suppressionPath === null || suppressionPath === void 0 ? void 0 : suppressionPath.trim(); - reportsDirectory = reportsDirectory === null || reportsDirectory === void 0 ? void 0 : reportsDirectory.trim(); - additionalArguments = additionalArguments === null || additionalArguments === void 0 ? void 0 : additionalArguments.trim(); - localInstallPath = localInstallPath === null || localInstallPath === void 0 ? void 0 : localInstallPath.trim(); - let sourcesDirectory = tl.getVariable('Build.SourcesDirectory'); - let testDirectory = tl.getVariable('Common.TestResultsDirectory'); - // Set reports directory (if necessary) - if (reportsDirectory == sourcesDirectory) - reportsDirectory = tl.resolve(testDirectory, 'dependency-check'); - console.log(`Setting report directory to ${reportsDirectory}`); - // Set logs file - let logFile = tl.resolve(reportsDirectory, 'log'); - // Create report directory (if necessary) - if (!tl.exist(reportsDirectory)) { - console.log(`Creating report directory at ${reportsDirectory}`); - tl.mkdirP(reportsDirectory); - } - // Default args - let args = `--project "${projectName}" --scan "${scanPath}" --out "${reportsDirectory}"`; - // Exclude switch - if (excludePath != sourcesDirectory) - args += ` --exclude "${excludePath}"`; - // Format types - let outputTypes = format === null || format === void 0 ? void 0 : format.split(','); - outputTypes === null || outputTypes === void 0 ? void 0 : outputTypes.forEach(outputType => { - args += ` --format ${outputType}`; - }); - // Fail on CVSS switch - if (failOnCVSS) - args += ` --failOnCVSS ${failOnCVSS}`; - // Suppression switch - if (suppressionPath != sourcesDirectory) - args += ` --suppression "${suppressionPath}"`; - // Set enableExperimental option if requested - if (enableExperimental) - args += ' --enableExperimental'; - // Set enableRetired option if requested - if (enableRetired) - args += ' --enableRetired'; - // Set log switch if requested - if (enableVerbose) - args += ` --log "${logFile}"`; - // Set additionalArguments - if (additionalArguments) - args += ` ${additionalArguments}`; - // Set installation location - if (localInstallPath == sourcesDirectory) { - localInstallPath = tl.resolve('./dependency-check'); - tl.checkPath(localInstallPath, 'Dependency Check installer'); - let zipUrl; - if (customRepo) { - console.log(`Downloading Dependency Check installer from ${customRepo}...`); - zipUrl = customRepo; - } - else { - console.log(`Downloading Dependency Check ${dependencyCheckVersion} installer from GitHub..`); - zipUrl = yield getZipUrl(dependencyCheckVersion); - } - cleanLocalInstallPath(localInstallPath); - yield unzipFromUrl(zipUrl, tl.resolve('./')); - } - // Get dependency check data dir path - let dataDirectory = tl.resolve(localInstallPath, 'data'); - // Pull cached data archive - if (dataMirror && tl.exist(dataDirectory)) { - console.log('Downloading Dependency Check data cache archive...'); - yield unzipFromUrl(dataMirror, dataDirectory); - } - // Get dependency check script path - let depCheck = 'dependency-check.bat'; - if (tl.osType().match(/^Linux/)) - depCheck = 'dependency-check.sh'; - let depCheckPath = tl.resolve(localInstallPath, 'bin', depCheck); - console.log(`Dependency Check script set to ${depCheckPath}`); - tl.checkPath(depCheckPath, 'Dependency Check script'); - // Console output for the log file - console.log('Invoking Dependency Check...'); - console.log(`Path: ${depCheckPath}`); - console.log(`Arguments: ${args}`); - // Set Java args - tl.setVariable('JAVA_OPTS', '-Xss8192k'); - // Version smoke test - yield tl.tool(depCheckPath).arg('--version').exec(); - // Run the scan - let exitCode = yield tl.tool(depCheckPath).line(args).exec({ failOnStdErr: false, ignoreReturnCode: false }); - console.log(`Dependency Check completed with exit code ${exitCode}.`); - console.log('Dependency Check reports:'); - console.log(tl.findMatch(reportsDirectory, '**/*.*')); - // Process based on exit code - let failed = exitCode != 0; - let isViolation = exitCode == 1; - // Process scan artifacts is required - let processArtifacts = !failed || isViolation; - if (processArtifacts) { - console.log('##[debug]Attachments:'); - let reports = tl.findMatch(reportsDirectory, '**/*.*'); - reports.forEach(filePath => { - let fileName = path.basename(filePath).replace('.', '%2E'); - let fileExt = path.extname(filePath); - console.log(`##[debug]Attachment name: ${fileName}`); - console.log(`##[debug]Attachment path: ${filePath}`); - console.log(`##[debug]Attachment type: ${fileExt}`); - console.log(`##vso[task.addattachment type=dependencycheck-artifact;name=${fileName};]${filePath}`); - console.log(`##vso[artifact.upload containerfolder=dependency-check;artifactname=Dependency Check;]${filePath}`); - }); - // Upload logs - if (enableVerbose) - console.log(`##vso[build.uploadlog]${logFile}`); - } - if (failed) { - let message = "Dependency Check exited with an error code."; - if (isViolation) - message = "CVSS threshold violation."; - tl.error(message); - tl.setResult(tl.TaskResult.Failed, message); - } - } - catch (err) { - console.log(err.message); - tl.error(err.message); - tl.setResult(tl.TaskResult.Failed, 'Unhandled error condition detected.'); - } - console.log("Ending Dependency Check..."); - }); -} -function cleanLocalInstallPath(localInstallPath) { - let files = tl.findMatch(localInstallPath, ['**', '!data', '!data/**']); - files.forEach(file => tl.rmRF(file)); -} -function getZipUrl(version) { - return __awaiter(this, void 0, void 0, function* () { - let url = `${releaseApi}/tags/v${version}`; - if (version == 'latest') - url = `${releaseApi}/${version}`; - let response = yield client.get(url); - let releaseInfo = JSON.parse(yield response.readBody()); - let asset = releaseInfo['assets'].find(asset => asset['content_type'] == 'application/zip'); - return asset['browser_download_url']; - }); -} -function unzipFromUrl(zipUrl, unzipLocation) { - return __awaiter(this, void 0, void 0, function* () { - let fileName = path.basename(url.parse(zipUrl).pathname); - let zipLocation = tl.resolve(fileName); - let response = yield client.get(zipUrl); - yield new Promise(function (resolve, reject) { - let writer = fs.createWriteStream(zipLocation); - writer.on('error', err => reject(err)); - writer.on('finish', log => resolve()); - response.message.pipe(writer); - }); - yield unzipFromFile(zipLocation, unzipLocation); - tl.rmRF(zipLocation); - }); -} -function unzipFromFile(zipLocation, unzipLocation) { - return __awaiter(this, void 0, void 0, function* () { - yield new Promise(function (resolve, reject) { - tl.debug('Extracting ' + zipLocation + ' to ' + unzipLocation); - var unzipper = new DecompressZip(zipLocation); - unzipper.on('error', err => reject(err)); - unzipper.on('extract', log => { - tl.debug('Extracted ' + zipLocation + ' to ' + unzipLocation + ' successfully'); - return resolve(); - }); - unzipper.extract({ - path: unzipLocation - }); - }); - }); -} -run(); From f1da82f4a6099991a77b22535728eeb8481256be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Tue, 16 Feb 2021 08:49:41 -0500 Subject: [PATCH 17/25] remplace powershell version by typescript version --- .../dependency-check/data/README.md | 3 - .../dependency-check-build-task-v2/icon.png | Bin 11786 -> 0 bytes .../package.json | 21 - .../dependency-check-build-task-v2/task.json | 159 ---- .../dependency-check-build-task.ps1 | 242 ------ .../dependency-check-build-task.ts | 0 .../package-lock.json | 0 .../dependency-check-build-task/package.json | 11 +- .../ps_modules/VstsTaskSdk/0.11.0.txt | 1 - .../ps_modules/VstsTaskSdk/FindFunctions.ps1 | 728 ------------------ .../ps_modules/VstsTaskSdk/InputFunctions.ps1 | 493 ------------ .../VstsTaskSdk/LegacyFindFunctions.ps1 | 320 -------- .../VstsTaskSdk/LocalizationFunctions.ps1 | 150 ---- .../VstsTaskSdk/LoggingCommandFunctions.ps1 | 601 --------------- .../VstsTaskSdk/LongPathFunctions.ps1 | 205 ----- .../ps_modules/VstsTaskSdk/Minimatch.dll | Bin 18432 -> 0 bytes .../ps_modules/VstsTaskSdk/OutFunctions.ps1 | 79 -- .../VstsTaskSdk/PSGetModuleInfo.xml | 215 ------ .../VstsTaskSdk/ServerOMFunctions.ps1 | 659 ---------------- .../resources.resjson/de-de/resources.resjson | 18 - .../resources.resjson/en-US/resources.resjson | 18 - .../resources.resjson/es-es/resources.resjson | 18 - .../resources.resjson/fr-fr/resources.resjson | 18 - .../resources.resjson/it-IT/resources.resjson | 18 - .../resources.resjson/ja-jp/resources.resjson | 18 - .../resources.resjson/ko-KR/resources.resjson | 18 - .../resources.resjson/ru-RU/resources.resjson | 18 - .../resources.resjson/zh-CN/resources.resjson | 18 - .../resources.resjson/zh-TW/resources.resjson | 18 - .../ps_modules/VstsTaskSdk/ToolFunctions.ps1 | 123 --- .../ps_modules/VstsTaskSdk/TraceFunctions.ps1 | 139 ---- .../ps_modules/VstsTaskSdk/VstsTaskSdk.dll | Bin 25408 -> 0 bytes .../ps_modules/VstsTaskSdk/VstsTaskSdk.psd1 | Bin 1738 -> 0 bytes .../ps_modules/VstsTaskSdk/VstsTaskSdk.psm1 | 168 ---- .../ps_modules/VstsTaskSdk/lib.json | 20 - .../dependency-check-build-task/task.json | 8 +- .../tsconfig.json | 0 37 files changed, 13 insertions(+), 4512 deletions(-) delete mode 100644 src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md delete mode 100644 src/Tasks/dependency-check-build-task-v2/icon.png delete mode 100644 src/Tasks/dependency-check-build-task-v2/package.json delete mode 100644 src/Tasks/dependency-check-build-task-v2/task.json delete mode 100644 src/Tasks/dependency-check-build-task/dependency-check-build-task.ps1 rename src/Tasks/{dependency-check-build-task-v2 => dependency-check-build-task}/dependency-check-build-task.ts (100%) rename src/Tasks/{dependency-check-build-task-v2 => dependency-check-build-task}/package-lock.json (100%) delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/0.11.0.txt delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/FindFunctions.ps1 delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/InputFunctions.ps1 delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LegacyFindFunctions.ps1 delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LocalizationFunctions.ps1 delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LoggingCommandFunctions.ps1 delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LongPathFunctions.ps1 delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Minimatch.dll delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/OutFunctions.ps1 delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/PSGetModuleInfo.xml delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/ServerOMFunctions.ps1 delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/de-de/resources.resjson delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/en-US/resources.resjson delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/es-es/resources.resjson delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/fr-fr/resources.resjson delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/it-IT/resources.resjson delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/ja-jp/resources.resjson delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/ko-KR/resources.resjson delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/ru-RU/resources.resjson delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/zh-CN/resources.resjson delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/zh-TW/resources.resjson delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/ToolFunctions.ps1 delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/TraceFunctions.ps1 delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/VstsTaskSdk.dll delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/VstsTaskSdk.psd1 delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/VstsTaskSdk.psm1 delete mode 100644 src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/lib.json rename src/Tasks/{dependency-check-build-task-v2 => dependency-check-build-task}/tsconfig.json (100%) diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md b/src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md deleted file mode 100644 index 51ca064..0000000 --- a/src/Tasks/dependency-check-build-task-v2/dependency-check/data/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Vulnerability data directory - -Files cannot be shipped with the VSIX due to size limitations on the upload. Cached files will be pulled into this directory from a CDN prior to executing the scan to avoid downloading and processing from the ground up on every build. diff --git a/src/Tasks/dependency-check-build-task-v2/icon.png b/src/Tasks/dependency-check-build-task-v2/icon.png deleted file mode 100644 index dd7c1d9971caa2372249cbf1eabc386de985a346..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11786 zcmY+qWmFwNlP!AS;O-V2f;$9v2=4Cg9-IINhl9JjySux)6N0-1hv3|NGxO%%+iSH{ z)$YBky8rZ#4p&l;L`EP$0002U(o*6o|7QRHbU2uQ$IVPm`d<)NTLE${c_mUYM`v@=Z%iCaEaZX+q@<+$&Sn<8D&i9Vv;ChXKyKyg z>cq>;?BU_TV&$!RX@U;A-s2=-@)}-z5JZkGQ#usk60{ ztF@y8>3?{QO&r}^1<1+&BlN%Rzw>mpw)p>*99;gVtbYYE|0lxC%EZF_zuf<}^8d%n ztLSWP{!jTo{DQ3f|AqX2eE*}v&-@?p|0|jQuJpgW|4J1^;Aj5dV-rM>8=%$(02sbV zi;JjvLj3VX^dZ!A``gXl*ofNAFy26}-D0i_`W|yvcSjn$10_lWC90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TGT#| zi7#Fp!gINdGRiZ9-w`VZqx$;$rDgBvyfCw+c*5L4b98e51Yb#NI;s%Z>w;FJv`I+! zDi>Lgz(O#R?C-4B@H;@dQ!r*#u)J@77ku|?Dyw!KAcL&=k=1Ll1C`^>&{q4e@4Qg6 zM?&~7F1BZ{>26D6pt0OtztZlOUIZFR6N#ca0dBxprpU|Cnm9ME*o0;q)29x4ZfIhf z3E>yZ%X2v+qXm6`)T%QCa2^Z3<CoH6!=Bxe^ufTtPTuXmf5U&w63j9B!9}*@2 diff --git a/src/Tasks/dependency-check-build-task-v2/package.json b/src/Tasks/dependency-check-build-task-v2/package.json deleted file mode 100644 index a0d26e9..0000000 --- a/src/Tasks/dependency-check-build-task-v2/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "dependency-check-build-task", - "version": "1.0.0", - "description": "", - "main": "dependency-check-build-task.js", - "scripts": { - "install-libs": "npm install" - }, - "author": "Dependency Check", - "license": "Apache-2.0", - "dependencies": { - "azure-pipelines-task-lib": "^3.0.6-preview.1", - "decompress-zip": "^0.3.3", - "typed-rest-client": "^1.8.1" - }, - "devDependencies": { - "@types/node": "^14.14.25", - "@types/q": "^1.5.4", - "typescript": "^4.0.2" - } -} diff --git a/src/Tasks/dependency-check-build-task-v2/task.json b/src/Tasks/dependency-check-build-task-v2/task.json deleted file mode 100644 index b0d88c6..0000000 --- a/src/Tasks/dependency-check-build-task-v2/task.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "id": "[task id]", - "name": "[task name]", - "friendlyName": "OWASP Dependency Check", - "description": "Dependency Check is a Software Composition Analysis (SCA) tool that attempts to detect publicly disclosed vulnerabilities contained within a project's dependencies.", - "helpMarkDown": "[More Information](https://jeremylong.github.io/DependencyCheck/index.html)", - "category": "Build", - "visibility": [ "Build" ], - "author": "Dependency Check", - "version": { - "Major": "[major]", - "Minor": "[minor]", - "Patch": "[patchrev]" - }, - "demands": [], - "minimumAgentVersion": "2.0.0", - "inputs": [ - { - "name": "projectName", - "type": "string", - "label": "Project Name", - "helpMarkDown": "The name of the project being scanned.", - "defaultValue": "", - "required": true - }, - { - "name": "scanPath", - "type": "filePath", - "label": "Scan Path", - "helpMarkDown": "The path to scan. Supports Ant style paths (e.g. 'directory/**/*.jar').", - "defaultValue": "", - "required": true - }, - { - "name": "excludePath", - "type": "filePath", - "label": "Exclude Path", - "helpMarkDown": "The path patterns to exclude from the scan. Supports Ant style path patterns (e.g. /exclude/).", - "defaultValue": "", - "required": false - }, - { - "name": "format", - "type": "pickList", - "label": "Report Format", - "defaultValue": "HTML", - "required": true, - "helpMarkDown": "The output format to write to (XML, HTML, CSV, JSON, JUNIT, ALL). Multiple formats can be selected. The default is HTML.", - "properties": { - "EditableOptions": "False", - "MultiSelectFlatList": "True" - }, - "options": { - "XML": "XML", - "HTML": "HTML", - "CSV": "CSV", - "JSON": "JSON", - "JUNIT": "JUNIT", - "ALL": "ALL" - } - }, - { - "name": "failOnCVSS", - "type": "string", - "label": "CVSS Failure Threshold", - "defaultValue": "", - "required": false, - "helpMarkDown": "Threshold between 0 and 10 that will cause Dependency Check will return the exit code if a vulnerability with a CVSS score equal to or higher was identified." - }, - { - "name": "suppressionPath", - "type": "filePath", - "label": "Suppression Paths", - "defaultValue": "", - "required": false, - "helpMarkDown": "The file path to the suppression XML file used to suppress false positives. This can be specified more than once to utilize multiple suppression files. The argument can be a local file path, a URL to a suppression file, or even a reference to a file on the class path." - }, - { - "name": "reportsDirectory", - "type": "filePath", - "label": "Report Directory", - "defaultValue": "", - "required": false, - "helpMarkDown": "Report output directory. On-prem build agents can specify a local directory to override the default location. The default location is the $COMMON_TESTRESULTSDIRECTORY\\dependency-check directory." - }, - { - "name": "enableExperimental", - "type": "boolean", - "label": "Experimental Analyzers", - "defaultValue": "false", - "required": false, - "helpMarkDown": "Enable the experimental analyzers." - }, - { - "name": "enableRetired", - "type": "boolean", - "label": "Retired Analyzers", - "defaultValue": "false", - "required": false, - "helpMarkDown": "Enable the retired analyzers." - }, - { - "name": "enableVerbose", - "type": "boolean", - "label": "Verbose", - "defaultValue": "false", - "required": false, - "helpMarkDown": "Enable verbose logging." - }, - { - "name": "additionalArguments", - "type": "multiLine", - "label": "Additional Arguments", - "defaultValue": "", - "required": false, - "helpMarkDown": "Pass additional command line arguments to the Dependency Check command line interface." - }, - { - "name": "localInstallPath", - "type": "filePath", - "label": "Local Install Path", - "helpMarkDown": "The local path to the `dependency-check` installation directory (on-prem build agents only). Setting this field will run the Dependency Check locally instead of downloading the installer onto the build agent.", - "defaultValue": "", - "required": false - }, - { - "name": "customRepo", - "type": "string", - "label": "Custom Installer Repository URL", - "helpMarkDown": "By default, the build task downloads the installer from the Dependency Check GitHub releases. Entering a value for this field will pull the installer package from a custom endpoint.", - "defaultValue": "", - "required": false - }, - { - "name": "dependencyCheckVersion", - "type": "string", - "label": "Installer Version", - "helpMarkDown": "By default, the build task downloads the installer from the Dependency Check GitHub releases. Setting this field will change the Dependency Check version downloaded onto the build agent.", - "defaultValue": "latest", - "required": false - }, - { - "name": "dataMirror", - "type": "string", - "label": "Data Mirror Archive URL", - "helpMarkDown": "The https path to the compressed Dependency Check data directory (containing the odc.mv.db and jsrepository.json files).", - "defaultValue": "", - "required": false - } - ], - "instanceNameFormat": "Dependency Check", - "execution": { - "Node": { - "target": "$(currentDirectory)/dependency-check-build-task.js", - "argumentFormat": "", - "workingDirectory": "$(currentDirectory)" - } - } -} diff --git a/src/Tasks/dependency-check-build-task/dependency-check-build-task.ps1 b/src/Tasks/dependency-check-build-task/dependency-check-build-task.ps1 deleted file mode 100644 index 3fd0917..0000000 --- a/src/Tasks/dependency-check-build-task/dependency-check-build-task.ps1 +++ /dev/null @@ -1,242 +0,0 @@ -# -# dependency-check-build-task.ps1 -# -[CmdletBinding(DefaultParameterSetName = 'None')] -param( - [string][Parameter(Mandatory=$false)] $projectName, - [string][Parameter(Mandatory=$false)] $scanPath, - [string][Parameter(Mandatory=$false)] $excludePath, - [string][Parameter(Mandatory=$false)] $format, - [string][Parameter(Mandatory=$false)] $failOnCVSS, - [string][Parameter(Mandatory=$false)] $suppressionPath, - [string][Parameter(Mandatory=$false)] $enableExperimental, - [string][Parameter(Mandatory=$false)] $enableRetired, - [string][Parameter(Mandatory=$false)] $additionalArguments -) -# To test locally Run: -# Install-Module -Name VstsTaskSdk -# Import-Module VstsTaskSdk -# Invoke-VstsTaskScript -ScriptBlock { ./Tasks/dependency-check-build-task/dependency-check-build-task.ps1 } -Verbose - -function not-exist { -not (Test-Path $args) } -Set-Alias !exist not-exist -Option "Constant, AllScope" -Set-Alias exist Test-Path -Option "Constant, AllScope" - -Write-Output "Starting Dependency Check..." -Trace-VstsEnteringInvocation $MyInvocation -try { - #Get inputs from build task. - $projectName = Get-VstsInput -Name 'projectName' -Require - $scanPath = Get-VstsInput -Name 'scanPath' -Require - $excludePath = Get-VstsInput -Name 'excludePath' -Default '' - $format = Get-VstsInput -Name 'format' -Require - $failOnCVSS = Get-VstsInput -Name 'failOnCVSS' -Default '' - $suppressionPath = Get-VstsInput -Name 'suppressionPath' -Default '' - $reportsDirectory = Get-VstsInput -Name 'reportsDirectory' -Default '' - $enableExperimental = Get-VstsInput -Name 'enableExperimental' -Require -AsBool - $enableRetired = Get-VstsInput -Name 'enableRetired' -Require -AsBool - $enableVerbose = Get-VstsInput -Name 'enableVerbose' -Require -AsBool - $localInstallPath = Get-VstsInput -Name 'localInstallPath' -Default '' - $dependencyCheckVersion = Get-VstsInput -Name 'dependencyCheckVersion' -Default '6.0.2' - $dataMirror = Get-VstsInput -Name 'dataMirror' -Default '' - $customRepo = Get-VstsInput -Name 'customRepo' -Default '' - - $additionalArguments = Get-VstsInput -Name 'additionalArguments' -Default '' - - #Trim the strings - $projectName = $projectName.Trim(); - $scanPath = $scanPath.Trim(); - $excludePath = $excludePath.Trim(); - $suppressionPath = $suppressionPath.Trim(); - $reportsDirectory = $reportsDirectory.Trim(); - $additionalArguments = $additionalArguments.Trim(); - $localInstallPath = $localInstallPath.Trim(); - - #Set reports directory (if necessary) - if ($Env:BUILD_REPOSITORY_LOCALPATH -eq $reportsDirectory){ - $testDirectory = $Env:COMMON_TESTRESULTSDIRECTORY - $reportsDirectory = "$testDirectory\dependency-check" - } - Write-Host "Setting report directory to $reportsDirectory" - - # Create report directory (if necessary) - if(!(Test-Path -Path $reportsDirectory)) - { - Write-Host "Creating report directory at $reportsDirectory" - New-Item $reportsDirectory -Type Directory - } - - # Default args - $arguments = "--project ""$projectName"" --scan ""$scanPath"" --out ""$reportsDirectory""" - - # Exclude switch - if ($Env:BUILD_REPOSITORY_LOCALPATH -ne $excludePath){ - $arguments = $arguments + " --exclude ""$excludePath""" - } - - # Format types - $outputTypes = $format.Split(",") - foreach($outputType in $outputTypes) - { - $arguments = $arguments + " --format $outputType" - } - - # Fail on CVSS switch - [int]$failOnCVSSValue = 0 - [bool]$resultCVSSValue = [int]::TryParse($failOnCVSS, [ref]$failOnCVSSValue) - - if( $resultCVSSValue -eq $true ){ - $arguments = $arguments + " --failOnCVSS $failOnCVSSValue" - } - - # Suppression switch - if ($Env:BUILD_REPOSITORY_LOCALPATH -ne $suppressionPath){ - $arguments = $arguments + " --suppression ""$suppressionPath""" - } - - #Set enableExperimental option if requested - if ($enableExperimental -eq $true){ - $arguments = $arguments + " --enableExperimental" - } - - #Set enableRetired option if requested - if ($enableRetired -eq $true){ - $arguments = $arguments + " --enableRetired" - } - - #Set log switch if requested - if($enableVerbose -eq $true) { - $arguments = $arguments + " --log ""$reportsDirectory\log""" - } - - # additionalArguments - if([string]::IsNullOrEmpty($additionalArguments) -eq $false ) { - $arguments = $arguments + " " + $additionalArguments - } - - #Set PS invoke web args - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - $ProgressPreference = 'SilentlyContinue' - - # Set installation location - if ($Env:BUILD_REPOSITORY_LOCALPATH -eq $localInstallPath){ - #Get dependency check path - $localInstallPath = "dependency-check" - $localInstallPath = $localInstallPath | Resolve-Path - - if(Test-Path $localInstallPath -PathType Container) { - if([string]::IsNullOrEmpty($customRepo) -eq $false ) { - Write-Host -Verbose "Downloading Dependency Check installer from $customRepo..." - Invoke-WebRequest $customRepo -OutFile "dependency-check-release.zip" - } - else { - Write-Host -Verbose "Downloading Dependency Check v$dependencyCheckVersion installer from GitHub..." - Invoke-WebRequest "https://github.com/jeremylong/DependencyCheck/releases/download/v$dependencyCheckVersion/dependency-check-$dependencyCheckVersion-release.zip" -OutFile "dependency-check-release.zip" - } - Expand-Archive -Path dependency-check-release.zip -DestinationPath . -Force - } - } - - #Get dependency check data dir path - $dataDirectory = "$localInstallPath/data" - $dataDirectoryPath = $dataDirectory | Resolve-Path - - # Pull cached data archive - if([string]::IsNullOrEmpty($dataMirror) -eq $false ) { - if(Test-Path $dataDirectoryPath -PathType Container) { - Write-Host -Verbose "Downloading Dependency Check data cache archive..." - Invoke-WebRequest $dataMirror -OutFile "$dataDirectory/data.zip" - Expand-Archive -Path "$dataDirectory/data.zip" -DestinationPath "$dataDirectory" -Force - } - } - - #Get dependency check script path - $depCheck = "dependency-check.bat" - $depCheckScripts = "$localInstallPath/bin" - $depCheckPath = $depCheckScripts | Resolve-Path | Join-Path -ChildPath "$depCheck" - Write-Host -Verbose "Dependency Check installer set to $depCheckPath" - - #Default status to pass, change evaling the exit code below - $failed = $false - - if (Test-Path $depCheckPath -PathType Leaf) { - - #Console output for the log file - Write-Host -Verbose "Invoking Dependency Check..." - Write-Host -Verbose "Path: $depCheckPath" - Write-Host -Verbose "Arguments: $arguments" - - # Set Java args - $env:JAVA_OPTS="-Xss8192k" - - # Version smoke test - $exitcode = (Start-Process -FilePath $depCheckPath -ArgumentList "--version" -PassThru -Wait -NoNewWindow).ExitCode - - # Run the scan - $exitcode = (Start-Process -FilePath $depCheckPath -ArgumentList $arguments -PassThru -Wait -NoNewWindow).ExitCode - Write-Host -Verbose "Dependency Check completed with exit code $exitcode." - Write-Host -Verbose "Dependency check reports:" - Get-ChildItem $reportsDirectory - - # Process based on exit code - $message = "Dependency Check exited with an error code." - $processArtifacts = $true - - # Error severity / thresholds. Need to fail task, but still process artifacts - if ($exitcode -ne 0) { - - if($resultCVSSValue -eq $true -and $exitcode -eq 1) { - $failed = $true - $processArtifacts = $true - $message = "CVSS threshold violation." - } - else { - $processArtifacts = $false - $failed = $true - } - } - - # Process scan artifacts is required - if ($processArtifacts -eq $true) { - - Write-Debug "Attachments:" - Get-ChildItem -Path $reportsDirectory -Recurse -Force | - Foreach-Object { - $filePath = $_.FullName - $fileName = $_.Name.Replace(".", "%2E") - Write-Debug "Attachment name: $fileName" - Write-Debug "Attachment path: $filePath" - Write-Debug "Attachment type: $_.Extension" - Write-Host "##vso[task.addattachment type=dependencycheck-artifact;name=$fileName;]$filePath" - Write-Host "##vso[artifact.upload containerfolder=dependency-check;artifactname=Dependency Check;]$filePath" - } - - #upload logs - if($enableVerbose -eq $true) { - Get-ChildItem -Path "$reportsDirectory\log" -Recurse -Force | - Foreach-Object { - Write-Host "##vso[build.uploadlog]$_" - } - } - } - } - else { - Write-VstsTaskError -Message "File not foud: $depCheckPath" - } - - if ($failed) - { - Write-VstsTaskError -Message $message - Write-VstsSetResult -Result 'Failed' -Message $message -DoNotThrow - } -} catch { - - Write-Verbose "STDERR: $($_.Exception.Message)" - Write-VstsTaskError $_.Exception - Write-VstsSetResult -Result 'Failed' -Message "Unhandled error condition detected." -DoNotThrow -} finally { - Trace-VstsLeavingInvocation $MyInvocation -} - -Write-Output "Ending Dependency Check..." - diff --git a/src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts similarity index 100% rename from src/Tasks/dependency-check-build-task-v2/dependency-check-build-task.ts rename to src/Tasks/dependency-check-build-task/dependency-check-build-task.ts diff --git a/src/Tasks/dependency-check-build-task-v2/package-lock.json b/src/Tasks/dependency-check-build-task/package-lock.json similarity index 100% rename from src/Tasks/dependency-check-build-task-v2/package-lock.json rename to src/Tasks/dependency-check-build-task/package-lock.json diff --git a/src/Tasks/dependency-check-build-task/package.json b/src/Tasks/dependency-check-build-task/package.json index 086febd..a0d26e9 100644 --- a/src/Tasks/dependency-check-build-task/package.json +++ b/src/Tasks/dependency-check-build-task/package.json @@ -2,13 +2,20 @@ "name": "dependency-check-build-task", "version": "1.0.0", "description": "", - "main": "dependency-check-build-task.ps1", + "main": "dependency-check-build-task.js", "scripts": { "install-libs": "npm install" }, "author": "Dependency Check", "license": "Apache-2.0", "dependencies": { - "vsts-task-lib": "^2.6.1" + "azure-pipelines-task-lib": "^3.0.6-preview.1", + "decompress-zip": "^0.3.3", + "typed-rest-client": "^1.8.1" + }, + "devDependencies": { + "@types/node": "^14.14.25", + "@types/q": "^1.5.4", + "typescript": "^4.0.2" } } diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/0.11.0.txt b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/0.11.0.txt deleted file mode 100644 index 87c7b84..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/0.11.0.txt +++ /dev/null @@ -1 +0,0 @@ -saved version \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/FindFunctions.ps1 b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/FindFunctions.ps1 deleted file mode 100644 index 9803c2d..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/FindFunctions.ps1 +++ /dev/null @@ -1,728 +0,0 @@ -<# -.SYNOPSIS -Finds files using match patterns. - -.DESCRIPTION -Determines the find root from a list of patterns. Performs the find and then applies the glob patterns. Supports interleaved exclude patterns. Unrooted patterns are rooted using defaultRoot, unless matchOptions.matchBase is specified and the pattern is a basename only. For matchBase cases, the defaultRoot is used as the find root. - -.PARAMETER DefaultRoot -Default path to root unrooted patterns. Falls back to System.DefaultWorkingDirectory or current location. - -.PARAMETER Pattern -Patterns to apply. Supports interleaved exclude patterns. - -.PARAMETER FindOptions -When the FindOptions parameter is not specified, defaults to (New-VstsFindOptions -FollowSymbolicLinksTrue). Following soft links is generally appropriate unless deleting files. - -.PARAMETER MatchOptions -When the MatchOptions parameter is not specified, defaults to (New-VstsMatchOptions -Dot -NoBrace -NoCase). -#> -function Find-Match { - [CmdletBinding()] - param( - [Parameter()] - [string]$DefaultRoot, - [Parameter()] - [string[]]$Pattern, - $FindOptions, - $MatchOptions) - - Trace-EnteringInvocation $MyInvocation -Parameter None - $originalErrorActionPreference = $ErrorActionPreference - try { - $ErrorActionPreference = 'Stop' - - # Apply defaults for parameters and trace. - if (!$DefaultRoot) { - $DefaultRoot = Get-TaskVariable -Name 'System.DefaultWorkingDirectory' -Default (Get-Location).Path - } - - Write-Verbose "DefaultRoot: '$DefaultRoot'" - if (!$FindOptions) { - $FindOptions = New-FindOptions -FollowSpecifiedSymbolicLink -FollowSymbolicLinks - } - - Trace-FindOptions -Options $FindOptions - if (!$MatchOptions) { - $MatchOptions = New-MatchOptions -Dot -NoBrace -NoCase - } - - Trace-MatchOptions -Options $MatchOptions - Add-Type -LiteralPath $PSScriptRoot\Minimatch.dll - - # Normalize slashes for root dir. - $DefaultRoot = ConvertTo-NormalizedSeparators -Path $DefaultRoot - - $results = @{ } - $originalMatchOptions = $MatchOptions - foreach ($pat in $Pattern) { - Write-Verbose "Pattern: '$pat'" - - # Trim and skip empty. - $pat = "$pat".Trim() - if (!$pat) { - Write-Verbose 'Skipping empty pattern.' - continue - } - - # Clone match options. - $MatchOptions = Copy-MatchOptions -Options $originalMatchOptions - - # Skip comments. - if (!$MatchOptions.NoComment -and $pat.StartsWith('#')) { - Write-Verbose 'Skipping comment.' - continue - } - - # Set NoComment. Brace expansion could result in a leading '#'. - $MatchOptions.NoComment = $true - - # Determine whether pattern is include or exclude. - $negateCount = 0 - if (!$MatchOptions.NoNegate) { - while ($negateCount -lt $pat.Length -and $pat[$negateCount] -eq '!') { - $negateCount++ - } - - $pat = $pat.Substring($negateCount) # trim leading '!' - if ($negateCount) { - Write-Verbose "Trimmed leading '!'. Pattern: '$pat'" - } - } - - $isIncludePattern = $negateCount -eq 0 -or - ($negateCount % 2 -eq 0 -and !$MatchOptions.FlipNegate) -or - ($negateCount % 2 -eq 1 -and $MatchOptions.FlipNegate) - - # Set NoNegate. Brace expansion could result in a leading '!'. - $MatchOptions.NoNegate = $true - $MatchOptions.FlipNegate = $false - - # Trim and skip empty. - $pat = "$pat".Trim() - if (!$pat) { - Write-Verbose 'Skipping empty pattern.' - continue - } - - # Expand braces - required to accurately interpret findPath. - $expanded = $null - $preExpanded = $pat - if ($MatchOptions.NoBrace) { - $expanded = @( $pat ) - } else { - # Convert slashes on Windows before calling braceExpand(). Unfortunately this means braces cannot - # be escaped on Windows, this limitation is consistent with current limitations of minimatch (3.0.3). - Write-Verbose "Expanding braces." - $convertedPattern = $pat -replace '\\', '/' - $expanded = [Minimatch.Minimatcher]::BraceExpand( - $convertedPattern, - (ConvertTo-MinimatchOptions -Options $MatchOptions)) - } - - # Set NoBrace. - $MatchOptions.NoBrace = $true - - foreach ($pat in $expanded) { - if ($pat -ne $preExpanded) { - Write-Verbose "Pattern: '$pat'" - } - - # Trim and skip empty. - $pat = "$pat".Trim() - if (!$pat) { - Write-Verbose "Skipping empty pattern." - continue - } - - if ($isIncludePattern) { - # Determine the findPath. - $findInfo = Get-FindInfoFromPattern -DefaultRoot $DefaultRoot -Pattern $pat -MatchOptions $MatchOptions - $findPath = $findInfo.FindPath - Write-Verbose "FindPath: '$findPath'" - - if (!$findPath) { - Write-Verbose "Skipping empty path." - continue - } - - # Perform the find. - Write-Verbose "StatOnly: '$($findInfo.StatOnly)'" - [string[]]$findResults = @( ) - if ($findInfo.StatOnly) { - # Simply stat the path - all path segments were used to build the path. - if ((Test-Path -LiteralPath $findPath)) { - $findResults += $findPath - } - } else { - $findResults = Get-FindResult -Path $findPath -Options $FindOptions - } - - Write-Verbose "Found $($findResults.Count) paths." - - # Apply the pattern. - Write-Verbose "Applying include pattern." - if ($findInfo.AdjustedPattern -ne $pat) { - Write-Verbose "AdjustedPattern: '$($findInfo.AdjustedPattern)'" - $pat = $findInfo.AdjustedPattern - } - - $matchResults = [Minimatch.Minimatcher]::Filter( - $findResults, - $pat, - (ConvertTo-MinimatchOptions -Options $MatchOptions)) - - # Union the results. - $matchCount = 0 - foreach ($matchResult in $matchResults) { - $matchCount++ - $results[$matchResult.ToUpperInvariant()] = $matchResult - } - - Write-Verbose "$matchCount matches" - } else { - # Check if basename only and MatchBase=true. - if ($MatchOptions.MatchBase -and - !(Test-Rooted -Path $pat) -and - ($pat -replace '\\', '/').IndexOf('/') -lt 0) { - - # Do not root the pattern. - Write-Verbose "MatchBase and basename only." - } else { - # Root the exclude pattern. - $pat = Get-RootedPattern -DefaultRoot $DefaultRoot -Pattern $pat - Write-Verbose "After Get-RootedPattern, pattern: '$pat'" - } - - # Apply the pattern. - Write-Verbose 'Applying exclude pattern.' - $matchResults = [Minimatch.Minimatcher]::Filter( - [string[]]$results.Values, - $pat, - (ConvertTo-MinimatchOptions -Options $MatchOptions)) - - # Subtract the results. - $matchCount = 0 - foreach ($matchResult in $matchResults) { - $matchCount++ - $results.Remove($matchResult.ToUpperInvariant()) - } - - Write-Verbose "$matchCount matches" - } - } - } - - $finalResult = @( $results.Values | Sort-Object ) - Write-Verbose "$($finalResult.Count) final results" - return $finalResult - } catch { - $ErrorActionPreference = $originalErrorActionPreference - Write-Error $_ - } finally { - Trace-LeavingInvocation -InvocationInfo $MyInvocation - } -} - -<# -.SYNOPSIS -Creates FindOptions for use with Find-VstsMatch. - -.DESCRIPTION -Creates FindOptions for use with Find-VstsMatch. Contains switches to control whether to follow symlinks. - -.PARAMETER FollowSpecifiedSymbolicLink -Indicates whether to traverse descendants if the specified path is a symbolic link directory. Does not cause nested symbolic link directories to be traversed. - -.PARAMETER FollowSymbolicLinks -Indicates whether to traverse descendants of symbolic link directories. -#> -function New-FindOptions { - [CmdletBinding()] - param( - [switch]$FollowSpecifiedSymbolicLink, - [switch]$FollowSymbolicLinks) - - return New-Object psobject -Property @{ - FollowSpecifiedSymbolicLink = $FollowSpecifiedSymbolicLink.IsPresent - FollowSymbolicLinks = $FollowSymbolicLinks.IsPresent - } -} - -<# -.SYNOPSIS -Creates MatchOptions for use with Find-VstsMatch and Select-VstsMatch. - -.DESCRIPTION -Creates MatchOptions for use with Find-VstsMatch and Select-VstsMatch. Contains switches to control which pattern matching options are applied. -#> -function New-MatchOptions { - [CmdletBinding()] - param( - [switch]$Dot, - [switch]$FlipNegate, - [switch]$MatchBase, - [switch]$NoBrace, - [switch]$NoCase, - [switch]$NoComment, - [switch]$NoExt, - [switch]$NoGlobStar, - [switch]$NoNegate, - [switch]$NoNull) - - return New-Object psobject -Property @{ - Dot = $Dot.IsPresent - FlipNegate = $FlipNegate.IsPresent - MatchBase = $MatchBase.IsPresent - NoBrace = $NoBrace.IsPresent - NoCase = $NoCase.IsPresent - NoComment = $NoComment.IsPresent - NoExt = $NoExt.IsPresent - NoGlobStar = $NoGlobStar.IsPresent - NoNegate = $NoNegate.IsPresent - NoNull = $NoNull.IsPresent - } -} - -<# -.SYNOPSIS -Applies match patterns against a list of files. - -.DESCRIPTION -Applies match patterns to a list of paths. Supports interleaved exclude patterns. - -.PARAMETER ItemPath -Array of paths. - -.PARAMETER Pattern -Patterns to apply. Supports interleaved exclude patterns. - -.PARAMETER PatternRoot -Default root to apply to unrooted patterns. Not applied to basename-only patterns when Options.MatchBase is true. - -.PARAMETER Options -When the Options parameter is not specified, defaults to (New-VstsMatchOptions -Dot -NoBrace -NoCase). -#> -function Select-Match { - [CmdletBinding()] - param( - [Parameter()] - [string[]]$ItemPath, - [Parameter()] - [string[]]$Pattern, - [Parameter()] - [string]$PatternRoot, - $Options) - - - Trace-EnteringInvocation $MyInvocation -Parameter None - $originalErrorActionPreference = $ErrorActionPreference - try { - $ErrorActionPreference = 'Stop' - if (!$Options) { - $Options = New-MatchOptions -Dot -NoBrace -NoCase - } - - Trace-MatchOptions -Options $Options - Add-Type -LiteralPath $PSScriptRoot\Minimatch.dll - - # Hashtable to keep track of matches. - $map = @{ } - - $originalOptions = $Options - foreach ($pat in $Pattern) { - Write-Verbose "Pattern: '$pat'" - - # Trim and skip empty. - $pat = "$pat".Trim() - if (!$pat) { - Write-Verbose 'Skipping empty pattern.' - continue - } - - # Clone match options. - $Options = Copy-MatchOptions -Options $originalOptions - - # Skip comments. - if (!$Options.NoComment -and $pat.StartsWith('#')) { - Write-Verbose 'Skipping comment.' - continue - } - - # Set NoComment. Brace expansion could result in a leading '#'. - $Options.NoComment = $true - - # Determine whether pattern is include or exclude. - $negateCount = 0 - if (!$Options.NoNegate) { - while ($negateCount -lt $pat.Length -and $pat[$negateCount] -eq '!') { - $negateCount++ - } - - $pat = $pat.Substring($negateCount) # trim leading '!' - if ($negateCount) { - Write-Verbose "Trimmed leading '!'. Pattern: '$pat'" - } - } - - $isIncludePattern = $negateCount -eq 0 -or - ($negateCount % 2 -eq 0 -and !$Options.FlipNegate) -or - ($negateCount % 2 -eq 1 -and $Options.FlipNegate) - - # Set NoNegate. Brace expansion could result in a leading '!'. - $Options.NoNegate = $true - $Options.FlipNegate = $false - - # Expand braces - required to accurately root patterns. - $expanded = $null - $preExpanded = $pat - if ($Options.NoBrace) { - $expanded = @( $pat ) - } else { - # Convert slashes on Windows before calling braceExpand(). Unfortunately this means braces cannot - # be escaped on Windows, this limitation is consistent with current limitations of minimatch (3.0.3). - Write-Verbose "Expanding braces." - $convertedPattern = $pat -replace '\\', '/' - $expanded = [Minimatch.Minimatcher]::BraceExpand( - $convertedPattern, - (ConvertTo-MinimatchOptions -Options $Options)) - } - - # Set NoBrace. - $Options.NoBrace = $true - - foreach ($pat in $expanded) { - if ($pat -ne $preExpanded) { - Write-Verbose "Pattern: '$pat'" - } - - # Trim and skip empty. - $pat = "$pat".Trim() - if (!$pat) { - Write-Verbose "Skipping empty pattern." - continue - } - - # Root the pattern when all of the following conditions are true: - if ($PatternRoot -and # PatternRoot is supplied - !(Test-Rooted -Path $pat) -and # AND pattern is not rooted - # # AND MatchBase=false or not basename only - (!$Options.MatchBase -or ($pat -replace '\\', '/').IndexOf('/') -ge 0)) { - - # Root the include pattern. - $pat = Get-RootedPattern -DefaultRoot $PatternRoot -Pattern $pat - Write-Verbose "After Get-RootedPattern, pattern: '$pat'" - } - - if ($isIncludePattern) { - # Apply the pattern. - Write-Verbose 'Applying include pattern against original list.' - $matchResults = [Minimatch.Minimatcher]::Filter( - $ItemPath, - $pat, - (ConvertTo-MinimatchOptions -Options $Options)) - - # Union the results. - $matchCount = 0 - foreach ($matchResult in $matchResults) { - $matchCount++ - $map[$matchResult] = $true - } - - Write-Verbose "$matchCount matches" - } else { - # Apply the pattern. - Write-Verbose 'Applying exclude pattern against original list' - $matchResults = [Minimatch.Minimatcher]::Filter( - $ItemPath, - $pat, - (ConvertTo-MinimatchOptions -Options $Options)) - - # Subtract the results. - $matchCount = 0 - foreach ($matchResult in $matchResults) { - $matchCount++ - $map.Remove($matchResult) - } - - Write-Verbose "$matchCount matches" - } - } - } - - # return a filtered version of the original list (preserves order and prevents duplication) - $result = $ItemPath | Where-Object { $map[$_] } - Write-Verbose "$($result.Count) final results" - $result - } catch { - $ErrorActionPreference = $originalErrorActionPreference - Write-Error $_ - } finally { - Trace-LeavingInvocation -InvocationInfo $MyInvocation - } -} - -################################################################################ -# Private functions. -################################################################################ - -function Copy-MatchOptions { - [CmdletBinding()] - param($Options) - - return New-Object psobject -Property @{ - Dot = $Options.Dot -eq $true - FlipNegate = $Options.FlipNegate -eq $true - MatchBase = $Options.MatchBase -eq $true - NoBrace = $Options.NoBrace -eq $true - NoCase = $Options.NoCase -eq $true - NoComment = $Options.NoComment -eq $true - NoExt = $Options.NoExt -eq $true - NoGlobStar = $Options.NoGlobStar -eq $true - NoNegate = $Options.NoNegate -eq $true - NoNull = $Options.NoNull -eq $true - } -} - -function ConvertTo-MinimatchOptions { - [CmdletBinding()] - param($Options) - - $opt = New-Object Minimatch.Options - $opt.AllowWindowsPaths = $true - $opt.Dot = $Options.Dot -eq $true - $opt.FlipNegate = $Options.FlipNegate -eq $true - $opt.MatchBase = $Options.MatchBase -eq $true - $opt.NoBrace = $Options.NoBrace -eq $true - $opt.NoCase = $Options.NoCase -eq $true - $opt.NoComment = $Options.NoComment -eq $true - $opt.NoExt = $Options.NoExt -eq $true - $opt.NoGlobStar = $Options.NoGlobStar -eq $true - $opt.NoNegate = $Options.NoNegate -eq $true - $opt.NoNull = $Options.NoNull -eq $true - return $opt -} - -function ConvertTo-NormalizedSeparators { - [CmdletBinding()] - param([string]$Path) - - # Convert slashes. - $Path = "$Path".Replace('/', '\') - - # Remove redundant slashes. - $isUnc = $Path -match '^\\\\+[^\\]' - $Path = $Path -replace '\\\\+', '\' - if ($isUnc) { - $Path = '\' + $Path - } - - return $Path -} - -function Get-FindInfoFromPattern { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$DefaultRoot, - [Parameter(Mandatory = $true)] - [string]$Pattern, - [Parameter(Mandatory = $true)] - $MatchOptions) - - if (!$MatchOptions.NoBrace) { - throw "Get-FindInfoFromPattern expected MatchOptions.NoBrace to be true." - } - - # For the sake of determining the find path, pretend NoCase=false. - $MatchOptions = Copy-MatchOptions -Options $MatchOptions - $MatchOptions.NoCase = $false - - # Check if basename only and MatchBase=true - if ($MatchOptions.MatchBase -and - !(Test-Rooted -Path $Pattern) -and - ($Pattern -replace '\\', '/').IndexOf('/') -lt 0) { - - return New-Object psobject -Property @{ - AdjustedPattern = $Pattern - FindPath = $DefaultRoot - StatOnly = $false - } - } - - # The technique applied by this function is to use the information on the Minimatch object determine - # the findPath. Minimatch breaks the pattern into path segments, and exposes information about which - # segments are literal vs patterns. - # - # Note, the technique currently imposes a limitation for drive-relative paths with a glob in the - # first segment, e.g. C:hello*/world. It's feasible to overcome this limitation, but is left unsolved - # for now. - $minimatchObj = New-Object Minimatch.Minimatcher($Pattern, (ConvertTo-MinimatchOptions -Options $MatchOptions)) - - # The "set" field is a two-dimensional enumerable of parsed path segment info. The outer enumerable should only - # contain one item, otherwise something went wrong. Brace expansion can result in multiple items in the outer - # enumerable, but that should be turned off by the time this function is reached. - # - # Note, "set" is a private field in the .NET implementation but is documented as a feature in the nodejs - # implementation. The .NET implementation is a port and is by a different author. - $setFieldInfo = $minimatchObj.GetType().GetField('set', 'Instance,NonPublic') - [object[]]$set = $setFieldInfo.GetValue($minimatchObj) - if ($set.Count -ne 1) { - throw "Get-FindInfoFromPattern expected Minimatch.Minimatcher(...).set.Count to be 1. Actual: '$($set.Count)'" - } - - [string[]]$literalSegments = @( ) - [object[]]$parsedSegments = $set[0] - foreach ($parsedSegment in $parsedSegments) { - if ($parsedSegment.GetType().Name -eq 'LiteralItem') { - # The item is a LiteralItem when the original input for the path segment does not contain any - # unescaped glob characters. - $literalSegments += $parsedSegment.Source; - continue - } - - break; - } - - # Join the literal segments back together. Minimatch converts '\' to '/' on Windows, then squashes - # consequetive slashes, and finally splits on slash. This means that UNC format is lost, but can - # be detected from the original pattern. - $joinedSegments = [string]::Join('/', $literalSegments) - if ($joinedSegments -and ($Pattern -replace '\\', '/').StartsWith('//')) { - $joinedSegments = '/' + $joinedSegments # restore UNC format - } - - # Determine the find path. - $findPath = '' - if ((Test-Rooted -Path $Pattern)) { # The pattern is rooted. - $findPath = $joinedSegments - } elseif ($joinedSegments) { # The pattern is not rooted, and literal segements were found. - $findPath = [System.IO.Path]::Combine($DefaultRoot, $joinedSegments) - } else { # The pattern is not rooted, and no literal segements were found. - $findPath = $DefaultRoot - } - - # Clean up the path. - if ($findPath) { - $findPath = [System.IO.Path]::GetDirectoryName(([System.IO.Path]::Combine($findPath, '_'))) # Hack to remove unnecessary trailing slash. - $findPath = ConvertTo-NormalizedSeparators -Path $findPath - } - - return New-Object psobject -Property @{ - AdjustedPattern = Get-RootedPattern -DefaultRoot $DefaultRoot -Pattern $Pattern - FindPath = $findPath - StatOnly = $literalSegments.Count -eq $parsedSegments.Count - } -} - -function Get-FindResult { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Path, - [Parameter(Mandatory = $true)] - $Options) - - if (!(Test-Path -LiteralPath $Path)) { - Write-Verbose 'Path not found.' - return - } - - $Path = ConvertTo-NormalizedSeparators -Path $Path - - # Push the first item. - [System.Collections.Stack]$stack = New-Object System.Collections.Stack - $stack.Push((Get-Item -LiteralPath $Path)) - - $count = 0 - while ($stack.Count) { - # Pop the next item and yield the result. - $item = $stack.Pop() - $count++ - $item.FullName - - # Traverse. - if (($item.Attributes -band 0x00000010) -eq 0x00000010) { # Directory - if (($item.Attributes -band 0x00000400) -ne 0x00000400 -or # ReparsePoint - $Options.FollowSymbolicLinks -or - ($count -eq 1 -and $Options.FollowSpecifiedSymbolicLink)) { - - $childItems = @( Get-DirectoryChildItem -Path $Item.FullName -Force ) - [System.Array]::Reverse($childItems) - foreach ($childItem in $childItems) { - $stack.Push($childItem) - } - } - } - } -} - -function Get-RootedPattern { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$DefaultRoot, - [Parameter(Mandatory = $true)] - [string]$Pattern) - - if ((Test-Rooted -Path $Pattern)) { - return $Pattern - } - - # Normalize root. - $DefaultRoot = ConvertTo-NormalizedSeparators -Path $DefaultRoot - - # Escape special glob characters. - $DefaultRoot = $DefaultRoot -replace '(\[)(?=[^\/]+\])', '[[]' # Escape '[' when ']' follows within the path segment - $DefaultRoot = $DefaultRoot.Replace('?', '[?]') # Escape '?' - $DefaultRoot = $DefaultRoot.Replace('*', '[*]') # Escape '*' - $DefaultRoot = $DefaultRoot -replace '\+\(', '[+](' # Escape '+(' - $DefaultRoot = $DefaultRoot -replace '@\(', '[@](' # Escape '@(' - $DefaultRoot = $DefaultRoot -replace '!\(', '[!](' # Escape '!(' - - if ($DefaultRoot -like '[A-Z]:') { # e.g. C: - return "$DefaultRoot$Pattern" - } - - # Ensure root ends with a separator. - if (!$DefaultRoot.EndsWith('\')) { - $DefaultRoot = "$DefaultRoot\" - } - - return "$DefaultRoot$Pattern" -} - -function Test-Rooted { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Path) - - $Path = ConvertTo-NormalizedSeparators -Path $Path - return $Path.StartsWith('\') -or # e.g. \ or \hello or \\hello - $Path -like '[A-Z]:*' # e.g. C: or C:\hello -} - -function Trace-MatchOptions { - [CmdletBinding()] - param($Options) - - Write-Verbose "MatchOptions.Dot: '$($Options.Dot)'" - Write-Verbose "MatchOptions.FlipNegate: '$($Options.FlipNegate)'" - Write-Verbose "MatchOptions.MatchBase: '$($Options.MatchBase)'" - Write-Verbose "MatchOptions.NoBrace: '$($Options.NoBrace)'" - Write-Verbose "MatchOptions.NoCase: '$($Options.NoCase)'" - Write-Verbose "MatchOptions.NoComment: '$($Options.NoComment)'" - Write-Verbose "MatchOptions.NoExt: '$($Options.NoExt)'" - Write-Verbose "MatchOptions.NoGlobStar: '$($Options.NoGlobStar)'" - Write-Verbose "MatchOptions.NoNegate: '$($Options.NoNegate)'" - Write-Verbose "MatchOptions.NoNull: '$($Options.NoNull)'" -} - -function Trace-FindOptions { - [CmdletBinding()] - param($Options) - - Write-Verbose "FindOptions.FollowSpecifiedSymbolicLink: '$($FindOptions.FollowSpecifiedSymbolicLink)'" - Write-Verbose "FindOptions.FollowSymbolicLinks: '$($FindOptions.FollowSymbolicLinks)'" -} diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/InputFunctions.ps1 b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/InputFunctions.ps1 deleted file mode 100644 index 846492d..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/InputFunctions.ps1 +++ /dev/null @@ -1,493 +0,0 @@ -# Hash table of known variable info. The formatted env var name is the lookup key. -# -# The purpose of this hash table is to keep track of known variables. The hash table -# needs to be maintained for multiple reasons: -# 1) to distinguish between env vars and job vars -# 2) to distinguish between secret vars and public -# 3) to know the real variable name and not just the formatted env var name. -$script:knownVariables = @{ } -$script:vault = @{ } - -<# -.SYNOPSIS -Gets an endpoint. - -.DESCRIPTION -Gets an endpoint object for the specified endpoint name. The endpoint is returned as an object with three properties: Auth, Data, and Url. - -The Data property requires a 1.97 agent or higher. - -.PARAMETER Require -Writes an error to the error pipeline if the endpoint is not found. -#> -function Get-Endpoint { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Name, - [switch]$Require) - - $originalErrorActionPreference = $ErrorActionPreference - try { - $ErrorActionPreference = 'Stop' - - # Get the URL. - $description = Get-LocString -Key PSLIB_EndpointUrl0 -ArgumentList $Name - $key = "ENDPOINT_URL_$Name" - $url = Get-VaultValue -Description $description -Key $key -Require:$Require - - # Get the auth object. - $description = Get-LocString -Key PSLIB_EndpointAuth0 -ArgumentList $Name - $key = "ENDPOINT_AUTH_$Name" - if ($auth = (Get-VaultValue -Description $description -Key $key -Require:$Require)) { - $auth = ConvertFrom-Json -InputObject $auth - } - - # Get the data. - $description = "'$Name' service endpoint data" - $key = "ENDPOINT_DATA_$Name" - if ($data = (Get-VaultValue -Description $description -Key $key)) { - $data = ConvertFrom-Json -InputObject $data - } - - # Return the endpoint. - if ($url -or $auth -or $data) { - New-Object -TypeName psobject -Property @{ - Url = $url - Auth = $auth - Data = $data - } - } - } catch { - $ErrorActionPreference = $originalErrorActionPreference - Write-Error $_ - } -} - -<# -.SYNOPSIS -Gets a secure file ticket. - -.DESCRIPTION -Gets the secure file ticket that can be used to download the secure file contents. - -.PARAMETER Id -Secure file id. - -.PARAMETER Require -Writes an error to the error pipeline if the ticket is not found. -#> -function Get-SecureFileTicket { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Id, - [switch]$Require) - - $originalErrorActionPreference = $ErrorActionPreference - try { - $ErrorActionPreference = 'Stop' - - $description = Get-LocString -Key PSLIB_Input0 -ArgumentList $Id - $key = "SECUREFILE_TICKET_$Id" - - Get-VaultValue -Description $description -Key $key -Require:$Require - } catch { - $ErrorActionPreference = $originalErrorActionPreference - Write-Error $_ - } -} - -<# -.SYNOPSIS -Gets a secure file name. - -.DESCRIPTION -Gets the name for a secure file. - -.PARAMETER Id -Secure file id. - -.PARAMETER Require -Writes an error to the error pipeline if the ticket is not found. -#> -function Get-SecureFileName { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Id, - [switch]$Require) - - $originalErrorActionPreference = $ErrorActionPreference - try { - $ErrorActionPreference = 'Stop' - - $description = Get-LocString -Key PSLIB_Input0 -ArgumentList $Id - $key = "SECUREFILE_NAME_$Id" - - Get-VaultValue -Description $description -Key $key -Require:$Require - } catch { - $ErrorActionPreference = $originalErrorActionPreference - Write-Error $_ - } -} - -<# -.SYNOPSIS -Gets an input. - -.DESCRIPTION -Gets the value for the specified input name. - -.PARAMETER AsBool -Returns the value as a bool. Returns true if the value converted to a string is "1" or "true" (case insensitive); otherwise false. - -.PARAMETER AsInt -Returns the value as an int. Returns the value converted to an int. Returns 0 if the conversion fails. - -.PARAMETER Default -Default value to use if the input is null or empty. - -.PARAMETER Require -Writes an error to the error pipeline if the input is null or empty. -#> -function Get-Input { - [CmdletBinding(DefaultParameterSetName = 'Require')] - param( - [Parameter(Mandatory = $true)] - [string]$Name, - [Parameter(ParameterSetName = 'Default')] - $Default, - [Parameter(ParameterSetName = 'Require')] - [switch]$Require, - [switch]$AsBool, - [switch]$AsInt) - - # Get the input from the vault. Splat the bound parameters hashtable. Splatting is required - # in order to concisely invoke the correct parameter set. - $null = $PSBoundParameters.Remove('Name') - $description = Get-LocString -Key PSLIB_Input0 -ArgumentList $Name - $key = "INPUT_$($Name.Replace(' ', '_').ToUpperInvariant())" - Get-VaultValue @PSBoundParameters -Description $description -Key $key -} - -<# -.SYNOPSIS -Gets a task variable. - -.DESCRIPTION -Gets the value for the specified task variable. - -.PARAMETER AsBool -Returns the value as a bool. Returns true if the value converted to a string is "1" or "true" (case insensitive); otherwise false. - -.PARAMETER AsInt -Returns the value as an int. Returns the value converted to an int. Returns 0 if the conversion fails. - -.PARAMETER Default -Default value to use if the input is null or empty. - -.PARAMETER Require -Writes an error to the error pipeline if the input is null or empty. -#> -function Get-TaskVariable { - [CmdletBinding(DefaultParameterSetName = 'Require')] - param( - [Parameter(Mandatory = $true)] - [string]$Name, - [Parameter(ParameterSetName = 'Default')] - $Default, - [Parameter(ParameterSetName = 'Require')] - [switch]$Require, - [switch]$AsBool, - [switch]$AsInt) - - $originalErrorActionPreference = $ErrorActionPreference - try { - $ErrorActionPreference = 'Stop' - $description = Get-LocString -Key PSLIB_TaskVariable0 -ArgumentList $Name - $variableKey = Get-VariableKey -Name $Name - if ($script:knownVariables.$variableKey.Secret) { - # Get secret variable. Splatting is required to concisely invoke the correct parameter set. - $null = $PSBoundParameters.Remove('Name') - $vaultKey = "SECRET_$variableKey" - Get-VaultValue @PSBoundParameters -Description $description -Key $vaultKey - } else { - # Get public variable. - $item = $null - $path = "Env:$variableKey" - if ((Test-Path -LiteralPath $path) -and ($item = Get-Item -LiteralPath $path).Value) { - # Intentionally empty. Value was successfully retrieved. - } elseif (!$script:nonInteractive) { - # The value wasn't found and the module is running in interactive dev mode. - # Prompt for the value. - Set-Item -LiteralPath $path -Value (Read-Host -Prompt $description) - if (Test-Path -LiteralPath $path) { - $item = Get-Item -LiteralPath $path - } - } - - # Get the converted value. Splatting is required to concisely invoke the correct parameter set. - $null = $PSBoundParameters.Remove('Name') - Get-Value @PSBoundParameters -Description $description -Key $variableKey -Value $item.Value - } - } catch { - $ErrorActionPreference = $originalErrorActionPreference - Write-Error $_ - } -} - -<# -.SYNOPSIS -Gets all job variables available to the task. Requires 2.104.1 agent or higher. - -.DESCRIPTION -Gets a snapshot of the current state of all job variables available to the task. -Requires a 2.104.1 agent or higher for full functionality. - -Returns an array of objects with the following properties: - [string]Name - [string]Value - [bool]Secret - -Limitations on an agent prior to 2.104.1: - 1) The return value does not include all public variables. Only public variables - that have been added using setVariable are returned. - 2) The name returned for each secret variable is the formatted environment variable - name, not the actual variable name (unless it was set explicitly at runtime using - setVariable). -#> -function Get-TaskVariableInfo { - [CmdletBinding()] - param() - - foreach ($info in $script:knownVariables.Values) { - New-Object -TypeName psobject -Property @{ - Name = $info.Name - Value = Get-TaskVariable -Name $info.Name - Secret = $info.Secret - } - } -} - -<# -.SYNOPSIS -Sets a task variable. - -.DESCRIPTION -Sets a task variable in the current task context as well as in the current job context. This allows the task variable to retrieved by subsequent tasks within the same job. -#> -function Set-TaskVariable { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Name, - [string]$Value, - [switch]$Secret) - - # Once a secret always a secret. - $variableKey = Get-VariableKey -Name $Name - [bool]$Secret = $Secret -or $script:knownVariables.$variableKey.Secret - if ($Secret) { - $vaultKey = "SECRET_$variableKey" - if (!$Value) { - # Clear the secret. - Write-Verbose "Set $Name = ''" - $script:vault.Remove($vaultKey) - } else { - # Store the secret in the vault. - Write-Verbose "Set $Name = '********'" - $script:vault[$vaultKey] = New-Object System.Management.Automation.PSCredential( - $vaultKey, - (ConvertTo-SecureString -String $Value -AsPlainText -Force)) - } - - # Clear the environment variable. - Set-Item -LiteralPath "Env:$variableKey" -Value '' - } else { - # Set the environment variable. - Write-Verbose "Set $Name = '$Value'" - Set-Item -LiteralPath "Env:$variableKey" -Value $Value - } - - # Store the metadata. - $script:knownVariables[$variableKey] = New-Object -TypeName psobject -Property @{ - Name = $name - Secret = $Secret - } - - # Persist the variable in the task context. - Write-SetVariable -Name $Name -Value $Value -Secret:$Secret -} - -######################################## -# Private functions. -######################################## -function Get-VaultValue { - [CmdletBinding(DefaultParameterSetName = 'Require')] - param( - [Parameter(Mandatory = $true)] - [string]$Description, - [Parameter(Mandatory = $true)] - [string]$Key, - [Parameter(ParameterSetName = 'Require')] - [switch]$Require, - [Parameter(ParameterSetName = 'Default')] - [object]$Default, - [switch]$AsBool, - [switch]$AsInt) - - # Attempt to get the vault value. - $value = $null - if ($psCredential = $script:vault[$Key]) { - $value = $psCredential.GetNetworkCredential().Password - } elseif (!$script:nonInteractive) { - # The value wasn't found. Prompt for the value if running in interactive dev mode. - $value = Read-Host -Prompt $Description - if ($value) { - $script:vault[$Key] = New-Object System.Management.Automation.PSCredential( - $Key, - (ConvertTo-SecureString -String $value -AsPlainText -Force)) - } - } - - Get-Value -Value $value @PSBoundParameters -} - -function Get-Value { - [CmdletBinding(DefaultParameterSetName = 'Require')] - param( - [string]$Value, - [Parameter(Mandatory = $true)] - [string]$Description, - [Parameter(Mandatory = $true)] - [string]$Key, - [Parameter(ParameterSetName = 'Require')] - [switch]$Require, - [Parameter(ParameterSetName = 'Default')] - [object]$Default, - [switch]$AsBool, - [switch]$AsInt) - - $result = $Value - if ($result) { - if ($Key -like 'ENDPOINT_AUTH_*') { - Write-Verbose "$($Key): '********'" - } else { - Write-Verbose "$($Key): '$result'" - } - } else { - Write-Verbose "$Key (empty)" - - # Write error if required. - if ($Require) { - Write-Error "$(Get-LocString -Key PSLIB_Required0 $Description)" - return - } - - # Fallback to the default if provided. - if ($PSCmdlet.ParameterSetName -eq 'Default') { - $result = $Default - $OFS = ' ' - Write-Verbose " Defaulted to: '$result'" - } else { - $result = '' - } - } - - # Convert to bool if specified. - if ($AsBool) { - if ($result -isnot [bool]) { - $result = "$result" -in '1', 'true' - Write-Verbose " Converted to bool: $result" - } - - return $result - } - - # Convert to int if specified. - if ($AsInt) { - if ($result -isnot [int]) { - try { - $result = [int]"$result" - } catch { - $result = 0 - } - - Write-Verbose " Converted to int: $result" - } - - return $result - } - - return $result -} - -function Initialize-Inputs { - # Store endpoints, inputs, and secret variables in the vault. - foreach ($variable in (Get-ChildItem -Path Env:ENDPOINT_?*, Env:INPUT_?*, Env:SECRET_?*, Env:SECUREFILE_?*)) { - # Record the secret variable metadata. This is required by Get-TaskVariable to - # retrieve the value. In a 2.104.1 agent or higher, this metadata will be overwritten - # when $env:VSTS_SECRET_VARIABLES is processed. - if ($variable.Name -like 'SECRET_?*') { - $variableKey = $variable.Name.Substring('SECRET_'.Length) - $script:knownVariables[$variableKey] = New-Object -TypeName psobject -Property @{ - # This is technically not the variable name (has underscores instead of dots), - # but it's good enough to make Get-TaskVariable work in a pre-2.104.1 agent - # where $env:VSTS_SECRET_VARIABLES is not defined. - Name = $variableKey - Secret = $true - } - } - - # Store the value in the vault. - $vaultKey = $variable.Name - if ($variable.Value) { - $script:vault[$vaultKey] = New-Object System.Management.Automation.PSCredential( - $vaultKey, - (ConvertTo-SecureString -String $variable.Value -AsPlainText -Force)) - } - - # Clear the environment variable. - Remove-Item -LiteralPath "Env:$($variable.Name)" - } - - # Record the public variable names. Env var added in 2.104.1 agent. - if ($env:VSTS_PUBLIC_VARIABLES) { - foreach ($name in (ConvertFrom-Json -InputObject $env:VSTS_PUBLIC_VARIABLES)) { - $variableKey = Get-VariableKey -Name $name - $script:knownVariables[$variableKey] = New-Object -TypeName psobject -Property @{ - Name = $name - Secret = $false - } - } - - $env:VSTS_PUBLIC_VARIABLES = '' - } - - # Record the secret variable names. Env var added in 2.104.1 agent. - if ($env:VSTS_SECRET_VARIABLES) { - foreach ($name in (ConvertFrom-Json -InputObject $env:VSTS_SECRET_VARIABLES)) { - $variableKey = Get-VariableKey -Name $name - $script:knownVariables[$variableKey] = New-Object -TypeName psobject -Property @{ - Name = $name - Secret = $true - } - } - - $env:VSTS_SECRET_VARIABLES = '' - } -} - -function Get-VariableKey { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Name) - - if ($Name -ne 'agent.jobstatus') { - $Name = $Name.Replace('.', '_') - } - - $Name.ToUpperInvariant() -} diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LegacyFindFunctions.ps1 b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LegacyFindFunctions.ps1 deleted file mode 100644 index b4080ae..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LegacyFindFunctions.ps1 +++ /dev/null @@ -1,320 +0,0 @@ -<# -.SYNOPSIS -Finds files or directories. - -.DESCRIPTION -Finds files or directories using advanced pattern matching. - -.PARAMETER LiteralDirectory -Directory to search. - -.PARAMETER LegacyPattern -Proprietary pattern format. The LiteralDirectory parameter is used to root any unrooted patterns. - -Separate multiple patterns using ";". Escape actual ";" in the path by using ";;". -"?" indicates a wildcard that represents any single character within a path segment. -"*" indicates a wildcard that represents zero or more characters within a path segment. -"**" as the entire path segment indicates a recursive search. -"**" within a path segment indicates a recursive intersegment wildcard. -"+:" (can be omitted) indicates an include pattern. -"-:" indicates an exclude pattern. - -The result is from the command is a union of all the matches from the include patterns, minus the matches from the exclude patterns. - -.PARAMETER IncludeFiles -Indicates whether to include files in the results. - -If neither IncludeFiles or IncludeDirectories is set, then IncludeFiles is assumed. - -.PARAMETER IncludeDirectories -Indicates whether to include directories in the results. - -If neither IncludeFiles or IncludeDirectories is set, then IncludeFiles is assumed. - -.PARAMETER Force -Indicates whether to include hidden items. - -.EXAMPLE -Find-VstsFiles -LegacyPattern "C:\Directory\Is?Match.txt" - -Given: -C:\Directory\Is1Match.txt -C:\Directory\Is2Match.txt -C:\Directory\IsNotMatch.txt - -Returns: -C:\Directory\Is1Match.txt -C:\Directory\Is2Match.txt - -.EXAMPLE -Find-VstsFiles -LegacyPattern "C:\Directory\Is*Match.txt" - -Given: -C:\Directory\IsOneMatch.txt -C:\Directory\IsTwoMatch.txt -C:\Directory\NonMatch.txt - -Returns: -C:\Directory\IsOneMatch.txt -C:\Directory\IsTwoMatch.txt - -.EXAMPLE -Find-VstsFiles -LegacyPattern "C:\Directory\**\Match.txt" - -Given: -C:\Directory\Match.txt -C:\Directory\NotAMatch.txt -C:\Directory\SubDir\Match.txt -C:\Directory\SubDir\SubSubDir\Match.txt - -Returns: -C:\Directory\Match.txt -C:\Directory\SubDir\Match.txt -C:\Directory\SubDir\SubSubDir\Match.txt - -.EXAMPLE -Find-VstsFiles -LegacyPattern "C:\Directory\**" - -Given: -C:\Directory\One.txt -C:\Directory\SubDir\Two.txt -C:\Directory\SubDir\SubSubDir\Three.txt - -Returns: -C:\Directory\One.txt -C:\Directory\SubDir\Two.txt -C:\Directory\SubDir\SubSubDir\Three.txt - -.EXAMPLE -Find-VstsFiles -LegacyPattern "C:\Directory\Sub**Match.txt" - -Given: -C:\Directory\IsNotAMatch.txt -C:\Directory\SubDir\IsAMatch.txt -C:\Directory\SubDir\IsNot.txt -C:\Directory\SubDir\SubSubDir\IsAMatch.txt -C:\Directory\SubDir\SubSubDir\IsNot.txt - -Returns: -C:\Directory\SubDir\IsAMatch.txt -C:\Directory\SubDir\SubSubDir\IsAMatch.txt -#> -function Find-Files { - [CmdletBinding()] - param( - [ValidateNotNullOrEmpty()] - [Parameter()] - [string]$LiteralDirectory, - [Parameter(Mandatory = $true)] - [string]$LegacyPattern, - [switch]$IncludeFiles, - [switch]$IncludeDirectories, - [switch]$Force) - - # Note, due to subtle implementation details of Get-PathPrefix/Get-PathIterator, - # this function does not appear to be able to search the root of a drive and other - # cases where Path.GetDirectoryName() returns empty. More details in Get-PathPrefix. - - Trace-EnteringInvocation $MyInvocation - if (!$IncludeFiles -and !$IncludeDirectories) { - $IncludeFiles = $true - } - - $includePatterns = New-Object System.Collections.Generic.List[string] - $excludePatterns = New-Object System.Collections.Generic.List[System.Text.RegularExpressions.Regex] - $LegacyPattern = $LegacyPattern.Replace(';;', "`0") - foreach ($pattern in $LegacyPattern.Split(';', [System.StringSplitOptions]::RemoveEmptyEntries)) { - $pattern = $pattern.Replace("`0", ';') - $isIncludePattern = Test-IsIncludePattern -Pattern ([ref]$pattern) - if ($LiteralDirectory -and !([System.IO.Path]::IsPathRooted($pattern))) { - # Use the root directory provided to make the pattern a rooted path. - $pattern = [System.IO.Path]::Combine($LiteralDirectory, $pattern) - } - - # Validate pattern does not end with a \. - if ($pattern[$pattern.Length - 1] -eq [System.IO.Path]::DirectorySeparatorChar) { - throw (Get-LocString -Key PSLIB_InvalidPattern0 -ArgumentList $pattern) - } - - if ($isIncludePattern) { - $includePatterns.Add($pattern) - } else { - $excludePatterns.Add((Convert-PatternToRegex -Pattern $pattern)) - } - } - - $count = 0 - foreach ($path in (Get-MatchingItems -IncludePatterns $includePatterns -ExcludePatterns $excludePatterns -IncludeFiles:$IncludeFiles -IncludeDirectories:$IncludeDirectories -Force:$Force)) { - $count++ - $path - } - - Write-Verbose "Total found: $count" - Trace-LeavingInvocation $MyInvocation -} - -######################################## -# Private functions. -######################################## -function Convert-PatternToRegex { - [CmdletBinding()] - param([string]$Pattern) - - $Pattern = [regex]::Escape($Pattern.Replace('\', '/')). # Normalize separators and regex escape. - Replace('/\*\*/', '((/.+/)|(/))'). # Replace directory globstar. - Replace('\*\*', '.*'). # Replace remaining globstars with a wildcard that can span directory separators. - Replace('\*', '[^/]*'). # Replace asterisks with a wildcard that cannot span directory separators. - # bug: should be '[^/]' instead of '.' - Replace('\?', '.') # Replace single character wildcards. - New-Object regex -ArgumentList "^$Pattern`$", ([System.Text.RegularExpressions.RegexOptions]::IgnoreCase) -} - -function Get-FileNameFilter { - [CmdletBinding()] - param([string]$Pattern) - - $index = $Pattern.LastIndexOf('\') - if ($index -eq -1 -or # Pattern does not contain a backslash. - !($Pattern = $Pattern.Substring($index + 1)) -or # Pattern ends in a backslash. - $Pattern.Contains('**')) # Last segment contains an inter-segment wildcard. - { - return '*' - } - - # bug? is this supposed to do substring? - return $Pattern -} - -function Get-MatchingItems { - [CmdletBinding()] - param( - [System.Collections.Generic.List[string]]$IncludePatterns, - [System.Collections.Generic.List[regex]]$ExcludePatterns, - [switch]$IncludeFiles, - [switch]$IncludeDirectories, - [switch]$Force) - - Trace-EnteringInvocation $MyInvocation - $allFiles = New-Object System.Collections.Generic.HashSet[string] - foreach ($pattern in $IncludePatterns) { - $pathPrefix = Get-PathPrefix -Pattern $pattern - $fileNameFilter = Get-FileNameFilter -Pattern $pattern - $patternRegex = Convert-PatternToRegex -Pattern $pattern - # Iterate over the directories and files under the pathPrefix. - Get-PathIterator -Path $pathPrefix -Filter $fileNameFilter -IncludeFiles:$IncludeFiles -IncludeDirectories:$IncludeDirectories -Force:$Force | - ForEach-Object { - # Normalize separators. - $normalizedPath = $_.Replace('\', '/') - # **/times/** will not match C:/fun/times because there isn't a trailing slash. - # So try both if including directories. - $alternatePath = "$normalizedPath/" # potential bug: it looks like this will result in a false - # positive if the item is a regular file and not a directory - - $isMatch = $false - if ($patternRegex.IsMatch($normalizedPath) -or ($IncludeDirectories -and $patternRegex.IsMatch($alternatePath))) { - $isMatch = $true - - # Test whether the path should be excluded. - foreach ($regex in $ExcludePatterns) { - if ($regex.IsMatch($normalizedPath) -or ($IncludeDirectories -and $regex.IsMatch($alternatePath))) { - $isMatch = $false - break - } - } - } - - if ($isMatch) { - $null = $allFiles.Add($_) - } - } - } - - Trace-Path -Path $allFiles -PassThru - Trace-LeavingInvocation $MyInvocation -} - -function Get-PathIterator { - [CmdletBinding()] - param( - [string]$Path, - [string]$Filter, - [switch]$IncludeFiles, - [switch]$IncludeDirectories, - [switch]$Force) - - if (!$Path) { - return - } - - # bug: this returns the dir without verifying whether exists - if ($IncludeDirectories) { - $Path - } - - Get-DirectoryChildItem -Path $Path -Filter $Filter -Force:$Force -Recurse | - ForEach-Object { - if ($_.Attributes.HasFlag([VstsTaskSdk.FS.Attributes]::Directory)) { - if ($IncludeDirectories) { - $_.FullName - } - } elseif ($IncludeFiles) { - $_.FullName - } - } -} - -function Get-PathPrefix { - [CmdletBinding()] - param([string]$Pattern) - - # Note, unable to search root directories is a limitation due to subtleties of this function - # and downstream code in Get-PathIterator that short-circuits when the path prefix is empty. - # This function uses Path.GetDirectoryName() to determine the path prefix, which will yield - # empty in some cases. See the following examples of Path.GetDirectoryName() input => output: - # C:/ => - # C:/hello => C:\ - # C:/hello/ => C:\hello - # C:/hello/world => C:\hello - # C:/hello/world/ => C:\hello\world - # C: => - # C:hello => C: - # C:hello/ => C:hello - # / => - # /hello => \ - # /hello/ => \hello - # //hello => - # //hello/ => - # //hello/world => - # //hello/world/ => \\hello\world - - $index = $Pattern.IndexOfAny([char[]]@('*'[0], '?'[0])) - if ($index -eq -1) { - # If no wildcards are found, return the directory name portion of the path. - # If there is no directory name (file name only in pattern), this will return empty string. - return [System.IO.Path]::GetDirectoryName($Pattern) - } - - [System.IO.Path]::GetDirectoryName($Pattern.Substring(0, $index)) -} - -function Test-IsIncludePattern { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [ref]$Pattern) - - # Include patterns start with +: or anything except -: - # Exclude patterns start with -: - if ($Pattern.value.StartsWith("+:")) { - # Remove the prefix. - $Pattern.value = $Pattern.value.Substring(2) - $true - } elseif ($Pattern.value.StartsWith("-:")) { - # Remove the prefix. - $Pattern.value = $Pattern.value.Substring(2) - $false - } else { - # No prefix, so leave the string alone. - $true; - } -} diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LocalizationFunctions.ps1 b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LocalizationFunctions.ps1 deleted file mode 100644 index c31790c..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LocalizationFunctions.ps1 +++ /dev/null @@ -1,150 +0,0 @@ -$script:resourceStrings = @{ } - -<# -.SYNOPSIS -Gets a localized resource string. - -.DESCRIPTION -Gets a localized resource string and optionally formats the string with arguments. - -If the format fails (due to a bad format string or incorrect expected arguments in the format string), then the format string is returned followed by each of the arguments (delimited by a space). - -If the lookup key is not found, then the lookup key is returned followed by each of the arguments (delimited by a space). - -.PARAMETER Require -Writes an error to the error pipeline if the endpoint is not found. -#> -function Get-LocString { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true, Position = 1)] - [string]$Key, - [Parameter(Position = 2)] - [object[]]$ArgumentList = @( )) - - # Due to the dynamically typed nature of PowerShell, a single null argument passed - # to an array parameter is interpreted as a null array. - if ([object]::ReferenceEquals($null, $ArgumentList)) { - $ArgumentList = @( $null ) - } - - # Lookup the format string. - $format = '' - if (!($format = $script:resourceStrings[$Key])) { - # Warn the key was not found. Prevent recursion if the lookup key is the - # "string resource key not found" lookup key. - $resourceNotFoundKey = 'PSLIB_StringResourceKeyNotFound0' - if ($key -ne $resourceNotFoundKey) { - Write-Warning (Get-LocString -Key $resourceNotFoundKey -ArgumentList $Key) - } - - # Fallback to just the key itself if there aren't any arguments to format. - if (!$ArgumentList.Count) { return $key } - - # Otherwise fallback to the key followed by the arguments. - $OFS = " " - return "$key $ArgumentList" - } - - # Return the string if there aren't any arguments to format. - if (!$ArgumentList.Count) { return $format } - - try { - [string]::Format($format, $ArgumentList) - } catch { - Write-Warning (Get-LocString -Key 'PSLIB_StringFormatFailed') - $OFS = " " - "$format $ArgumentList" - } -} - -<# -.SYNOPSIS -Imports resource strings for use with Get-VstsLocString. - -.DESCRIPTION -Imports resource strings for use with Get-VstsLocString. The imported strings are stored in an internal resource string dictionary. Optionally, if a separate resource file for the current culture exists, then the localized strings from that file then imported (overlaid) into the same internal resource string dictionary. - -Resource strings from the SDK are prefixed with "PSLIB_". This prefix should be avoided for custom resource strings. - -.Parameter LiteralPath -JSON file containing resource strings. - -.EXAMPLE -Import-VstsLocStrings -LiteralPath $PSScriptRoot\Task.json - -Imports strings from messages section in the JSON file. If a messages section is not defined, then no strings are imported. Example messages section: -{ - "messages": { - "Hello": "Hello you!", - "Hello0": "Hello {0}!" - } -} - -.EXAMPLE -Import-VstsLocStrings -LiteralPath $PSScriptRoot\Task.json - -Overlays strings from an optional separate resource file for the current culture. - -Given the task variable System.Culture is set to 'de-DE'. This variable is set by the agent based on the current culture for the job. -Given the file Task.json contains: -{ - "messages": { - "GoodDay": "Good day!", - } -} -Given the file resources.resjson\de-DE\resources.resjson: -{ - "loc.messages.GoodDay": "Guten Tag!" -} - -The net result from the import command would be one new key-value pair added to the internal dictionary: Key = 'GoodDay', Value = 'Guten Tag!' -#> -function Import-LocStrings { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$LiteralPath) - - # Validate the file exists. - if (!(Test-Path -LiteralPath $LiteralPath -PathType Leaf)) { - Write-Warning (Get-LocString -Key PSLIB_FileNotFound0 -ArgumentList $LiteralPath) - return - } - - # Load the json. - Write-Verbose "Loading resource strings from: $LiteralPath" - $count = 0 - if ($messages = (Get-Content -LiteralPath $LiteralPath -Encoding UTF8 | Out-String | ConvertFrom-Json).messages) { - # Add each resource string to the hashtable. - foreach ($member in (Get-Member -InputObject $messages -MemberType NoteProperty)) { - [string]$key = $member.Name - $script:resourceStrings[$key] = $messages."$key" - $count++ - } - } - - Write-Verbose "Loaded $count strings." - - # Get the culture. - $culture = Get-TaskVariable -Name "System.Culture" -Default "en-US" - - # Load the resjson. - $resjsonPath = "$([System.IO.Path]::GetDirectoryName($LiteralPath))\Strings\resources.resjson\$culture\resources.resjson" - if (Test-Path -LiteralPath $resjsonPath) { - Write-Verbose "Loading resource strings from: $resjsonPath" - $count = 0 - $resjson = Get-Content -LiteralPath $resjsonPath -Encoding UTF8 | Out-String | ConvertFrom-Json - foreach ($member in (Get-Member -Name loc.messages.* -InputObject $resjson -MemberType NoteProperty)) { - if (!($value = $resjson."$($member.Name)")) { - continue - } - - [string]$key = $member.Name.Substring('loc.messages.'.Length) - $script:resourceStrings[$key] = $value - $count++ - } - - Write-Verbose "Loaded $count strings." - } -} diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LoggingCommandFunctions.ps1 b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LoggingCommandFunctions.ps1 deleted file mode 100644 index 595a7d8..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LoggingCommandFunctions.ps1 +++ /dev/null @@ -1,601 +0,0 @@ -$script:loggingCommandPrefix = '##vso[' -$script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"? - New-Object psobject -Property @{ Token = ';' ; Replacement = '%3B' } - New-Object psobject -Property @{ Token = "`r" ; Replacement = '%0D' } - New-Object psobject -Property @{ Token = "`n" ; Replacement = '%0A' } - New-Object psobject -Property @{ Token = "]" ; Replacement = '%5D' } -) -# TODO: BUG: Escape % ??? -# TODO: Add test to verify don't need to escape "=". - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-AddAttachment { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Type, - [Parameter(Mandatory = $true)] - [string]$Name, - [Parameter(Mandatory = $true)] - [string]$Path, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'task' -Event 'addattachment' -Data $Path -Properties @{ - 'type' = $Type - 'name' = $Name - } -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-UploadSummary { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Path, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'task' -Event 'uploadsummary' -Data $Path -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-SetEndpoint { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Id, - [Parameter(Mandatory = $true)] - [string]$Field, - [Parameter(Mandatory = $true)] - [string]$Key, - [Parameter(Mandatory = $true)] - [string]$Value, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'task' -Event 'setendpoint' -Data $Value -Properties @{ - 'id' = $Id - 'field' = $Field - 'key' = $Key - } -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-AddBuildTag { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Value, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'build' -Event 'addbuildtag' -Data $Value -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-AssociateArtifact { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Name, - [Parameter(Mandatory = $true)] - [string]$Path, - [Parameter(Mandatory = $true)] - [string]$Type, - [hashtable]$Properties, - [switch]$AsOutput) - - $p = @{ } - if ($Properties) { - foreach ($key in $Properties.Keys) { - $p[$key] = $Properties[$key] - } - } - - $p['artifactname'] = $Name - $p['artifacttype'] = $Type - Write-LoggingCommand -Area 'artifact' -Event 'associate' -Data $Path -Properties $p -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-LogDetail { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [guid]$Id, - $ParentId, - [string]$Type, - [string]$Name, - $Order, - $StartTime, - $FinishTime, - $Progress, - [ValidateSet('Unknown', 'Initialized', 'InProgress', 'Completed')] - [Parameter()] - $State, - [ValidateSet('Succeeded', 'SucceededWithIssues', 'Failed', 'Cancelled', 'Skipped')] - [Parameter()] - $Result, - [string]$Message, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'task' -Event 'logdetail' -Data $Message -Properties @{ - 'id' = $Id - 'parentid' = $ParentId - 'type' = $Type - 'name' = $Name - 'order' = $Order - 'starttime' = $StartTime - 'finishtime' = $FinishTime - 'progress' = $Progress - 'state' = $State - 'result' = $Result - } -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-SetProgress { - [CmdletBinding()] - param( - [ValidateRange(0, 100)] - [Parameter(Mandatory = $true)] - [int]$Percent, - [string]$CurrentOperation, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'task' -Event 'setprogress' -Data $CurrentOperation -Properties @{ - 'value' = $Percent - } -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-SetResult { - [CmdletBinding(DefaultParameterSetName = 'AsOutput')] - param( - [ValidateSet("Succeeded", "SucceededWithIssues", "Failed", "Cancelled", "Skipped")] - [Parameter(Mandatory = $true)] - [string]$Result, - [string]$Message, - [Parameter(ParameterSetName = 'AsOutput')] - [switch]$AsOutput, - [Parameter(ParameterSetName = 'DoNotThrow')] - [switch]$DoNotThrow) - - Write-LoggingCommand -Area 'task' -Event 'complete' -Data $Message -Properties @{ - 'result' = $Result - } -AsOutput:$AsOutput - if ($Result -eq 'Failed' -and !$AsOutput -and !$DoNotThrow) { - # Special internal exception type to control the flow. Not currently intended - # for public usage and subject to change. - throw (New-Object VstsTaskSdk.TerminationException($Message)) - } -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-SetSecret { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Value, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'task' -Event 'setsecret' -Data $Value -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-SetVariable { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Name, - [string]$Value, - [switch]$Secret, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{ - 'variable' = $Name - 'issecret' = $Secret - } -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-TaskDebug { - [CmdletBinding()] - param( - [string]$Message, - [switch]$AsOutput) - - Write-TaskDebug_Internal @PSBoundParameters -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-TaskError { - [CmdletBinding()] - param( - [string]$Message, - [string]$ErrCode, - [string]$SourcePath, - [string]$LineNumber, - [string]$ColumnNumber, - [switch]$AsOutput) - - Write-LogIssue -Type error @PSBoundParameters -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-TaskVerbose { - [CmdletBinding()] - param( - [string]$Message, - [switch]$AsOutput) - - Write-TaskDebug_Internal @PSBoundParameters -AsVerbose -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-TaskWarning { - [CmdletBinding()] - param( - [string]$Message, - [string]$ErrCode, - [string]$SourcePath, - [string]$LineNumber, - [string]$ColumnNumber, - [switch]$AsOutput) - - Write-LogIssue -Type warning @PSBoundParameters -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-UploadFile { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Path, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'task' -Event 'uploadfile' -Data $Path -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-PrependPath { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Path, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-UpdateBuildNumber { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Value, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'build' -Event 'updatebuildnumber' -Data $Value -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-UploadArtifact { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$ContainerFolder, - [Parameter(Mandatory = $true)] - [string]$Name, - [Parameter(Mandatory = $true)] - [string]$Path, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'artifact' -Event 'upload' -Data $Path -Properties @{ - 'containerfolder' = $ContainerFolder - 'artifactname' = $Name - } -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-UploadBuildLog { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Path, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'build' -Event 'uploadlog' -Data $Path -AsOutput:$AsOutput -} - -<# -.SYNOPSIS -See https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md - -.PARAMETER AsOutput -Indicates whether to write the logging command directly to the host or to the output pipeline. -#> -function Write-UpdateReleaseName { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Name, - [switch]$AsOutput) - - Write-LoggingCommand -Area 'release' -Event 'updatereleasename' -Data $Name -AsOutput:$AsOutput -} - -######################################## -# Private functions. -######################################## -function Format-LoggingCommandData { - [CmdletBinding()] - param([string]$Value, [switch]$Reverse) - - if (!$Value) { - return '' - } - - if (!$Reverse) { - foreach ($mapping in $script:loggingCommandEscapeMappings) { - $Value = $Value.Replace($mapping.Token, $mapping.Replacement) - } - } else { - for ($i = $script:loggingCommandEscapeMappings.Length - 1 ; $i -ge 0 ; $i--) { - $mapping = $script:loggingCommandEscapeMappings[$i] - $Value = $Value.Replace($mapping.Replacement, $mapping.Token) - } - } - - return $Value -} - -function Format-LoggingCommand { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Area, - [Parameter(Mandatory = $true)] - [string]$Event, - [string]$Data, - [hashtable]$Properties) - - # Append the preamble. - [System.Text.StringBuilder]$sb = New-Object -TypeName System.Text.StringBuilder - $null = $sb.Append($script:loggingCommandPrefix).Append($Area).Append('.').Append($Event) - - # Append the properties. - if ($Properties) { - $first = $true - foreach ($key in $Properties.Keys) { - [string]$value = Format-LoggingCommandData $Properties[$key] - if ($value) { - if ($first) { - $null = $sb.Append(' ') - $first = $false - } else { - $null = $sb.Append(';') - } - - $null = $sb.Append("$key=$value") - } - } - } - - # Append the tail and output the value. - $Data = Format-LoggingCommandData $Data - $sb.Append(']').Append($Data).ToString() -} - -function Write-LoggingCommand { - [CmdletBinding(DefaultParameterSetName = 'Parameters')] - param( - [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')] - [string]$Area, - [Parameter(Mandatory = $true, ParameterSetName = 'Parameters')] - [string]$Event, - [Parameter(ParameterSetName = 'Parameters')] - [string]$Data, - [Parameter(ParameterSetName = 'Parameters')] - [hashtable]$Properties, - [Parameter(Mandatory = $true, ParameterSetName = 'Object')] - $Command, - [switch]$AsOutput) - - if ($PSCmdlet.ParameterSetName -eq 'Object') { - Write-LoggingCommand -Area $Command.Area -Event $Command.Event -Data $Command.Data -Properties $Command.Properties -AsOutput:$AsOutput - return - } - - $command = Format-LoggingCommand -Area $Area -Event $Event -Data $Data -Properties $Properties - if ($AsOutput) { - $command - } else { - Write-Host $command - } -} - -function Write-LogIssue { - [CmdletBinding()] - param( - [ValidateSet('warning', 'error')] - [Parameter(Mandatory = $true)] - [string]$Type, - [string]$Message, - [string]$ErrCode, - [string]$SourcePath, - [string]$LineNumber, - [string]$ColumnNumber, - [switch]$AsOutput) - - $command = Format-LoggingCommand -Area 'task' -Event 'logissue' -Data $Message -Properties @{ - 'type' = $Type - 'code' = $ErrCode - 'sourcepath' = $SourcePath - 'linenumber' = $LineNumber - 'columnnumber' = $ColumnNumber - } - if ($AsOutput) { - return $command - } - - if ($Type -eq 'error') { - $foregroundColor = $host.PrivateData.ErrorForegroundColor - $backgroundColor = $host.PrivateData.ErrorBackgroundColor - if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { - $foregroundColor = [System.ConsoleColor]::Red - $backgroundColor = [System.ConsoleColor]::Black - } - } else { - $foregroundColor = $host.PrivateData.WarningForegroundColor - $backgroundColor = $host.PrivateData.WarningBackgroundColor - if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { - $foregroundColor = [System.ConsoleColor]::Yellow - $backgroundColor = [System.ConsoleColor]::Black - } - } - - Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor -} - -function Write-TaskDebug_Internal { - [CmdletBinding()] - param( - [string]$Message, - [switch]$AsVerbose, - [switch]$AsOutput) - - $command = Format-LoggingCommand -Area 'task' -Event 'debug' -Data $Message - if ($AsOutput) { - return $command - } - - if ($AsVerbose) { - $foregroundColor = $host.PrivateData.VerboseForegroundColor - $backgroundColor = $host.PrivateData.VerboseBackgroundColor - if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { - $foregroundColor = [System.ConsoleColor]::Cyan - $backgroundColor = [System.ConsoleColor]::Black - } - } else { - $foregroundColor = $host.PrivateData.DebugForegroundColor - $backgroundColor = $host.PrivateData.DebugBackgroundColor - if ($foregroundColor -isnot [System.ConsoleColor] -or $backgroundColor -isnot [System.ConsoleColor]) { - $foregroundColor = [System.ConsoleColor]::DarkGray - $backgroundColor = [System.ConsoleColor]::Black - } - } - - Write-Host -Object $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor -} diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LongPathFunctions.ps1 b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LongPathFunctions.ps1 deleted file mode 100644 index d536111..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/LongPathFunctions.ps1 +++ /dev/null @@ -1,205 +0,0 @@ -######################################## -# Private functions. -######################################## -function ConvertFrom-LongFormPath { - [CmdletBinding()] - param([string]$Path) - - if ($Path) { - if ($Path.StartsWith('\\?\UNC')) { - # E.g. \\?\UNC\server\share -> \\server\share - return $Path.Substring(1, '\?\UNC'.Length) - } elseif ($Path.StartsWith('\\?\')) { - # E.g. \\?\C:\directory -> C:\directory - return $Path.Substring('\\?\'.Length) - } - } - - return $Path -} -function ConvertTo-LongFormPath { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Path) - - [string]$longFormPath = Get-FullNormalizedPath -Path $Path - if ($longFormPath -and !$longFormPath.StartsWith('\\?')) { - if ($longFormPath.StartsWith('\\')) { - # E.g. \\server\share -> \\?\UNC\server\share - return "\\?\UNC$($longFormPath.Substring(1))" - } else { - # E.g. C:\directory -> \\?\C:\directory - return "\\?\$longFormPath" - } - } - - return $longFormPath -} - -# TODO: ADD A SWITCH TO EXCLUDE FILES, A SWITCH TO EXCLUDE DIRECTORIES, AND A SWITCH NOT TO FOLLOW REPARSE POINTS. -function Get-DirectoryChildItem { - [CmdletBinding()] - param( - [string]$Path, - [ValidateNotNullOrEmpty()] - [Parameter()] - [string]$Filter = "*", - [switch]$Force, - [VstsTaskSdk.FS.FindFlags]$Flags = [VstsTaskSdk.FS.FindFlags]::LargeFetch, - [VstsTaskSdk.FS.FindInfoLevel]$InfoLevel = [VstsTaskSdk.FS.FindInfoLevel]::Basic, - [switch]$Recurse) - - $stackOfDirectoryQueues = New-Object System.Collections.Stack - while ($true) { - $directoryQueue = New-Object System.Collections.Queue - $fileQueue = New-Object System.Collections.Queue - $findData = New-Object VstsTaskSdk.FS.FindData - $longFormPath = (ConvertTo-LongFormPath $Path) - $handle = $null - try { - $handle = [VstsTaskSdk.FS.NativeMethods]::FindFirstFileEx( - [System.IO.Path]::Combine($longFormPath, $Filter), - $InfoLevel, - $findData, - [VstsTaskSdk.FS.FindSearchOps]::NameMatch, - [System.IntPtr]::Zero, - $Flags) - if (!$handle.IsInvalid) { - while ($true) { - if ($findData.fileName -notin '.', '..') { - $attributes = [VstsTaskSdk.FS.Attributes]$findData.fileAttributes - # If the item is hidden, check if $Force is specified. - if ($Force -or !$attributes.HasFlag([VstsTaskSdk.FS.Attributes]::Hidden)) { - # Create the item. - $item = New-Object -TypeName psobject -Property @{ - 'Attributes' = $attributes - 'FullName' = (ConvertFrom-LongFormPath -Path ([System.IO.Path]::Combine($Path, $findData.fileName))) - 'Name' = $findData.fileName - } - # Output directories immediately. - if ($item.Attributes.HasFlag([VstsTaskSdk.FS.Attributes]::Directory)) { - $item - # Append to the directory queue if recursive and default filter. - if ($Recurse -and $Filter -eq '*') { - $directoryQueue.Enqueue($item) - } - } else { - # Hold the files until all directories have been output. - $fileQueue.Enqueue($item) - } - } - } - - if (!([VstsTaskSdk.FS.NativeMethods]::FindNextFile($handle, $findData))) { break } - - if ($handle.IsInvalid) { - throw (New-Object -TypeName System.ComponentModel.Win32Exception -ArgumentList @( - [System.Runtime.InteropServices.Marshal]::GetLastWin32Error() - Get-LocString -Key PSLIB_EnumeratingSubdirectoriesFailedForPath0 -ArgumentList $Path - )) - } - } - } - } finally { - if ($handle -ne $null) { $handle.Dispose() } - } - - # If recursive and non-default filter, queue child directories. - if ($Recurse -and $Filter -ne '*') { - $findData = New-Object VstsTaskSdk.FS.FindData - $handle = $null - try { - $handle = [VstsTaskSdk.FS.NativeMethods]::FindFirstFileEx( - [System.IO.Path]::Combine($longFormPath, '*'), - [VstsTaskSdk.FS.FindInfoLevel]::Basic, - $findData, - [VstsTaskSdk.FS.FindSearchOps]::NameMatch, - [System.IntPtr]::Zero, - $Flags) - if (!$handle.IsInvalid) { - while ($true) { - if ($findData.fileName -notin '.', '..') { - $attributes = [VstsTaskSdk.FS.Attributes]$findData.fileAttributes - # If the item is hidden, check if $Force is specified. - if ($Force -or !$attributes.HasFlag([VstsTaskSdk.FS.Attributes]::Hidden)) { - # Collect directories only. - if ($attributes.HasFlag([VstsTaskSdk.FS.Attributes]::Directory)) { - # Create the item. - $item = New-Object -TypeName psobject -Property @{ - 'Attributes' = $attributes - 'FullName' = (ConvertFrom-LongFormPath -Path ([System.IO.Path]::Combine($Path, $findData.fileName))) - 'Name' = $findData.fileName - } - $directoryQueue.Enqueue($item) - } - } - } - - if (!([VstsTaskSdk.FS.NativeMethods]::FindNextFile($handle, $findData))) { break } - - if ($handle.IsInvalid) { - throw (New-Object -TypeName System.ComponentModel.Win32Exception -ArgumentList @( - [System.Runtime.InteropServices.Marshal]::GetLastWin32Error() - Get-LocString -Key PSLIB_EnumeratingSubdirectoriesFailedForPath0 -ArgumentList $Path - )) - } - } - } - } finally { - if ($handle -ne $null) { $handle.Dispose() } - } - } - - # Output the files. - $fileQueue - - # Push the directory queue onto the stack if any directories were found. - if ($directoryQueue.Count) { $stackOfDirectoryQueues.Push($directoryQueue) } - - # Break out of the loop if no more directory queues to process. - if (!$stackOfDirectoryQueues.Count) { break } - - # Get the next path. - $directoryQueue = $stackOfDirectoryQueues.Peek() - $Path = $directoryQueue.Dequeue().FullName - - # Pop the directory queue if it's empty. - if (!$directoryQueue.Count) { $null = $stackOfDirectoryQueues.Pop() } - } -} - -function Get-FullNormalizedPath { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$Path) - - [string]$outPath = $Path - [uint32]$bufferSize = [VstsTaskSdk.FS.NativeMethods]::GetFullPathName($Path, 0, $null, $null) - [int]$lastWin32Error = [System.Runtime.InteropServices.Marshal]::GetLastWin32Error() - if ($bufferSize -gt 0) { - $absolutePath = New-Object System.Text.StringBuilder([int]$bufferSize) - [uint32]$length = [VstsTaskSdk.FS.NativeMethods]::GetFullPathName($Path, $bufferSize, $absolutePath, $null) - $lastWin32Error = [System.Runtime.InteropServices.Marshal]::GetLastWin32Error() - if ($length -gt 0) { - $outPath = $absolutePath.ToString() - } else { - throw (New-Object -TypeName System.ComponentModel.Win32Exception -ArgumentList @( - $lastWin32Error - Get-LocString -Key PSLIB_PathLengthNotReturnedFor0 -ArgumentList $Path - )) - } - } else { - throw (New-Object -TypeName System.ComponentModel.Win32Exception -ArgumentList @( - $lastWin32Error - Get-LocString -Key PSLIB_PathLengthNotReturnedFor0 -ArgumentList $Path - )) - } - - if ($outPath.EndsWith('\') -and !$outPath.EndsWith(':\')) { - $outPath = $outPath.TrimEnd('\') - } - - $outPath -} \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Minimatch.dll b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Minimatch.dll deleted file mode 100644 index 700ddc426e56b08270c9dcbb1ade8ded248f98d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18432 zcmeHvd3amZweLFTNJpa;OY%U-U;wdJ(iE<^0Dr1eX+yVU^ZP<}CerFP{^D;NRAvpy{Upu7qdr-p#QQK0A=EE z*j@RF!K$=fum`{t+x7$Dj;_a3@mYu3X*)Y&L6B{wNj$7;1D=Y{x>+@ezQumUhi%iz zO@BY1=+-!qPq<}p%U-3n%sDf*P#@P|Wa1p%m=FXEn4%bhfB`=%h9F>|Q;H!781527 z5HJu1N4U|d+S*S|6A90AA zkcdZ#{0VeB+M>~Zr~5WKIT}ZR`3qry$+Mxw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Hg|Sx z`{tfwk3Rjs-`(@)7u#+*@b2&fb<3*0nqD`t;EumPyk`7E?55KHhkzXnS5bT)o=#3d z-F+{9yXNOFH5^~}{vRh_efj-=znQJ>TG@X|0T&zneSN+C-Px<~SNNlRlIX`lH6K&= zS^XHJY=2iHztz#b0<#WW(T^L9EUuHv-1O++0s1PME`6S3JXWHnze|6@uekfVEW3MT zWD8De>Y6p1mBYT2o^FDY>gm-hDgI`N@NExGR&rJ1CG65?^I2{ao?ZKiy45!v%mU6o z{-pd7xp#x)`K^9S*368ckzJK@|eeCHK|wh@#b0Crf~9w6M#pe4dt zz?`bfXOcXA%di!1*2AAZ>IHR3^sUCXQ`(eW-H<5Yn`5?jbXtG5NDp!qZSh!nE9zb< ztrseM(26}cKP~cbpO68?i={JC27M@7HoJ{94MJiBHg6Jt^rDR+*ghhj8AZR?(joL5 zXRI^uV)Ov~6T{i41(qQF;Jm}5U)G~Wa1eUgi?-tx2;$Q%_HJ|9;1T4OOVPlT^5`4c zy-fVO9Xc%ZWemP8R`eKu26_g+E)%~_uQSuTGkx13bviM61?kHHSb7va|F7z)p8hw( X?dtd6e<)43|K{fYzxw~TJn(-2*CUr_ diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/OutFunctions.ps1 b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/OutFunctions.ps1 deleted file mode 100644 index fd898d6..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/OutFunctions.ps1 +++ /dev/null @@ -1,79 +0,0 @@ -# TODO: It would be better if the Out-Default function resolved the underlying Out-Default -# command in the begin block. This would allow for supporting other modules that override -# Out-Default. -$script:outDefaultCmdlet = $ExecutionContext.InvokeCommand.GetCmdlet("Microsoft.PowerShell.Core\Out-Default") - -######################################## -# Public functions. -######################################## -function Out-Default { - [CmdletBinding(ConfirmImpact = "Medium")] - param( - [Parameter(ValueFromPipeline = $true)] - [System.Management.Automation.PSObject]$InputObject) - - begin { - #Write-Host '[Entering Begin Out-Default]' - $__sp = { & $script:outDefaultCmdlet @PSBoundParameters }.GetSteppablePipeline() - $__sp.Begin($pscmdlet) - #Write-Host '[Leaving Begin Out-Default]' - } - - process { - #Write-Host '[Entering Process Out-Default]' - if ($_ -is [System.Management.Automation.ErrorRecord]) { - Write-Verbose -Message 'Error record:' 4>&1 | Out-Default - Write-Verbose -Message (Remove-TrailingNewLine (Out-String -InputObject $_ -Width 2147483647)) 4>&1 | Out-Default - Write-Verbose -Message 'Script stack trace:' 4>&1 | Out-Default - Write-Verbose -Message "$($_.ScriptStackTrace)" 4>&1 | Out-Default - Write-Verbose -Message 'Exception:' 4>&1 | Out-Default - Write-Verbose -Message $_.Exception.ToString() 4>&1 | Out-Default - Write-TaskError -Message $_.Exception.Message - } elseif ($_ -is [System.Management.Automation.WarningRecord]) { - Write-TaskWarning -Message (Remove-TrailingNewLine (Out-String -InputObject $_ -Width 2147483647)) - } elseif ($_ -is [System.Management.Automation.VerboseRecord] -and !$global:__vstsNoOverrideVerbose) { - foreach ($private:str in (Format-DebugMessage -Object $_)) { - Write-TaskVerbose -Message $private:str - } - } elseif ($_ -is [System.Management.Automation.DebugRecord] -and !$global:__vstsNoOverrideVerbose) { - foreach ($private:str in (Format-DebugMessage -Object $_)) { - Write-TaskDebug -Message $private:str - } - } else { -# TODO: Consider using out-string here to control the width. As a security precaution it would actually be best to set it to max so wrapping doesn't interfere with secret masking. - $__sp.Process($_) - } - - #Write-Host '[Leaving Process Out-Default]' - } - - end { - #Write-Host '[Entering End Out-Default]' - $__sp.End() - #Write-Host '[Leaving End Out-Default]' - } -} - -######################################## -# Private functions. -######################################## -function Format-DebugMessage { - [CmdletBinding()] - param([psobject]$Object) - - $private:str = Out-String -InputObject $Object -Width 2147483647 - $private:str = Remove-TrailingNewLine $private:str - "$private:str".Replace("`r`n", "`n").Replace("`r", "`n").Split("`n"[0]) -} - -function Remove-TrailingNewLine { - [CmdletBinding()] - param($Str) - if ([object]::ReferenceEquals($Str, $null)) { - return $Str - } elseif ($Str.EndsWith("`r`n")) { - return $Str.Substring(0, $Str.Length - 2) - } else { - return $Str - } -} diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/PSGetModuleInfo.xml b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/PSGetModuleInfo.xml deleted file mode 100644 index 73e3b3c..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/PSGetModuleInfo.xml +++ /dev/null @@ -1,215 +0,0 @@ - - - - Microsoft.PowerShell.Commands.PSRepositoryItemInfo - System.Management.Automation.PSCustomObject - System.Object - - - VstsTaskSdk - 0.11.0 - Module - VSTS Task SDK - Microsoft - - - System.Management.Automation.PSCustomObject - System.Object - - - (c) 2016 Microsoft. All rights reserved. -
2018-05-21T03:27:56-05:00
- - - - https://github.com/Microsoft/vsts-task-lib - - - - System.Object[] - System.Array - System.Object - - - PSModule - - - - - System.Collections.Hashtable - System.Object - - - - Function - - - - Find-Match - New-FindOptions - New-MatchOptions - Select-Match - Get-Endpoint - Get-SecureFileTicket - Get-SecureFileName - Get-Input - Get-TaskVariable - Get-TaskVariableInfo - Set-TaskVariable - Find-Files - Get-LocString - Import-LocStrings - Write-AddAttachment - Write-AddBuildTag - Write-AssociateArtifact - Write-LogDetail - Write-PrependPath - Write-SetEndpoint - Write-SetProgress - Write-SetResult - Write-SetSecret - Write-SetVariable - Write-TaskDebug - Write-TaskError - Write-TaskVerbose - Write-TaskWarning - Write-UpdateBuildNumber - Write-UpdateReleaseName - Write-UploadArtifact - Write-UploadBuildLog - Write-UploadFile - Write-UploadSummary - Out-Default - Get-AssemblyReference - Get-TfsClientCredentials - Get-TfsService - Get-VssCredentials - Get-VssHttpClient - Assert-Agent - Assert-Path - Invoke-Tool - Trace-EnteringInvocation - Trace-LeavingInvocation - Trace-Path - Get-WebProxy - Get-ClientCertificate - - - - - DscResource - - - - - - - Cmdlet - - - - Command - - - - Find-Match - New-FindOptions - New-MatchOptions - Select-Match - Get-Endpoint - Get-SecureFileTicket - Get-SecureFileName - Get-Input - Get-TaskVariable - Get-TaskVariableInfo - Set-TaskVariable - Find-Files - Get-LocString - Import-LocStrings - Write-AddAttachment - Write-AddBuildTag - Write-AssociateArtifact - Write-LogDetail - Write-PrependPath - Write-SetEndpoint - Write-SetProgress - Write-SetResult - Write-SetSecret - Write-SetVariable - Write-TaskDebug - Write-TaskError - Write-TaskVerbose - Write-TaskWarning - Write-UpdateBuildNumber - Write-UpdateReleaseName - Write-UploadArtifact - Write-UploadBuildLog - Write-UploadFile - Write-UploadSummary - Out-Default - Get-AssemblyReference - Get-TfsClientCredentials - Get-TfsService - Get-VssCredentials - Get-VssHttpClient - Assert-Agent - Assert-Path - Invoke-Tool - Trace-EnteringInvocation - Trace-LeavingInvocation - Trace-Path - Get-WebProxy - Get-ClientCertificate - - - - - Workflow - - - - RoleCapability - - - - - - - - - - - https://www.powershellgallery.com/api/v2 - PSGallery - NuGet - - - - (c) 2016 Microsoft. All rights reserved. - VSTS Task SDK - False - True - True - 8808 - 121463 - 71074 - 5/21/18 3:27:56 AM -05:00 - 5/21/18 3:27:56 AM -05:00 - 9/27/18 1:30:18 AM -05:00 - PSModule PSFunction_Find-Match PSCommand_Find-Match PSFunction_New-FindOptions PSCommand_New-FindOptions PSFunction_New-MatchOptions PSCommand_New-MatchOptions PSFunction_Select-Match PSCommand_Select-Match PSFunction_Get-Endpoint PSCommand_Get-Endpoint PSFunction_Get-SecureFileTicket PSCommand_Get-SecureFileTicket PSFunction_Get-SecureFileName PSCommand_Get-SecureFileName PSFunction_Get-Input PSCommand_Get-Input PSFunction_Get-TaskVariable PSCommand_Get-TaskVariable PSFunction_Get-TaskVariableInfo PSCommand_Get-TaskVariableInfo PSFunction_Set-TaskVariable PSCommand_Set-TaskVariable PSFunction_Find-Files PSCommand_Find-Files PSFunction_Get-LocString PSCommand_Get-LocString PSFunction_Import-LocStrings PSCommand_Import-LocStrings PSFunction_Write-AddAttachment PSCommand_Write-AddAttachment PSFunction_Write-AddBuildTag PSCommand_Write-AddBuildTag PSFunction_Write-AssociateArtifact PSCommand_Write-AssociateArtifact PSFunction_Write-LogDetail PSCommand_Write-LogDetail PSFunction_Write-PrependPath PSCommand_Write-PrependPath PSFunction_Write-SetEndpoint PSCommand_Write-SetEndpoint PSFunction_Write-SetProgress PSCommand_Write-SetProgress PSFunction_Write-SetResult PSCommand_Write-SetResult PSFunction_Write-SetSecret PSCommand_Write-SetSecret PSFunction_Write-SetVariable PSCommand_Write-SetVariable PSFunction_Write-TaskDebug PSCommand_Write-TaskDebug PSFunction_Write-TaskError PSCommand_Write-TaskError PSFunction_Write-TaskVerbose PSCommand_Write-TaskVerbose PSFunction_Write-TaskWarning PSCommand_Write-TaskWarning PSFunction_Write-UpdateBuildNumber PSCommand_Write-UpdateBuildNumber PSFunction_Write-UpdateReleaseName PSCommand_Write-UpdateReleaseName PSFunction_Write-UploadArtifact PSCommand_Write-UploadArtifact PSFunction_Write-UploadBuildLog PSCommand_Write-UploadBuildLog PSFunction_Write-UploadFile PSCommand_Write-UploadFile PSFunction_Write-UploadSummary PSCommand_Write-UploadSummary PSFunction_Out-Default PSCommand_Out-Default PSFunction_Get-AssemblyReference PSCommand_Get-AssemblyReference PSFunction_Get-TfsClientCredentials PSCommand_Get-TfsClientCredentials PSFunction_Get-TfsService PSCommand_Get-TfsService PSFunction_Get-VssCredentials PSCommand_Get-VssCredentials PSFunction_Get-VssHttpClient PSCommand_Get-VssHttpClient PSFunction_Assert-Agent PSCommand_Assert-Agent PSFunction_Assert-Path PSCommand_Assert-Path PSFunction_Invoke-Tool PSCommand_Invoke-Tool PSFunction_Trace-EnteringInvocation PSCommand_Trace-EnteringInvocation PSFunction_Trace-LeavingInvocation PSCommand_Trace-LeavingInvocation PSFunction_Trace-Path PSCommand_Trace-Path PSFunction_Get-WebProxy PSCommand_Get-WebProxy PSFunction_Get-ClientCertificate PSCommand_Get-ClientCertificate PSIncludes_Function - False - 2018-09-27T01:30:18Z - 0.11.0 - Microsoft - false - Module - VstsTaskSdk.nuspec|FindFunctions.ps1|InputFunctions.ps1|LegacyFindFunctions.ps1|lib.json|LocalizationFunctions.ps1|LoggingCommandFunctions.ps1|LongPathFunctions.ps1|Minimatch.dll|OutFunctions.ps1|ServerOMFunctions.ps1|ToolFunctions.ps1|TraceFunctions.ps1|VstsTaskSdk.dll|VstsTaskSdk.psd1|VstsTaskSdk.psm1|Strings\resources.resjson\de-de\resources.resjson|Strings\resources.resjson\en-US\resources.resjson|Strings\resources.resjson\es-es\resources.resjson|Strings\resources.resjson\fr-fr\resources.resjson|Strings\resources.resjson\it-IT\resources.resjson|Strings\resources.resjson\ja-jp\resources.resjson|Strings\resources.resjson\ko-KR\resources.resjson|Strings\resources.resjson\ru-RU\resources.resjson|Strings\resources.resjson\zh-CN\resources.resjson|Strings\resources.resjson\zh-TW\resources.resjson - bbed04e2-4e8e-4089-90a2-58b858fed8d8 - 3.0 - Microsoft - - - /Users/EJ/git/dependencycheck-azuredevops/src/Tasks/dependency-check-build-task/VstsTaskSdk/0.11.0 -
-
-
diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/ServerOMFunctions.ps1 b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/ServerOMFunctions.ps1 deleted file mode 100644 index 177820b..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/ServerOMFunctions.ps1 +++ /dev/null @@ -1,659 +0,0 @@ -<# -.SYNOPSIS -Gets assembly reference information. - -.DESCRIPTION -Not supported for use during task execution. This function is only intended to help developers resolve the minimal set of DLLs that need to be bundled when consuming the VSTS REST SDK or TFS Extended Client SDK. The interface and output may change between patch releases of the VSTS Task SDK. - -Only a subset of the referenced assemblies may actually be required, depending on the functionality used by your task. It is best to bundle only the DLLs required for your scenario. - -Walks an assembly's references to determine all of it's dependencies. Also walks the references of the dependencies, and so on until all nested dependencies have been traversed. Dependencies are searched for in the directory of the specified assembly. NET Framework assemblies are omitted. - -See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task. - -.PARAMETER LiteralPath -Assembly to walk. - -.EXAMPLE -Get-VstsAssemblyReference -LiteralPath C:\nuget\microsoft.teamfoundationserver.client.14.102.0\lib\net45\Microsoft.TeamFoundation.Build2.WebApi.dll -#> -function Get-AssemblyReference { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$LiteralPath) - - $ErrorActionPreference = 'Stop' - Write-Warning "Not supported for use during task execution. This function is only intended to help developers resolve the minimal set of DLLs that need to be bundled when consuming the VSTS REST SDK or TFS Extended Client SDK. The interface and output may change between patch releases of the VSTS Task SDK." - Write-Output '' - Write-Warning "Only a subset of the referenced assemblies may actually be required, depending on the functionality used by your task. It is best to bundle only the DLLs required for your scenario." - $directory = [System.IO.Path]::GetDirectoryName($LiteralPath) - $hashtable = @{ } - $queue = @( [System.Reflection.Assembly]::ReflectionOnlyLoadFrom($LiteralPath).GetName() ) - while ($queue.Count) { - # Add a blank line between assemblies. - Write-Output '' - - # Pop. - $assemblyName = $queue[0] - $queue = @( $queue | Select-Object -Skip 1 ) - - # Attempt to find the assembly in the same directory. - $assembly = $null - $path = "$directory\$($assemblyName.Name).dll" - if ((Test-Path -LiteralPath $path -PathType Leaf)) { - $assembly = [System.Reflection.Assembly]::ReflectionOnlyLoadFrom($path) - } else { - $path = "$directory\$($assemblyName.Name).exe" - if ((Test-Path -LiteralPath $path -PathType Leaf)) { - $assembly = [System.Reflection.Assembly]::ReflectionOnlyLoadFrom($path) - } - } - - # Make sure the assembly full name matches, not just the file name. - if ($assembly -and $assembly.GetName().FullName -ne $assemblyName.FullName) { - $assembly = $null - } - - # Print the assembly. - if ($assembly) { - Write-Output $assemblyName.FullName - } else { - if ($assemblyName.FullName -eq 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed') { - Write-Warning "*** NOT FOUND $($assemblyName.FullName) *** This is an expected condition when using the HTTP clients from the 15.x VSTS REST SDK. Use Get-VstsVssHttpClient to load the HTTP clients (which applies a binding redirect assembly resolver for Newtonsoft.Json). Otherwise you will need to manage the binding redirect yourself." - } else { - Write-Warning "*** NOT FOUND $($assemblyName.FullName) ***" - } - - continue - } - - # Walk the references. - $refAssemblyNames = @( $assembly.GetReferencedAssemblies() ) - for ($i = 0 ; $i -lt $refAssemblyNames.Count ; $i++) { - $refAssemblyName = $refAssemblyNames[$i] - - # Skip framework assemblies. - $fxPaths = @( - "$env:windir\Microsoft.Net\Framework64\v4.0.30319\$($refAssemblyName.Name).dll" - "$env:windir\Microsoft.Net\Framework64\v4.0.30319\WPF\$($refAssemblyName.Name).dll" - ) - $fxPath = $fxPaths | - Where-Object { Test-Path -LiteralPath $_ -PathType Leaf } | - Where-Object { [System.Reflection.Assembly]::ReflectionOnlyLoadFrom($_).GetName().FullName -eq $refAssemblyName.FullName } - if ($fxPath) { - continue - } - - # Print the reference. - Write-Output " $($refAssemblyName.FullName)" - - # Add new references to the queue. - if (!$hashtable[$refAssemblyName.FullName]) { - $queue += $refAssemblyName - $hashtable[$refAssemblyName.FullName] = $true - } - } - } -} - -<# -.SYNOPSIS -Gets a credentials object that can be used with the TFS extended client SDK. - -.DESCRIPTION -The agent job token is used to construct the credentials object. The identity associated with the token depends on the scope selected in the build/release definition (either the project collection build/release service identity, or the project build/release service identity). - -Refer to Get-VstsTfsService for a more simple to get a TFS service object. - -*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task. - -.PARAMETER OMDirectory -Directory where the extended client object model DLLs are located. If the DLLs for the credential types are not already loaded, an attempt will be made to automatically load the required DLLs from the object model directory. - -If not specified, defaults to the directory of the entry script for the task. - -*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task. - -.EXAMPLE -# -# Refer to Get-VstsTfsService for a more simple way to get a TFS service object. -# -$credentials = Get-VstsTfsClientCredentials -Add-Type -LiteralPath "$PSScriptRoot\Microsoft.TeamFoundation.VersionControl.Client.dll" -$tfsTeamProjectCollection = New-Object Microsoft.TeamFoundation.Client.TfsTeamProjectCollection( - (Get-VstsTaskVariable -Name 'System.TeamFoundationCollectionUri' -Require), - $credentials) -$versionControlServer = $tfsTeamProjectCollection.GetService([Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer]) -$versionControlServer.GetItems('$/*').Items | Format-List -#> -function Get-TfsClientCredentials { - [CmdletBinding()] - param([string]$OMDirectory) - - Trace-EnteringInvocation -InvocationInfo $MyInvocation - $originalErrorActionPreference = $ErrorActionPreference - try { - $ErrorActionPreference = 'Stop' - - # Get the endpoint. - $endpoint = Get-Endpoint -Name SystemVssConnection -Require - - # Validate the type can be found. - $null = Get-OMType -TypeName 'Microsoft.TeamFoundation.Client.TfsClientCredentials' -OMKind 'ExtendedClient' -OMDirectory $OMDirectory -Require - - # Construct the credentials. - $credentials = New-Object Microsoft.TeamFoundation.Client.TfsClientCredentials($false) # Do not use default credentials. - $credentials.AllowInteractive = $false - $credentials.Federated = New-Object Microsoft.TeamFoundation.Client.OAuthTokenCredential([string]$endpoint.auth.parameters.AccessToken) - return $credentials - } catch { - $ErrorActionPreference = $originalErrorActionPreference - Write-Error $_ - } finally { - Trace-LeavingInvocation -InvocationInfo $MyInvocation - } -} - -<# -.SYNOPSIS -Gets a TFS extended client service. - -.DESCRIPTION -Gets an instance of an ITfsTeamProjectCollectionObject. - -*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task. - -.PARAMETER TypeName -Namespace-qualified type name of the service to get. - -.PARAMETER OMDirectory -Directory where the extended client object model DLLs are located. If the DLLs for the types are not already loaded, an attempt will be made to automatically load the required DLLs from the object model directory. - -If not specified, defaults to the directory of the entry script for the task. - -*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the TFS extended client SDK from a task. - -.PARAMETER Uri -URI to use when initializing the service. If not specified, defaults to System.TeamFoundationCollectionUri. - -.PARAMETER TfsClientCredentials -Credentials to use when initializing the service. If not specified, the default uses the agent job token to construct the credentials object. The identity associated with the token depends on the scope selected in the build/release definition (either the project collection build/release service identity, or the project build/release service identity). - -.EXAMPLE -$versionControlServer = Get-VstsTfsService -TypeName Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer -$versionControlServer.GetItems('$/*').Items | Format-List -#> -function Get-TfsService { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$TypeName, - - [string]$OMDirectory, - - [string]$Uri, - - $TfsClientCredentials) - - Trace-EnteringInvocation -InvocationInfo $MyInvocation - $originalErrorActionPreference = $ErrorActionPreference - try { - $ErrorActionPreference = 'Stop' - - # Default the URI to the collection URI. - if (!$Uri) { - $Uri = Get-TaskVariable -Name System.TeamFoundationCollectionUri -Require - } - - # Default the credentials. - if (!$TfsClientCredentials) { - $TfsClientCredentials = Get-TfsClientCredentials -OMDirectory $OMDirectory - } - - # Validate the project collection type can be loaded. - $null = Get-OMType -TypeName 'Microsoft.TeamFoundation.Client.TfsTeamProjectCollection' -OMKind 'ExtendedClient' -OMDirectory $OMDirectory -Require - - # Load the project collection object. - $tfsTeamProjectCollection = New-Object Microsoft.TeamFoundation.Client.TfsTeamProjectCollection($Uri, $TfsClientCredentials) - - # Validate the requested type can be loaded. - $type = Get-OMType -TypeName $TypeName -OMKind 'ExtendedClient' -OMDirectory $OMDirectory -Require - - # Return the service object. - return $tfsTeamProjectCollection.GetService($type) - } catch { - $ErrorActionPreference = $originalErrorActionPreference - Write-Error $_ - } finally { - Trace-LeavingInvocation -InvocationInfo $MyInvocation - } -} - -<# -.SYNOPSIS -Gets a credentials object that can be used with the VSTS REST SDK. - -.DESCRIPTION -The agent job token is used to construct the credentials object. The identity associated with the token depends on the scope selected in the build/release definition (either the project collection build/release service identity, or the project service build/release identity). - -Refer to Get-VstsVssHttpClient for a more simple to get a VSS HTTP client. - -*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the VSTS REST SDK from a task. - -.PARAMETER OMDirectory -Directory where the REST client object model DLLs are located. If the DLLs for the credential types are not already loaded, an attempt will be made to automatically load the required DLLs from the object model directory. - -If not specified, defaults to the directory of the entry script for the task. - -*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the VSTS REST SDK from a task. - -.EXAMPLE -# -# Refer to Get-VstsTfsService for a more simple way to get a TFS service object. -# -# This example works using the 14.x .NET SDK. A Newtonsoft.Json 6.0 to 8.0 binding -# redirect may be required when working with the 15.x SDK. Or use Get-VstsVssHttpClient -# to avoid managing the binding redirect. -# -$vssCredentials = Get-VstsVssCredentials -$collectionUrl = New-Object System.Uri((Get-VstsTaskVariable -Name 'System.TeamFoundationCollectionUri' -Require)) -Add-Type -LiteralPath "$PSScriptRoot\Microsoft.TeamFoundation.Core.WebApi.dll" -$projectHttpClient = New-Object Microsoft.TeamFoundation.Core.WebApi.ProjectHttpClient($collectionUrl, $vssCredentials) -$projectHttpClient.GetProjects().Result -#> -function Get-VssCredentials { - [CmdletBinding()] - param([string]$OMDirectory) - - Trace-EnteringInvocation -InvocationInfo $MyInvocation - $originalErrorActionPreference = $ErrorActionPreference - try { - $ErrorActionPreference = 'Stop' - - # Get the endpoint. - $endpoint = Get-Endpoint -Name SystemVssConnection -Require - - # Check if the VssOAuthAccessTokenCredential type is available. - if ((Get-OMType -TypeName 'Microsoft.VisualStudio.Services.OAuth.VssOAuthAccessTokenCredential' -OMKind 'WebApi' -OMDirectory $OMDirectory)) { - # Create the federated credential. - $federatedCredential = New-Object Microsoft.VisualStudio.Services.OAuth.VssOAuthAccessTokenCredential($endpoint.auth.parameters.AccessToken) - } else { - # Validate the fallback type can be loaded. - $null = Get-OMType -TypeName 'Microsoft.VisualStudio.Services.Client.VssOAuthCredential' -OMKind 'WebApi' -OMDirectory $OMDirectory -Require - - # Create the federated credential. - $federatedCredential = New-Object Microsoft.VisualStudio.Services.Client.VssOAuthCredential($endpoint.auth.parameters.AccessToken) - } - - # Return the credentials. - return New-Object Microsoft.VisualStudio.Services.Common.VssCredentials( - (New-Object Microsoft.VisualStudio.Services.Common.WindowsCredential($false)), # Do not use default credentials. - $federatedCredential, - [Microsoft.VisualStudio.Services.Common.CredentialPromptType]::DoNotPrompt) - } catch { - $ErrorActionPreference = $originalErrorActionPreference - Write-Error $_ - } finally { - Trace-LeavingInvocation -InvocationInfo $MyInvocation - } -} - -<# -.SYNOPSIS -Gets a VSS HTTP client. - -.DESCRIPTION -Gets an instance of an VSS HTTP client. - -*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the VSTS REST SDK from a task. - -.PARAMETER TypeName -Namespace-qualified type name of the HTTP client to get. - -.PARAMETER OMDirectory -Directory where the REST client object model DLLs are located. If the DLLs for the credential types are not already loaded, an attempt will be made to automatically load the required DLLs from the object model directory. - -If not specified, defaults to the directory of the entry script for the task. - -*** DO NOT USE Agent.ServerOMDirectory *** See https://github.com/Microsoft/vsts-task-lib/tree/master/powershell/Docs/UsingOM.md for reliable usage when working with the VSTS REST SDK from a task. - -# .PARAMETER Uri -# URI to use when initializing the HTTP client. If not specified, defaults to System.TeamFoundationCollectionUri. - -# .PARAMETER VssCredentials -# Credentials to use when initializing the HTTP client. If not specified, the default uses the agent job token to construct the credentials object. The identity associated with the token depends on the scope selected in the build/release definition (either the project collection build/release service identity, or the project build/release service identity). - -# .PARAMETER WebProxy -# WebProxy to use when initializing the HTTP client. If not specified, the default uses the proxy configuration agent current has. - -# .PARAMETER ClientCert -# ClientCert to use when initializing the HTTP client. If not specified, the default uses the client certificate agent current has. - -# .PARAMETER IgnoreSslError -# Skip SSL server certificate validation on all requests made by this HTTP client. If not specified, the default is to validate SSL server certificate. - -.EXAMPLE -$projectHttpClient = Get-VstsVssHttpClient -TypeName Microsoft.TeamFoundation.Core.WebApi.ProjectHttpClient -$projectHttpClient.GetProjects().Result -#> -function Get-VssHttpClient { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$TypeName, - - [string]$OMDirectory, - - [string]$Uri, - - $VssCredentials, - - $WebProxy = (Get-WebProxy), - - $ClientCert = (Get-ClientCertificate), - - [switch]$IgnoreSslError) - - Trace-EnteringInvocation -InvocationInfo $MyInvocation - $originalErrorActionPreference = $ErrorActionPreference - try { - $ErrorActionPreference = 'Stop' - - # Default the URI to the collection URI. - if (!$Uri) { - $Uri = Get-TaskVariable -Name System.TeamFoundationCollectionUri -Require - } - - # Cast the URI. - [uri]$Uri = New-Object System.Uri($Uri) - - # Default the credentials. - if (!$VssCredentials) { - $VssCredentials = Get-VssCredentials -OMDirectory $OMDirectory - } - - # Validate the type can be loaded. - $null = Get-OMType -TypeName $TypeName -OMKind 'WebApi' -OMDirectory $OMDirectory -Require - - # Update proxy setting for vss http client - [Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler]::DefaultWebProxy = $WebProxy - - # Update client certificate setting for vss http client - $null = Get-OMType -TypeName 'Microsoft.VisualStudio.Services.Common.VssHttpRequestSettings' -OMKind 'WebApi' -OMDirectory $OMDirectory -Require - $null = Get-OMType -TypeName 'Microsoft.VisualStudio.Services.WebApi.VssClientHttpRequestSettings' -OMKind 'WebApi' -OMDirectory $OMDirectory -Require - [Microsoft.VisualStudio.Services.Common.VssHttpRequestSettings]$Settings = [Microsoft.VisualStudio.Services.WebApi.VssClientHttpRequestSettings]::Default.Clone() - - if ($ClientCert) { - $null = Get-OMType -TypeName 'Microsoft.VisualStudio.Services.WebApi.VssClientCertificateManager' -OMKind 'WebApi' -OMDirectory $OMDirectory -Require - $null = [Microsoft.VisualStudio.Services.WebApi.VssClientCertificateManager]::Instance.ClientCertificates.Add($ClientCert) - - $Settings.ClientCertificateManager = [Microsoft.VisualStudio.Services.WebApi.VssClientCertificateManager]::Instance - } - - # Skip SSL server certificate validation - [bool]$SkipCertValidation = (Get-TaskVariable -Name Agent.SkipCertValidation -AsBool) -or $IgnoreSslError - if ($SkipCertValidation) { - if ($Settings.GetType().GetProperty('ServerCertificateValidationCallback')) { - Write-Verbose "Ignore any SSL server certificate validation errors."; - $Settings.ServerCertificateValidationCallback = [VstsTaskSdk.VstsHttpHandlerSettings]::UnsafeSkipServerCertificateValidation - } - else { - # OMDirectory has older version of Microsoft.VisualStudio.Services.Common.dll - Write-Verbose "The version of 'Microsoft.VisualStudio.Services.Common.dll' does not support skip SSL server certificate validation." - } - } - - # Try to construct the HTTP client. - Write-Verbose "Constructing HTTP client." - try { - return New-Object $TypeName($Uri, $VssCredentials, $Settings) - } catch { - # Rethrow if the exception is not due to Newtonsoft.Json DLL not found. - if ($_.Exception.InnerException -isnot [System.IO.FileNotFoundException] -or - $_.Exception.InnerException.FileName -notlike 'Newtonsoft.Json, *') { - - throw - } - - # Default the OMDirectory to the directory of the entry script for the task. - if (!$OMDirectory) { - $OMDirectory = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..") - Write-Verbose "Defaulted OM directory to: '$OMDirectory'" - } - - # Test if the Newtonsoft.Json DLL exists in the OM directory. - $newtonsoftDll = [System.IO.Path]::Combine($OMDirectory, "Newtonsoft.Json.dll") - Write-Verbose "Testing file path: '$newtonsoftDll'" - if (!(Test-Path -LiteralPath $newtonsoftDll -PathType Leaf)) { - Write-Verbose 'Not found. Rethrowing exception.' - throw - } - - # Add a binding redirect and try again. Parts of the Dev15 preview SDK have a - # dependency on the 6.0.0.0 Newtonsoft.Json DLL, while other parts reference - # the 8.0.0.0 Newtonsoft.Json DLL. - Write-Verbose "Adding assembly resolver." - $onAssemblyResolve = [System.ResolveEventHandler] { - param($sender, $e) - - if ($e.Name -like 'Newtonsoft.Json, *') { - Write-Verbose "Resolving '$($e.Name)'" - return [System.Reflection.Assembly]::LoadFrom($newtonsoftDll) - } - - Write-Verbose "Unable to resolve assembly name '$($e.Name)'" - return $null - } - [System.AppDomain]::CurrentDomain.add_AssemblyResolve($onAssemblyResolve) - try { - # Try again to construct the HTTP client. - Write-Verbose "Trying again to construct the HTTP client." - return New-Object $TypeName($Uri, $VssCredentials, $Settings) - } finally { - # Unregister the assembly resolver. - Write-Verbose "Removing assemlby resolver." - [System.AppDomain]::CurrentDomain.remove_AssemblyResolve($onAssemblyResolve) - } - } - } catch { - $ErrorActionPreference = $originalErrorActionPreference - Write-Error $_ - } finally { - Trace-LeavingInvocation -InvocationInfo $MyInvocation - } -} - -<# -.SYNOPSIS -Gets a VstsTaskSdk.VstsWebProxy - -.DESCRIPTION -Gets an instance of a VstsTaskSdk.VstsWebProxy that has same proxy configuration as Build/Release agent. - -VstsTaskSdk.VstsWebProxy implement System.Net.IWebProxy interface. - -.EXAMPLE -$webProxy = Get-VstsWebProxy -$webProxy.GetProxy(New-Object System.Uri("https://github.com/Microsoft/vsts-task-lib")) -#> -function Get-WebProxy { - [CmdletBinding()] - param() - - Trace-EnteringInvocation -InvocationInfo $MyInvocation - try { - # Min agent version that supports proxy - Assert-Agent -Minimum '2.105.7' - - $proxyUrl = Get-TaskVariable -Name Agent.ProxyUrl - $proxyUserName = Get-TaskVariable -Name Agent.ProxyUserName - $proxyPassword = Get-TaskVariable -Name Agent.ProxyPassword - $proxyBypassListJson = Get-TaskVariable -Name Agent.ProxyBypassList - [string[]]$ProxyBypassList = ConvertFrom-Json -InputObject $ProxyBypassListJson - - return New-Object -TypeName VstsTaskSdk.VstsWebProxy -ArgumentList @($proxyUrl, $proxyUserName, $proxyPassword, $proxyBypassList) - } - finally { - Trace-LeavingInvocation -InvocationInfo $MyInvocation - } -} - -<# -.SYNOPSIS -Gets a client certificate for current connected TFS instance - -.DESCRIPTION -Gets an instance of a X509Certificate2 that is the client certificate Build/Release agent used. - -.EXAMPLE -$x509cert = Get-ClientCertificate -WebRequestHandler.ClientCertificates.Add(x509cert) -#> -function Get-ClientCertificate { - [CmdletBinding()] - param() - - Trace-EnteringInvocation -InvocationInfo $MyInvocation - try { - # Min agent version that supports client certificate - Assert-Agent -Minimum '2.122.0' - - [string]$clientCert = Get-TaskVariable -Name Agent.ClientCertArchive - [string]$clientCertPassword = Get-TaskVariable -Name Agent.ClientCertPassword - - if ($clientCert -and (Test-Path -LiteralPath $clientCert -PathType Leaf)) { - return New-Object -TypeName System.Security.Cryptography.X509Certificates.X509Certificate2 -ArgumentList @($clientCert, $clientCertPassword) - } - } - finally { - Trace-LeavingInvocation -InvocationInfo $MyInvocation - } -} - -######################################## -# Private functions. -######################################## -function Get-OMType { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$TypeName, - - [ValidateSet('ExtendedClient', 'WebApi')] - [Parameter(Mandatory = $true)] - [string]$OMKind, - - [string]$OMDirectory, - - [switch]$Require) - - Trace-EnteringInvocation -InvocationInfo $MyInvocation - try { - # Default the OMDirectory to the directory of the entry script for the task. - if (!$OMDirectory) { - $OMDirectory = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..") - Write-Verbose "Defaulted OM directory to: '$OMDirectory'" - } - - # Try to load the type. - $errorRecord = $null - Write-Verbose "Testing whether type can be loaded: '$TypeName'" - $ErrorActionPreference = 'Ignore' - try { - # Failure when attempting to cast a string to a type, transfers control to the - # catch handler even when the error action preference is ignore. The error action - # is set to Ignore so the $Error variable is not polluted. - $type = [type]$TypeName - - # Success. - Write-Verbose "The type was loaded successfully." - return $type - } catch { - # Store the error record. - $errorRecord = $_ - } - - $ErrorActionPreference = 'Stop' - Write-Verbose "The type was not loaded." - - # Build a list of candidate DLL file paths from the namespace. - $dllPaths = @( ) - $namespace = $TypeName - while ($namespace.LastIndexOf('.') -gt 0) { - # Trim the next segment from the namespace. - $namespace = $namespace.SubString(0, $namespace.LastIndexOf('.')) - - # Derive potential DLL file paths based on the namespace and OM kind (i.e. extended client vs web API). - if ($OMKind -eq 'ExtendedClient') { - if ($namespace -like 'Microsoft.TeamFoundation.*') { - $dllPaths += [System.IO.Path]::Combine($OMDirectory, "$namespace.dll") - } - } else { - if ($namespace -like 'Microsoft.TeamFoundation.*' -or - $namespace -like 'Microsoft.VisualStudio.Services' -or - $namespace -like 'Microsoft.VisualStudio.Services.*') { - - $dllPaths += [System.IO.Path]::Combine($OMDirectory, "$namespace.WebApi.dll") - $dllPaths += [System.IO.Path]::Combine($OMDirectory, "$namespace.dll") - } - } - } - - foreach ($dllPath in $dllPaths) { - # Check whether the DLL exists. - Write-Verbose "Testing leaf path: '$dllPath'" - if (!(Test-Path -PathType Leaf -LiteralPath "$dllPath")) { - Write-Verbose "Not found." - continue - } - - # Load the DLL. - Write-Verbose "Loading assembly: $dllPath" - try { - Add-Type -LiteralPath $dllPath - } catch { - # Write the information to the verbose stream and proceed to attempt to load the requested type. - # - # The requested type may successfully load now. For example, the type used with the 14.0 Web API for the - # federated credential (VssOAuthCredential) resides in Microsoft.VisualStudio.Services.Client.dll. Even - # though loading the DLL results in a ReflectionTypeLoadException when Microsoft.ServiceBus.dll (approx 3.75mb) - # is not present, enough types are loaded to use the VssOAuthCredential federated credential with the Web API - # HTTP clients. - Write-Verbose "$($_.Exception.GetType().FullName): $($_.Exception.Message)" - if ($_.Exception -is [System.Reflection.ReflectionTypeLoadException]) { - for ($i = 0 ; $i -lt $_.Exception.LoaderExceptions.Length ; $i++) { - $loaderException = $_.Exception.LoaderExceptions[$i] - Write-Verbose "LoaderExceptions[$i]: $($loaderException.GetType().FullName): $($loaderException.Message)" - } - } - } - - # Try to load the type. - Write-Verbose "Testing whether type can be loaded: '$TypeName'" - $ErrorActionPreference = 'Ignore' - try { - # Failure when attempting to cast a string to a type, transfers control to the - # catch handler even when the error action preference is ignore. The error action - # is set to Ignore so the $Error variable is not polluted. - $type = [type]$TypeName - - # Success. - Write-Verbose "The type was loaded successfully." - return $type - } catch { - $errorRecord = $_ - } - - $ErrorActionPreference = 'Stop' - Write-Verbose "The type was not loaded." - } - - # Check whether to propagate the error. - if ($Require) { - Write-Error $errorRecord - } - } finally { - Trace-LeavingInvocation -InvocationInfo $MyInvocation - } -} diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/de-de/resources.resjson b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/de-de/resources.resjson deleted file mode 100644 index 7871c36..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/de-de/resources.resjson +++ /dev/null @@ -1,18 +0,0 @@ -{ - "loc.messages.PSLIB_AgentVersion0Required": "Agentversion {0} oder höher ist erforderlich.", - "loc.messages.PSLIB_ContainerPathNotFound0": "Der Containerpfad wurde nicht gefunden: \"{0}\".", - "loc.messages.PSLIB_EndpointAuth0": "\"{0}\"-Dienstendpunkt-Anmeldeinformationen", - "loc.messages.PSLIB_EndpointUrl0": "\"{0}\"-Dienstendpunkt-URL", - "loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "Fehler beim Aufzählen von Unterverzeichnissen für den folgenden Pfad: \"{0}\"", - "loc.messages.PSLIB_FileNotFound0": "Die Datei wurde nicht gefunden: \"{0}\".", - "loc.messages.PSLIB_Input0": "\"{0}\"-Eingabe", - "loc.messages.PSLIB_InvalidPattern0": "Ungültiges Muster: \"{0}\"", - "loc.messages.PSLIB_LeafPathNotFound0": "Der Blattpfad wurde nicht gefunden: \"{0}\".", - "loc.messages.PSLIB_PathLengthNotReturnedFor0": "Fehler bei der Normalisierung bzw. Erweiterung des Pfads. Die Pfadlänge wurde vom Kernel32-Subsystem nicht zurückgegeben für: \"{0}\"", - "loc.messages.PSLIB_PathNotFound0": "Der Pfad wurde nicht gefunden: \"{0}\".", - "loc.messages.PSLIB_Process0ExitedWithCode1": "Der Prozess \"{0}\" wurde mit dem Code \"{1}\" beendet.", - "loc.messages.PSLIB_Required0": "Erforderlich: {0}", - "loc.messages.PSLIB_StringFormatFailed": "Fehler beim Zeichenfolgenformat.", - "loc.messages.PSLIB_StringResourceKeyNotFound0": "Der Zeichenfolgen-Ressourcenschlüssel wurde nicht gefunden: \"{0}\".", - "loc.messages.PSLIB_TaskVariable0": "\"{0}\"-Taskvariable" -} \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/en-US/resources.resjson b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/en-US/resources.resjson deleted file mode 100644 index 66c17bc..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/en-US/resources.resjson +++ /dev/null @@ -1,18 +0,0 @@ -{ - "loc.messages.PSLIB_AgentVersion0Required": "Agent version {0} or higher is required.", - "loc.messages.PSLIB_ContainerPathNotFound0": "Container path not found: '{0}'", - "loc.messages.PSLIB_EndpointAuth0": "'{0}' service endpoint credentials", - "loc.messages.PSLIB_EndpointUrl0": "'{0}' service endpoint URL", - "loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "Enumerating subdirectories failed for path: '{0}'", - "loc.messages.PSLIB_FileNotFound0": "File not found: '{0}'", - "loc.messages.PSLIB_Input0": "'{0}' input", - "loc.messages.PSLIB_InvalidPattern0": "Invalid pattern: '{0}'", - "loc.messages.PSLIB_LeafPathNotFound0": "Leaf path not found: '{0}'", - "loc.messages.PSLIB_PathLengthNotReturnedFor0": "Path normalization/expansion failed. The path length was not returned by the Kernel32 subsystem for: '{0}'", - "loc.messages.PSLIB_PathNotFound0": "Path not found: '{0}'", - "loc.messages.PSLIB_Process0ExitedWithCode1": "Process '{0}' exited with code '{1}'.", - "loc.messages.PSLIB_Required0": "Required: {0}", - "loc.messages.PSLIB_StringFormatFailed": "String format failed.", - "loc.messages.PSLIB_StringResourceKeyNotFound0": "String resource key not found: '{0}'", - "loc.messages.PSLIB_TaskVariable0": "'{0}' task variable" -} \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/es-es/resources.resjson b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/es-es/resources.resjson deleted file mode 100644 index f5c9c23..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/es-es/resources.resjson +++ /dev/null @@ -1,18 +0,0 @@ -{ - "loc.messages.PSLIB_AgentVersion0Required": "Se require la versión {0} o posterior del agente.", - "loc.messages.PSLIB_ContainerPathNotFound0": "No se encuentra la ruta de acceso del contenedor: '{0}'", - "loc.messages.PSLIB_EndpointAuth0": "Credenciales del punto de conexión de servicio '{0}'", - "loc.messages.PSLIB_EndpointUrl0": "URL del punto de conexión de servicio '{0}'", - "loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "No se pudieron enumerar los subdirectorios de la ruta de acceso: '{0}'", - "loc.messages.PSLIB_FileNotFound0": "Archivo no encontrado: '{0}'", - "loc.messages.PSLIB_Input0": "Entrada '{0}'", - "loc.messages.PSLIB_InvalidPattern0": "Patrón no válido: '{0}'", - "loc.messages.PSLIB_LeafPathNotFound0": "No se encuentra la ruta de acceso de la hoja: '{0}'", - "loc.messages.PSLIB_PathLengthNotReturnedFor0": "No se pudo normalizar o expandir la ruta de acceso. El subsistema Kernel32 no devolvió la longitud de la ruta de acceso para: '{0}'", - "loc.messages.PSLIB_PathNotFound0": "No se encuentra la ruta de acceso: '{0}'", - "loc.messages.PSLIB_Process0ExitedWithCode1": "El proceso '{0}' finalizó con el código '{1}'.", - "loc.messages.PSLIB_Required0": "Se requiere: {0}", - "loc.messages.PSLIB_StringFormatFailed": "Error de formato de cadena.", - "loc.messages.PSLIB_StringResourceKeyNotFound0": "No se encuentra la clave de recurso de la cadena: '{0}'", - "loc.messages.PSLIB_TaskVariable0": "Variable de tarea '{0}'" -} \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/fr-fr/resources.resjson b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/fr-fr/resources.resjson deleted file mode 100644 index 652870c..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/fr-fr/resources.resjson +++ /dev/null @@ -1,18 +0,0 @@ -{ - "loc.messages.PSLIB_AgentVersion0Required": "L'agent version {0} (ou une version ultérieure) est obligatoire.", - "loc.messages.PSLIB_ContainerPathNotFound0": "Le chemin du conteneur est introuvable : '{0}'", - "loc.messages.PSLIB_EndpointAuth0": "Informations d'identification du point de terminaison de service '{0}'", - "loc.messages.PSLIB_EndpointUrl0": "URL du point de terminaison de service '{0}'", - "loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "Échec de l'énumération des sous-répertoires pour le chemin : '{0}'", - "loc.messages.PSLIB_FileNotFound0": "Fichier introuvable : {0}.", - "loc.messages.PSLIB_Input0": "Entrée '{0}'", - "loc.messages.PSLIB_InvalidPattern0": "Modèle non valide : '{0}'", - "loc.messages.PSLIB_LeafPathNotFound0": "Le chemin feuille est introuvable : '{0}'", - "loc.messages.PSLIB_PathLengthNotReturnedFor0": "Échec de la normalisation/l'expansion du chemin. La longueur du chemin n'a pas été retournée par le sous-système Kernel32 pour : '{0}'", - "loc.messages.PSLIB_PathNotFound0": "Chemin introuvable : '{0}'", - "loc.messages.PSLIB_Process0ExitedWithCode1": "Le processus '{0}' s'est arrêté avec le code '{1}'.", - "loc.messages.PSLIB_Required0": "Obligatoire : {0}", - "loc.messages.PSLIB_StringFormatFailed": "Échec du format de la chaîne.", - "loc.messages.PSLIB_StringResourceKeyNotFound0": "Clé de la ressource de type chaîne introuvable : '{0}'", - "loc.messages.PSLIB_TaskVariable0": "Variable de tâche '{0}'" -} \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/it-IT/resources.resjson b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/it-IT/resources.resjson deleted file mode 100644 index 6aeb1df..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/it-IT/resources.resjson +++ /dev/null @@ -1,18 +0,0 @@ -{ - "loc.messages.PSLIB_AgentVersion0Required": "È richiesta la versione dell'agente {0} o superiore.", - "loc.messages.PSLIB_ContainerPathNotFound0": "Percorso del contenitore non trovato: '{0}'", - "loc.messages.PSLIB_EndpointAuth0": "Credenziali dell'endpoint servizio '{0}'", - "loc.messages.PSLIB_EndpointUrl0": "URL dell'endpoint servizio '{0}'", - "loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "L'enumerazione delle sottodirectory per il percorso '{0}' non è riuscita", - "loc.messages.PSLIB_FileNotFound0": "File non trovato: '{0}'", - "loc.messages.PSLIB_Input0": "Input di '{0}'", - "loc.messages.PSLIB_InvalidPattern0": "Criterio non valido: '{0}'", - "loc.messages.PSLIB_LeafPathNotFound0": "Percorso foglia non trovato: '{0}'", - "loc.messages.PSLIB_PathLengthNotReturnedFor0": "La normalizzazione o l'espansione del percorso non è riuscita. Il sottosistema Kernel32 non ha restituito la lunghezza del percorso per '{0}'", - "loc.messages.PSLIB_PathNotFound0": "Percorso non trovato: '{0}'", - "loc.messages.PSLIB_Process0ExitedWithCode1": "Il processo '{0}' è stato terminato ed è stato restituito il codice '{1}'.", - "loc.messages.PSLIB_Required0": "Obbligatorio: {0}", - "loc.messages.PSLIB_StringFormatFailed": "Errore nel formato della stringa.", - "loc.messages.PSLIB_StringResourceKeyNotFound0": "La chiave della risorsa stringa non è stata trovata: '{0}'", - "loc.messages.PSLIB_TaskVariable0": "Variabile dell'attività '{0}'" -} \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/ja-jp/resources.resjson b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/ja-jp/resources.resjson deleted file mode 100644 index 6b07ab6..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/ja-jp/resources.resjson +++ /dev/null @@ -1,18 +0,0 @@ -{ - "loc.messages.PSLIB_AgentVersion0Required": "バージョン {0} 以降のエージェントが必要です。", - "loc.messages.PSLIB_ContainerPathNotFound0": "コンテナーのパスが見つかりません: '{0}'", - "loc.messages.PSLIB_EndpointAuth0": "'{0}' サービス エンドポイントの資格情報", - "loc.messages.PSLIB_EndpointUrl0": "'{0}' サービス エンドポイントの URL", - "loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "パス '{0}' のサブディレクトリを列挙できませんでした", - "loc.messages.PSLIB_FileNotFound0": "ファイルが見つかりません: '{0}'", - "loc.messages.PSLIB_Input0": "'{0}' 入力", - "loc.messages.PSLIB_InvalidPattern0": "使用できないパターンです: '{0}'", - "loc.messages.PSLIB_LeafPathNotFound0": "リーフ パスが見つかりません: '{0}'", - "loc.messages.PSLIB_PathLengthNotReturnedFor0": "パスの正規化/展開に失敗しました。Kernel32 サブシステムからパス '{0}' の長さが返されませんでした", - "loc.messages.PSLIB_PathNotFound0": "パスが見つかりません: '{0}'", - "loc.messages.PSLIB_Process0ExitedWithCode1": "プロセス '{0}' がコード '{1}' で終了しました。", - "loc.messages.PSLIB_Required0": "必要: {0}", - "loc.messages.PSLIB_StringFormatFailed": "文字列のフォーマットに失敗しました。", - "loc.messages.PSLIB_StringResourceKeyNotFound0": "文字列のリソース キーが見つかりません: '{0}'", - "loc.messages.PSLIB_TaskVariable0": "'{0}' タスク変数" -} \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/ko-KR/resources.resjson b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/ko-KR/resources.resjson deleted file mode 100644 index e58cbdc..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/ko-KR/resources.resjson +++ /dev/null @@ -1,18 +0,0 @@ -{ - "loc.messages.PSLIB_AgentVersion0Required": "에이전트 버전 {0} 이상이 필요합니다.", - "loc.messages.PSLIB_ContainerPathNotFound0": "컨테이너 경로를 찾을 수 없음: '{0}'", - "loc.messages.PSLIB_EndpointAuth0": "'{0}' 서비스 끝점 자격 증명", - "loc.messages.PSLIB_EndpointUrl0": "'{0}' 서비스 끝점 URL", - "loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "경로에 대해 하위 디렉터리를 열거하지 못함: '{0}'", - "loc.messages.PSLIB_FileNotFound0": "{0} 파일을 찾을 수 없습니다.", - "loc.messages.PSLIB_Input0": "'{0}' 입력", - "loc.messages.PSLIB_InvalidPattern0": "잘못된 패턴: '{0}'", - "loc.messages.PSLIB_LeafPathNotFound0": "Leaf 경로를 찾을 수 없음: '{0}'", - "loc.messages.PSLIB_PathLengthNotReturnedFor0": "경로 정규화/확장에 실패했습니다. 다음에 대해 Kernel32 subsystem에서 경로 길이를 반환하지 않음: '{0}'", - "loc.messages.PSLIB_PathNotFound0": "경로를 찾을 수 없음: '{0}'", - "loc.messages.PSLIB_Process0ExitedWithCode1": "'{1}' 코드로 '{0}' 프로세스가 종료되었습니다.", - "loc.messages.PSLIB_Required0": "필수: {0}", - "loc.messages.PSLIB_StringFormatFailed": "문자열을 포맷하지 못했습니다.", - "loc.messages.PSLIB_StringResourceKeyNotFound0": "문자열 리소스 키를 찾을 수 없음: '{0}'", - "loc.messages.PSLIB_TaskVariable0": "'{0}' 작업 변수" -} \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/ru-RU/resources.resjson b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/ru-RU/resources.resjson deleted file mode 100644 index 38dd69d..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/ru-RU/resources.resjson +++ /dev/null @@ -1,18 +0,0 @@ -{ - "loc.messages.PSLIB_AgentVersion0Required": "Требуется версия агента {0} или более поздняя.", - "loc.messages.PSLIB_ContainerPathNotFound0": "Путь к контейнеру не найден: \"{0}\".", - "loc.messages.PSLIB_EndpointAuth0": "Учетные данные конечной точки службы \"{0}\"", - "loc.messages.PSLIB_EndpointUrl0": "URL-адрес конечной точки службы \"{0}\"", - "loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "Сбой перечисления подкаталогов для пути: \"{0}\".", - "loc.messages.PSLIB_FileNotFound0": "Файл не найден: \"{0}\".", - "loc.messages.PSLIB_Input0": "Входные данные \"{0}\".", - "loc.messages.PSLIB_InvalidPattern0": "Недопустимый шаблон: \"{0}\".", - "loc.messages.PSLIB_LeafPathNotFound0": "Путь к конечному объекту не найден: \"{0}\".", - "loc.messages.PSLIB_PathLengthNotReturnedFor0": "Сбой нормализации и расширения пути. Длина пути не была возвращена подсистемой Kernel32 для: \"{0}\".", - "loc.messages.PSLIB_PathNotFound0": "Путь не найден: \"{0}\".", - "loc.messages.PSLIB_Process0ExitedWithCode1": "Процесс \"{0}\" завершил работу с кодом \"{1}\".", - "loc.messages.PSLIB_Required0": "Требуется: {0}", - "loc.messages.PSLIB_StringFormatFailed": "Сбой формата строки.", - "loc.messages.PSLIB_StringResourceKeyNotFound0": "Ключ ресурса строки не найден: \"{0}\".", - "loc.messages.PSLIB_TaskVariable0": "Переменная задачи \"{0}\"" -} \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/zh-CN/resources.resjson b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/zh-CN/resources.resjson deleted file mode 100644 index 1d333de..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/zh-CN/resources.resjson +++ /dev/null @@ -1,18 +0,0 @@ -{ - "loc.messages.PSLIB_AgentVersion0Required": "需要代理版本 {0} 或更高版本。", - "loc.messages.PSLIB_ContainerPathNotFound0": "找不到容器路径:“{0}”", - "loc.messages.PSLIB_EndpointAuth0": "“{0}”服务终结点凭据", - "loc.messages.PSLIB_EndpointUrl0": "“{0}”服务终结点 URL", - "loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "枚举路径的子目录失败:“{0}”", - "loc.messages.PSLIB_FileNotFound0": "找不到文件: {0}。", - "loc.messages.PSLIB_Input0": "“{0}”输入", - "loc.messages.PSLIB_InvalidPattern0": "无效的模式:“{0}”", - "loc.messages.PSLIB_LeafPathNotFound0": "找不到叶路径:“{0}”", - "loc.messages.PSLIB_PathLengthNotReturnedFor0": "路径规范化/扩展失败。路径长度不是由“{0}”的 Kernel32 子系统返回的", - "loc.messages.PSLIB_PathNotFound0": "找不到路径:“{0}”", - "loc.messages.PSLIB_Process0ExitedWithCode1": "过程“{0}”已退出,代码为“{1}”。", - "loc.messages.PSLIB_Required0": "必需: {0}", - "loc.messages.PSLIB_StringFormatFailed": "字符串格式无效。", - "loc.messages.PSLIB_StringResourceKeyNotFound0": "找不到字符串资源关键字:“{0}”", - "loc.messages.PSLIB_TaskVariable0": "“{0}”任务变量" -} \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/zh-TW/resources.resjson b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/zh-TW/resources.resjson deleted file mode 100644 index 512509b..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/Strings/resources.resjson/zh-TW/resources.resjson +++ /dev/null @@ -1,18 +0,0 @@ -{ - "loc.messages.PSLIB_AgentVersion0Required": "需要代理程式版本 {0} 或更新的版本。", - "loc.messages.PSLIB_ContainerPathNotFound0": "找不到容器路徑: '{0}'", - "loc.messages.PSLIB_EndpointAuth0": "'{0}' 服務端點認證", - "loc.messages.PSLIB_EndpointUrl0": "'{0}' 服務端點 URL", - "loc.messages.PSLIB_EnumeratingSubdirectoriesFailedForPath0": "為路徑列舉子目錄失敗: '{0}'", - "loc.messages.PSLIB_FileNotFound0": "找不到檔案: '{0}'", - "loc.messages.PSLIB_Input0": "'{0}' 輸入", - "loc.messages.PSLIB_InvalidPattern0": "模式無效: '{0}'", - "loc.messages.PSLIB_LeafPathNotFound0": "找不到分葉路徑: '{0}'", - "loc.messages.PSLIB_PathLengthNotReturnedFor0": "路徑正規化/展開失敗。Kernel32 子系統未傳回 '{0}' 的路徑長度", - "loc.messages.PSLIB_PathNotFound0": "找不到路徑: '{0}'", - "loc.messages.PSLIB_Process0ExitedWithCode1": "處理序 '{0}' 以返回碼 '{1}' 結束。", - "loc.messages.PSLIB_Required0": "必要項: {0}", - "loc.messages.PSLIB_StringFormatFailed": "字串格式失敗。", - "loc.messages.PSLIB_StringResourceKeyNotFound0": "找不到字串資源索引鍵: '{0}'", - "loc.messages.PSLIB_TaskVariable0": "'{0}' 工作變數" -} \ No newline at end of file diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/ToolFunctions.ps1 b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/ToolFunctions.ps1 deleted file mode 100644 index 0e82595..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/ToolFunctions.ps1 +++ /dev/null @@ -1,123 +0,0 @@ -<# -.SYNOPSIS -Asserts the agent version is at least the specified minimum. - -.PARAMETER Minimum -Minimum version - must be 2.104.1 or higher. -#> -function Assert-Agent { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [version]$Minimum) - - if (([version]'2.104.1').CompareTo($Minimum) -ge 1) { - Write-Error "Assert-Agent requires the parameter to be 2.104.1 or higher." - return - } - - $agent = Get-TaskVariable -Name 'agent.version' - if (!$agent -or $Minimum.CompareTo([version]$agent) -ge 1) { - Write-Error (Get-LocString -Key 'PSLIB_AgentVersion0Required' -ArgumentList $Minimum) - } -} - -<# -.SYNOPSIS -Asserts that a path exists. Throws if the path does not exist. - -.PARAMETER PassThru -True to return the path. -#> -function Assert-Path { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [string]$LiteralPath, - [Microsoft.PowerShell.Commands.TestPathType]$PathType = [Microsoft.PowerShell.Commands.TestPathType]::Any, - [switch]$PassThru) - - if ($PathType -eq [Microsoft.PowerShell.Commands.TestPathType]::Any) { - Write-Verbose "Asserting path exists: '$LiteralPath'" - } else { - Write-Verbose "Asserting $("$PathType".ToLowerInvariant()) path exists: '$LiteralPath'" - } - - if (Test-Path -LiteralPath $LiteralPath -PathType $PathType) { - if ($PassThru) { - return $LiteralPath - } - - return - } - - $resourceKey = switch ($PathType) { - ([Microsoft.PowerShell.Commands.TestPathType]::Container) { "PSLIB_ContainerPathNotFound0" ; break } - ([Microsoft.PowerShell.Commands.TestPathType]::Leaf) { "PSLIB_LeafPathNotFound0" ; break } - default { "PSLIB_PathNotFound0" } - } - - throw (Get-LocString -Key $resourceKey -ArgumentList $LiteralPath) -} - -<# -.SYNOPSIS -Executes an external program. - -.DESCRIPTION -Executes an external program and waits for the process to exit. - -After calling this command, the exit code of the process can be retrieved from the variable $LASTEXITCODE. - -.PARAMETER Encoding -This parameter not required for most scenarios. Indicates how to interpret the encoding from the external program. An example use case would be if an external program outputs UTF-16 XML and the output needs to be parsed. - -.PARAMETER RequireExitCodeZero -Indicates whether to write an error to the error pipeline if the exit code is not zero. -#> -function Invoke-Tool { # TODO: RENAME TO INVOKE-PROCESS? - [CmdletBinding()] - param( - [ValidatePattern('^[^\r\n]*$')] - [Parameter(Mandatory = $true)] - [string]$FileName, - [ValidatePattern('^[^\r\n]*$')] - [Parameter()] - [string]$Arguments, - [string]$WorkingDirectory, - [System.Text.Encoding]$Encoding, - [switch]$RequireExitCodeZero) - - Trace-EnteringInvocation $MyInvocation - $isPushed = $false - $originalEncoding = $null - try { - if ($Encoding) { - $originalEncoding = [System.Console]::OutputEncoding - [System.Console]::OutputEncoding = $Encoding - } - - if ($WorkingDirectory) { - Push-Location -LiteralPath $WorkingDirectory -ErrorAction Stop - $isPushed = $true - } - - $FileName = $FileName.Replace('"', '').Replace("'", "''") - Write-Host "##[command]""$FileName"" $Arguments" - Invoke-Expression "& '$FileName' --% $Arguments" - Write-Verbose "Exit code: $LASTEXITCODE" - if ($RequireExitCodeZero -and $LASTEXITCODE -ne 0) { - Write-Error (Get-LocString -Key PSLIB_Process0ExitedWithCode1 -ArgumentList ([System.IO.Path]::GetFileName($FileName)), $LASTEXITCODE) - } - } finally { - if ($originalEncoding) { - [System.Console]::OutputEncoding = $originalEncoding - } - - if ($isPushed) { - Pop-Location - } - - Trace-LeavingInvocation $MyInvocation - } -} diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/TraceFunctions.ps1 b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/TraceFunctions.ps1 deleted file mode 100644 index b8e084b..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/TraceFunctions.ps1 +++ /dev/null @@ -1,139 +0,0 @@ -<# -.SYNOPSIS -Writes verbose information about the invocation being entered. - -.DESCRIPTION -Used to trace verbose information when entering a function/script. Writes an entering message followed by a short description of the invocation. Additionally each bound parameter and unbound argument is also traced. - -.PARAMETER Parameter -Wildcard pattern to control which bound parameters are traced. -#> -function Trace-EnteringInvocation { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [System.Management.Automation.InvocationInfo]$InvocationInfo, - [string[]]$Parameter = '*') - - Write-Verbose "Entering $(Get-InvocationDescription $InvocationInfo)." - $OFS = ", " - if ($InvocationInfo.BoundParameters.Count -and $Parameter.Count) { - if ($Parameter.Count -eq 1 -and $Parameter[0] -eq '*') { - # Trace all parameters. - foreach ($key in $InvocationInfo.BoundParameters.Keys) { - Write-Verbose " $($key): '$($InvocationInfo.BoundParameters[$key])'" - } - } else { - # Trace matching parameters. - foreach ($key in $InvocationInfo.BoundParameters.Keys) { - foreach ($p in $Parameter) { - if ($key -like $p) { - Write-Verbose " $($key): '$($InvocationInfo.BoundParameters[$key])'" - break - } - } - } - } - } - - # Trace all unbound arguments. - if (@($InvocationInfo.UnboundArguments).Count) { - for ($i = 0 ; $i -lt $InvocationInfo.UnboundArguments.Count ; $i++) { - Write-Verbose " args[$i]: '$($InvocationInfo.UnboundArguments[$i])'" - } - } -} - -<# -.SYNOPSIS -Writes verbose information about the invocation being left. - -.DESCRIPTION -Used to trace verbose information when leaving a function/script. Writes a leaving message followed by a short description of the invocation. -#> -function Trace-LeavingInvocation { - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [System.Management.Automation.InvocationInfo]$InvocationInfo) - - Write-Verbose "Leaving $(Get-InvocationDescription $InvocationInfo)." -} - -<# -.SYNOPSIS -Writes verbose information about paths. - -.DESCRIPTION -Writes verbose information about the paths. The paths are sorted and a the common root is written only once, followed by each relative path. - -.PARAMETER PassThru -Indicates whether to return the sorted paths. -#> -function Trace-Path { - [CmdletBinding()] - param( - [string[]]$Path, - [switch]$PassThru) - - if ($Path.Count -eq 0) { - Write-Verbose "No paths." - if ($PassThru) { - $Path - } - } elseif ($Path.Count -eq 1) { - Write-Verbose "Path: $($Path[0])" - if ($PassThru) { - $Path - } - } else { - # Find the greatest common root. - $sorted = $Path | Sort-Object - $firstPath = $sorted[0].ToCharArray() - $lastPath = $sorted[-1].ToCharArray() - $commonEndIndex = 0 - $j = if ($firstPath.Length -lt $lastPath.Length) { $firstPath.Length } else { $lastPath.Length } - for ($i = 0 ; $i -lt $j ; $i++) { - if ($firstPath[$i] -eq $lastPath[$i]) { - if ($firstPath[$i] -eq '\') { - $commonEndIndex = $i - } - } else { - break - } - } - - if ($commonEndIndex -eq 0) { - # No common root. - Write-Verbose "Paths:" - foreach ($p in $sorted) { - Write-Verbose " $p" - } - } else { - Write-Verbose "Paths: $($Path[0].Substring(0, $commonEndIndex + 1))" - foreach ($p in $sorted) { - Write-Verbose " $($p.Substring($commonEndIndex + 1))" - } - } - - if ($PassThru) { - $sorted - } - } -} - -######################################## -# Private functions. -######################################## -function Get-InvocationDescription { - [CmdletBinding()] - param([System.Management.Automation.InvocationInfo]$InvocationInfo) - - if ($InvocationInfo.MyCommand.Path) { - $InvocationInfo.MyCommand.Path - } elseif ($InvocationInfo.MyCommand.Name) { - $InvocationInfo.MyCommand.Name - } else { - $InvocationInfo.MyCommand.CommandType - } -} diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/VstsTaskSdk.dll b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/VstsTaskSdk.dll deleted file mode 100644 index 54938ab05180ddaf77cf067f2501a1f97ee7e5cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25408 zcmeIa2Urx#@+jULfkmqhP%&pQASxi36%_+2 zidj)qRLqKkIbqJC|C%A{Ip^NgryDMlC=Tgb)?ppFa_* zgD?KL5%6Dw0*IE?-Y<)GNuATFBL$w*iA?2*n3+OBijbYbF+H{2L%K|95{8flQ0QIM^F!gwgx3vTgye}Z zxvSkc0dGI?6aWPJm*)uj%Ro(CG}HVlviga*LJ z%c-k5J<6tW2zm5FiQsmeukhe)BO@9rfIMER2uTstK5*O- zp@Kg2FGIRyijg8h3==K#1PZj)1PGIe078Q?3fcfUNeC&BMM{ur610*^HW~;)GR2%S z(3DOwQpV|!gi1A1fuOl0jrf|$kd2^S3?nFvZYo2j(nM-Ks4UeiN|q`Z1USRgS`itk zLr7Y}2zbjd*FzElyi6uY84`g=F$Rz);PpxhGy!R)7_=hD0z74yA8(aaL_bs@;b4I_ z5N?~0a2Z7DNP9M-fEba;C4D=PmlWs<)n2;ynO%^dBlgZ>Rq^tSz6oC$2 zv?L^!fW#)MCWA35S_S!`5egImFq~oTHhAt3D1C?uMW6?GHI>G^47@ zv1Mj?r2*#RTfM+#fs6quE5yL%5xJ1B%%Wk%f z1!iH5S+k%p1oD^;uuKvmy~!}2fCB|kj9!FT$m6Go@D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IN3Y0$53He+YYQ>eZU+u`D<)c|Fspn^AR|nVK$5^ki+Yn_&WbKc$d_mNg zeC?4#OS(vZ`qJ(l(1DzJ>%sS|AkPgw)t-el)B{!v%PXU|+Pz&4jbY(AL%HEt8Spib zPc<(?tZppIne|$c+|SB32$YYzT>e0{mtgSG^$e`!z1)IGJFu@RSev0mQr?$X4Q!rJP3>&`Zt!=+&?>AJf79Gr=vlfV zg4S?kF+F>fNu}K(Z=}gHBL`*nHQ9&g>ltj`!>A^FaraRJeb@VjRUoeQz@zZ9I|mDk zb7Yo!2RJVGI5#Ow?y=qmZv={jr^{*&IYR2*oz^L5G-brBv_Yz;wu5eD9@@M+Ao<_- zTJ<*aIe)M4x%zcPo;e*jhT|#q9?2=PugJgekDl<9dh6e&6yF`ar4mto>Tbqa^N9R^ J$g$t$@(XnB12_Nx diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/VstsTaskSdk.psm1 b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/VstsTaskSdk.psm1 deleted file mode 100644 index a1bf2c6..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/VstsTaskSdk.psm1 +++ /dev/null @@ -1,168 +0,0 @@ -[CmdletBinding()] -param( - [ValidateNotNull()] - [Parameter()] - [hashtable]$ModuleParameters = @{ }) - -if ($host.Name -ne 'ConsoleHost') { - Write-Warning "VstsTaskSdk is designed for use with powershell.exe (ConsoleHost). Output may be different when used with other hosts." -} - -# Private module variables. -[bool]$script:nonInteractive = "$($ModuleParameters['NonInteractive'])" -eq 'true' -Write-Verbose "NonInteractive: $script:nonInteractive" - -# VstsTaskSdk.dll contains the TerminationException and NativeMethods for handle long path -# We used to do inline C# in this powershell module -# However when csc compile the inline C#, it will hit process env block size limit since it's not use unicode to encode env -# To solve the env block size problem, we choose to put all inline C# into an assembly VstsTaskSdk.dll, signing it, package with the PS modules. -Write-Verbose "Loading compiled helper $PSScriptRoot\VstsTaskSdk.dll." -Add-Type -LiteralPath $PSScriptRoot\VstsTaskSdk.dll - -# Import/export functions. -. "$PSScriptRoot\FindFunctions.ps1" -. "$PSScriptRoot\InputFunctions.ps1" -. "$PSScriptRoot\LegacyFindFunctions.ps1" -. "$PSScriptRoot\LocalizationFunctions.ps1" -. "$PSScriptRoot\LoggingCommandFunctions.ps1" -. "$PSScriptRoot\LongPathFunctions.ps1" -. "$PSScriptRoot\ServerOMFunctions.ps1" -. "$PSScriptRoot\ToolFunctions.ps1" -. "$PSScriptRoot\TraceFunctions.ps1" -. "$PSScriptRoot\OutFunctions.ps1" # Load the out functions after all of the other functions are loaded. -Export-ModuleMember -Function @( - # Find functions. - 'Find-Match' - 'New-FindOptions' - 'New-MatchOptions' - 'Select-Match' - # Input functions. - 'Get-Endpoint' - 'Get-SecureFileTicket' - 'Get-SecureFileName' - 'Get-Input' - 'Get-TaskVariable' - 'Get-TaskVariableInfo' - 'Set-TaskVariable' - # Legacy find functions. - 'Find-Files' - # Localization functions. - 'Get-LocString' - 'Import-LocStrings' - # Logging command functions. - 'Write-AddAttachment' - 'Write-AddBuildTag' - 'Write-AssociateArtifact' - 'Write-LogDetail' - 'Write-PrependPath' - 'Write-SetEndpoint' - 'Write-SetProgress' - 'Write-SetResult' - 'Write-SetSecret' - 'Write-SetVariable' - 'Write-TaskDebug' - 'Write-TaskError' - 'Write-TaskVerbose' - 'Write-TaskWarning' - 'Write-UpdateBuildNumber' - 'Write-UpdateReleaseName' - 'Write-UploadArtifact' - 'Write-UploadBuildLog' - 'Write-UploadFile' - 'Write-UploadSummary' - # Out functions. - 'Out-Default' - # Server OM functions. - 'Get-AssemblyReference' - 'Get-TfsClientCredentials' - 'Get-TfsService' - 'Get-VssCredentials' - 'Get-VssHttpClient' - # Tool functions. - 'Assert-Agent' - 'Assert-Path' - 'Invoke-Tool' - # Trace functions. - 'Trace-EnteringInvocation' - 'Trace-LeavingInvocation' - 'Trace-Path' - # Proxy functions - 'Get-WebProxy' - # Client cert functions - 'Get-ClientCertificate' - ) - -# Override Out-Default globally. -$null = New-Item -Force -Path "function:\global:Out-Default" -Value (Get-Command -CommandType Function -Name Out-Default -ListImported) -New-Alias -Name Out-Default -Value "global:Out-Default" -Scope global - -# Perform some initialization in a script block to enable merging the pipelines. -$scriptText = @" -# Load the SDK resource strings. -Import-LocStrings "$PSScriptRoot\lib.json" - -# Load the module that contains ConvertTo-SecureString. -if (!(Get-Module -Name Microsoft.PowerShell.Security)) { - Write-Verbose "Importing the module 'Microsoft.PowerShell.Security'." - Import-Module -Name Microsoft.PowerShell.Security 2>&1 | - ForEach-Object { - if (`$_ -is [System.Management.Automation.ErrorRecord]) { - Write-Verbose `$_.Exception.Message - } else { - ,`$_ - } - } -} -"@ -. ([scriptblock]::Create($scriptText)) 2>&1 3>&1 4>&1 5>&1 | Out-Default - -# Create Invoke-VstsTaskScript in a special way so it is not bound to the module. -# Otherwise calling the task script block would run within the module context. -# -# An alternative way to solve the problem is to close the script block (i.e. closure). -# However, that introduces a different problem. Closed script blocks are created within -# a dynamic module. Each module gets it's own session state separate from the global -# session state. When running in a regular script context, Import-Module calls import -# the target module into the global session state. When running in a module context, -# Import-Module calls import the target module into the caller module's session state. -# -# The goal of a task may include executing ad-hoc scripts. Therefore, task scripts -# should run in regular script context. The end user specifying an ad-hoc script expects -# the module import rules to be consistent with the default behavior (i.e. imported -# into the global session state). -$null = New-Item -Force -Path "function:\global:Invoke-VstsTaskScript" -Value ([scriptblock]::Create(@' - [CmdletBinding()] - param( - [Parameter(Mandatory = $true)] - [scriptblock]$ScriptBlock) - - try { - $global:ErrorActionPreference = 'Stop' - - # Initialize the environment. - $vstsModule = Get-Module -Name VstsTaskSdk - Write-Verbose "$($vstsModule.Name) $($vstsModule.Version) commit $($vstsModule.PrivateData.PSData.CommitHash)" 4>&1 | Out-Default - & $vstsModule Initialize-Inputs 4>&1 | Out-Default - - # Remove the local variable before calling the user's script. - Remove-Variable -Name vstsModule - - # Call the user's script. - $ScriptBlock | - ForEach-Object { - # Remove the scriptblock variable before calling it. - Remove-Variable -Name ScriptBlock - & $_ 2>&1 3>&1 4>&1 5>&1 | Out-Default - } - } catch [VstsTaskSdk.TerminationException] { - # Special internal exception type to control the flow. Not currently intended - # for public usage and subject to change. - $global:__vstsNoOverrideVerbose = '' - Write-Verbose "Task script terminated." 4>&1 | Out-Default - } catch { - $global:__vstsNoOverrideVerbose = '' - Write-Verbose "Caught exception from task script." 4>&1 | Out-Default - $_ | Out-Default - Write-Host "##vso[task.complete result=Failed]" - } -'@)) diff --git a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/lib.json b/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/lib.json deleted file mode 100644 index ecdc9d0..0000000 --- a/src/Tasks/dependency-check-build-task/ps_modules/VstsTaskSdk/lib.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "messages": { - "PSLIB_AgentVersion0Required": "Agent version {0} or higher is required.", - "PSLIB_ContainerPathNotFound0": "Container path not found: '{0}'", - "PSLIB_EndpointAuth0": "'{0}' service endpoint credentials", - "PSLIB_EndpointUrl0": "'{0}' service endpoint URL", - "PSLIB_EnumeratingSubdirectoriesFailedForPath0": "Enumerating subdirectories failed for path: '{0}'", - "PSLIB_FileNotFound0": "File not found: '{0}'", - "PSLIB_Input0": "'{0}' input", - "PSLIB_InvalidPattern0": "Invalid pattern: '{0}'", - "PSLIB_LeafPathNotFound0": "Leaf path not found: '{0}'", - "PSLIB_PathLengthNotReturnedFor0": "Path normalization/expansion failed. The path length was not returned by the Kernel32 subsystem for: '{0}'", - "PSLIB_PathNotFound0": "Path not found: '{0}'", - "PSLIB_Process0ExitedWithCode1": "Process '{0}' exited with code '{1}'.", - "PSLIB_Required0": "Required: {0}", - "PSLIB_StringFormatFailed": "String format failed.", - "PSLIB_StringResourceKeyNotFound0": "String resource key not found: '{0}'", - "PSLIB_TaskVariable0": "'{0}' task variable" - } -} diff --git a/src/Tasks/dependency-check-build-task/task.json b/src/Tasks/dependency-check-build-task/task.json index ad2b90e..d67a97f 100644 --- a/src/Tasks/dependency-check-build-task/task.json +++ b/src/Tasks/dependency-check-build-task/task.json @@ -5,7 +5,7 @@ "description": "Dependency Check is a Software Composition Analysis (SCA) tool that attempts to detect publicly disclosed vulnerabilities contained within a project's dependencies.", "helpMarkDown": "[More Information](https://jeremylong.github.io/DependencyCheck/index.html)", "category": "Build", - "visibility": ["Build"], + "visibility": [ "Build" ], "author": "Dependency Check", "version": { "Major": "[major]", @@ -136,7 +136,7 @@ "type": "string", "label": "Installer Version", "helpMarkDown": "By default, the build task downloads the installer from the Dependency Check GitHub releases. Setting this field will change the Dependency Check version downloaded onto the build agent.", - "defaultValue": "6.0.2", + "defaultValue": "latest", "required": false }, { @@ -150,8 +150,8 @@ ], "instanceNameFormat": "Dependency Check", "execution": { - "PowerShell3": { - "target": "$(currentDirectory)\\dependency-check-build-task.ps1", + "Node": { + "target": "$(currentDirectory)/dependency-check-build-task.js", "argumentFormat": "", "workingDirectory": "$(currentDirectory)" } diff --git a/src/Tasks/dependency-check-build-task-v2/tsconfig.json b/src/Tasks/dependency-check-build-task/tsconfig.json similarity index 100% rename from src/Tasks/dependency-check-build-task-v2/tsconfig.json rename to src/Tasks/dependency-check-build-task/tsconfig.json From f4c2ff914a9f72c7af3dd0ab2ed48d73f6bb9944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Tue, 16 Feb 2021 08:49:58 -0500 Subject: [PATCH 18/25] ignore data --- .gitignore | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 07a0271..c716d05 100644 --- a/.gitignore +++ b/.gitignore @@ -32,8 +32,8 @@ node_modules .taskkey # Dep check data directory files -src/Tasks/dependency-check-build-task*/dependency-check/* -src/Tasks/dependency-check-build-task*/dependency-check/data/* -src/Tasks/dependency-check-build-task*/dependency-check-build-task.js -!src/Tasks/dependency-check-build-task*/dependency-check/data -!src/Tasks/dependency-check-build-task*/dependency-check/data/README.md \ No newline at end of file +src/Tasks/dependency-check-build-task/dependency-check/* +src/Tasks/dependency-check-build-task/dependency-check/data/* +src/Tasks/dependency-check-build-task/dependency-check-build-task.js +!src/Tasks/dependency-check-build-task/dependency-check/data +!src/Tasks/dependency-check-build-task/dependency-check/data/README.md \ No newline at end of file From 4fd7e6a6d13f9407efdfed3f4e6720727eff2a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Tue, 16 Feb 2021 10:41:54 -0500 Subject: [PATCH 19/25] compile task on build --- build/build.sh | 10 +++++++++- src/Tasks/dependency-check-build-task/package.json | 2 +- tsconfig.json | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build/build.sh b/build/build.sh index b6662da..411cbe4 100644 --- a/build/build.sh +++ b/build/build.sh @@ -4,6 +4,14 @@ # Unfortunately can't include cached data in the VSIX, exceeds max size for package upload (booooo). #./src/Tasks/dependency-check-build-task/dependency-check/bin/dependency-check.sh --updateonly +srcPath=`pwd` + +# build the task +cd ./src/Tasks/dependency-check-build-task/ +npm install +npm run build + # build the extension +cd $srcPath npm install -npm run build \ No newline at end of file +npm run build diff --git a/src/Tasks/dependency-check-build-task/package.json b/src/Tasks/dependency-check-build-task/package.json index a0d26e9..5b91b7c 100644 --- a/src/Tasks/dependency-check-build-task/package.json +++ b/src/Tasks/dependency-check-build-task/package.json @@ -4,7 +4,7 @@ "description": "", "main": "dependency-check-build-task.js", "scripts": { - "install-libs": "npm install" + "build": "tsc -p ." }, "author": "Dependency Check", "license": "Apache-2.0", diff --git a/tsconfig.json b/tsconfig.json index 810a8c4..9236458 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,6 @@ ] }, "files": [ - "src/enhancer/dependencycheck.ts", + "src/enhancer/dependencycheck.ts" ] } \ No newline at end of file From b3f8cf7ac7d2308d8978849fa5a667bae8c597d8 Mon Sep 17 00:00:00 2001 From: Eric Johnson Date: Tue, 16 Feb 2021 11:03:44 -0600 Subject: [PATCH 20/25] Docs: updated to cross-platform agents + GH repo --- overview.md | 8 +++++++- src/Tasks/dependency-check-build-task/task.json | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/overview.md b/overview.md index 06ff709..8fd6a1c 100644 --- a/overview.md +++ b/overview.md @@ -10,6 +10,10 @@ The OWASP Dependency Check Azure DevOps Extension enables the following features - Download vulnerability reports from the build's artifacts +## GitHub Repository + +The extension maintainers do not monitor the Marketplace Q & A. For questions, issues, or enhancements, please use the [Azure DevOps Dependency Check](https://github.com/dependency-check/azuredevops) repository issues. + ## Installation and Configuration - Install the [OWASP Dependency Check](https://marketplace.visualstudio.com/items?itemName=dependency-check.dependencycheck) extension into your Azure DevOps Organization. @@ -66,7 +70,7 @@ More details on configuring and running Dependency Check can be found at [https: ## Supported Environments -- Azure DevOps Agents must be running a Windows agent with Powershell to execute the build task. +- The Dependency Check Azure DevOps extension has been converted to TypeScript as of version 6.0. With this update, both Linux and Windows build agents are supported. ## Contributors @@ -77,3 +81,5 @@ The following contributor(s) help maintain the Azure DevOps extension: - Eric Johnson ([@emjohn20](https://twitter.com/emjohn20)) - Principal Security Engineer, Puma Security - Even Schjølberg, Upheads + +- [Alain Croisetiere](https://github.com/alaincroisetiere) diff --git a/src/Tasks/dependency-check-build-task/task.json b/src/Tasks/dependency-check-build-task/task.json index d67a97f..b31a089 100644 --- a/src/Tasks/dependency-check-build-task/task.json +++ b/src/Tasks/dependency-check-build-task/task.json @@ -119,7 +119,7 @@ "name": "localInstallPath", "type": "filePath", "label": "Local Install Path", - "helpMarkDown": "The local path to the `dependency-check` installation directory (on-prem build agents only). Setting this field will run the Dependency Check locally instead of downloading the installer onto the build agent.", + "helpMarkDown": "The local path to the `dependency-check` installation directory (on-prem build agents only). Setting this field will run Dependency Check locally instead of downloading the installer onto the build agent.", "defaultValue": "", "required": false }, @@ -135,7 +135,7 @@ "name": "dependencyCheckVersion", "type": "string", "label": "Installer Version", - "helpMarkDown": "By default, the build task downloads the installer from the Dependency Check GitHub releases. Setting this field will change the Dependency Check version downloaded onto the build agent.", + "helpMarkDown": "By default, the build task downloads the latest installer from the Dependency Check GitHub releases. Setting this field will change the Dependency Check version downloaded onto the build agent.", "defaultValue": "latest", "required": false }, From ab33e9c583055f9ae73be09099c077f3bdd736c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Wed, 17 Feb 2021 11:07:06 -0500 Subject: [PATCH 21/25] Fix path parameter to support ANT style path --- .../dependency-check-build-task.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts index a5ccece..60c4de6 100644 --- a/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts +++ b/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts @@ -20,8 +20,8 @@ async function run() { try { // Get inputs from build task. let projectName: string | undefined = tl.getInput('projectName', true); - let scanPath: string | undefined = tl.getPathInput('scanPath', true, true); - let excludePath: string | undefined = tl.getPathInput('excludePath'); + let scanPath: string | undefined = tl.getInput('scanPath', true); + let excludePath: string | undefined = tl.getInput('excludePath'); let format: string | undefined = tl.getInput('format', true); let failOnCVSS: string | undefined = tl.getInput('failOnCVSS'); let suppressionPath: string | undefined = tl.getPathInput('suppressionPath'); From 6601409a65e1582768d4372ed7ccf9ac683c2303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Wed, 17 Feb 2021 11:17:04 -0500 Subject: [PATCH 22/25] change comment of test locally --- .../dependency-check-build-task.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts index 60c4de6..6a9845a 100644 --- a/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts +++ b/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts @@ -10,9 +10,9 @@ const releaseApi = 'https://api.github.com/repos/jeremylong/DependencyCheck/rele // Install prerequisites : https://docs.microsoft.com/en-us/azure/devops/extend/develop/add-build-task?view=azure-devops#prerequisites // To test locally Run: -// cd ./Tasks/dependency-check-build-task-v2/ +// cd ./Tasks/dependency-check-build-task/ // npm install -// tsc +// npm run build // node dependency-check-build-task.js async function run() { From ea521586fc56b461ddd1589610d49cfe53ff7252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alain=20Croiseti=C3=A8re?= Date: Wed, 17 Feb 2021 11:24:50 -0500 Subject: [PATCH 23/25] use getPathInput should works wth check parameter to false by default --- .../dependency-check-build-task.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts b/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts index 6a9845a..e31b858 100644 --- a/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts +++ b/src/Tasks/dependency-check-build-task/dependency-check-build-task.ts @@ -20,8 +20,8 @@ async function run() { try { // Get inputs from build task. let projectName: string | undefined = tl.getInput('projectName', true); - let scanPath: string | undefined = tl.getInput('scanPath', true); - let excludePath: string | undefined = tl.getInput('excludePath'); + let scanPath: string | undefined = tl.getPathInput('scanPath', true); + let excludePath: string | undefined = tl.getPathInput('excludePath'); let format: string | undefined = tl.getInput('format', true); let failOnCVSS: string | undefined = tl.getInput('failOnCVSS'); let suppressionPath: string | undefined = tl.getPathInput('suppressionPath'); From 0859162a46a652b6abec0ad42e68a6cd303e9ffa Mon Sep 17 00:00:00 2001 From: Eric Johnson Date: Fri, 5 Mar 2021 14:39:29 -0600 Subject: [PATCH 24/25] feat: minor doc updates --- overview.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/overview.md b/overview.md index 8fd6a1c..94a3749 100644 --- a/overview.md +++ b/overview.md @@ -4,7 +4,7 @@ Dependency-Check is a software composition analysis utility that identifies proj The OWASP Dependency Check Azure DevOps Extension enables the following features in an Azure Build Pipeline: -- Software composition analysis runs against package references during each build +- Software composition analysis runs against package references during build on both Windows and Linux build agents. - Export vulnerability data to HTML, JSON, XML, CSV, JUnit formatted reports @@ -12,7 +12,7 @@ The OWASP Dependency Check Azure DevOps Extension enables the following features ## GitHub Repository -The extension maintainers do not monitor the Marketplace Q & A. For questions, issues, or enhancements, please use the [Azure DevOps Dependency Check](https://github.com/dependency-check/azuredevops) repository issues. +The extension maintainers do not monitor the Marketplace Question & Answers. please use the [Azure DevOps Dependency Check](https://github.com/dependency-check/azuredevops) repository for questions, issues, or enhancements. ## Installation and Configuration @@ -70,7 +70,7 @@ More details on configuring and running Dependency Check can be found at [https: ## Supported Environments -- The Dependency Check Azure DevOps extension has been converted to TypeScript as of version 6.0. With this update, both Linux and Windows build agents are supported. +- The Dependency Check Azure DevOps extension has been converted to TypeScript as of version 6.0. With this update, both Linux and Windows build agents are supported. ## Contributors From a8755197194d9839177c2f71b7a77e68c981e475 Mon Sep 17 00:00:00 2001 From: Eric Johnson Date: Fri, 5 Mar 2021 15:02:11 -0600 Subject: [PATCH 25/25] feat: codeowners file --- CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..6779586 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,2 @@ +# Default administrators group +* @dependency-check/administrators \ No newline at end of file