API/api.medcify.app/node_modules/snyk/dist/cli/726.index.js.map
2022-09-26 11:41:44 +05:30

1 line
28 KiB
Plaintext

{"version":3,"file":"726.index.js","mappings":";;;;;;;AAAA;AACA,aAAa,mBAAO,CAAC,KAAM;AAC3B;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE,2CAAiD;AACnD;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzBA,0DAA4D;AAC5D,+CAA8D;AAC9D,2CAI6B;AAC7B,0DAAiG;AACjG,6DAAwG;AACxG,4CAAsC;AACtC,+CAA4E;AAC5E,6CAAiD;AACjD,4CAAqD;AACrD,sEAAkG;AAClG,0CAA0B;AAC1B,6CAA4E;AAE5E,kBAAe,KAAK,EAAE,GAAG,IAAgB,EAAgB,EAAE;;IACzD,MAAM,EAAE,OAAO,EAAE,GAAG,yCAAkB,CAAC,GAAG,IAAI,CAAC,CAAC;IAEhD,sFAAsF;IACtF,qCAAqC;IACrC,IAAI,OAAO,CAAC,GAAG,IAAI,IAAI,EAAE;QACvB,OAAO,WAAW,CAAC,UAAU,CAAC,CAAC;KAChC;IAED,iDAAiD;IACjD,8BAA8B;IAC9B,MAAM,WAAW,SAAG,OAAO,CAAC,GAAG,mCAAI,gBAAM,CAAC,GAAG,CAAC;IAC9C,MAAM,cAAc,GAAG,MAAM,wCAAiB,CAAC,WAAW,CAAC,CAAC;IAC5D,IAAI,QAAC,cAAc,CAAC,YAAY,0CAAE,QAAQ,GAAE;QAC1C,MAAM,IAAI,4DAAkC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;KACnE;IAED,MAAM,MAAM,GAAG,MAAM,0BAAiB,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACtE,MAAM,WAAW,GAAG,6BA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,GAAG,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;IAElD,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE;QAChC,OAAO;KACR;IACD,IAAI,MAAM,CAAC;IACX,IAAI;QACF,MAAM,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;KAC7D;IAAC,OAAO,GAAG,EAAE;QACZ,iDAAiD;QACjD,6CAA6C;QAC7C,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS,EAAE;YACnD,MAAM,GAAG,CAAC;SACX;KACF;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAvCD,8CAuCC;;;;;;;;;;;AClDD,kDAAiD;AAAxC,6HAAa;AACtB,uDAA2D;AAAlD,2IAAiB;;;;;;;;;;;;ACD1B,MAAM,OAAO,GAAG,mBAAO,CAAC,IAAgB,CAAC,CAAC;AAG1C,SAAgB,aAAa,CAAC,GAAoB;IAChD,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,EAAE,CAAC;KACX;IAED,IAAI,GAAG,CAAC,IAAI,EAAE;QACZ,OAAO,GAAG,CAAC,IAAI,CAAC;KACjB;IAED,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE;QACrB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,OAAO,CACZ,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC;SAC1B,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;SAC5D,MAAM,CAAC,OAAO,CAAC,CACnB,CAAC;AACJ,CAAC;AAlBD,sCAkBC","sources":["webpack://snyk/./node_modules/inherits/inherits.js","webpack://snyk/./node_modules/inherits/inherits_browser.js","webpack://snyk/./src/cli/commands/describe.ts","webpack://snyk/./src/cli/commands/help/index.ts","webpack://snyk/./src/cli/commands/help/markdown-renderer.ts","webpack://snyk/./src/cli/commands/help/reflow-text.ts","webpack://snyk/./src/cli/commands/process-command-args.ts","webpack://snyk/./src/lib/policy/find-and-load-policy.ts","webpack://snyk/./src/lib/policy/index.ts","webpack://snyk/./src/lib/policy/pluck-policies.ts"],"sourcesContent":["try {\n var util = require('util');\n /* istanbul ignore next */\n if (typeof util.inherits !== 'function') throw '';\n module.exports = util.inherits;\n} catch (e) {\n /* istanbul ignore next */\n module.exports = require('./inherits_browser.js');\n}\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","import { MethodArgs } from '../args';\nimport { processCommandArgs } from './process-command-args';\nimport * as legacyError from '../../lib/errors/legacy-errors';\nimport {\n driftignoreFromPolicy,\n parseDriftAnalysisResults,\n processAnalysis,\n} from '../../lib/iac/drift';\nimport { getIacOrgSettings } from './test/iac/local-execution/org-settings/get-iac-org-settings';\nimport { UnsupportedEntitlementCommandError } from './test/iac/local-execution/assert-iac-options-flag';\nimport config from '../../lib/config';\nimport { addIacDriftAnalytics } from './test/iac/local-execution/analytics';\nimport * as analytics from '../../lib/analytics';\nimport { findAndLoadPolicy } from '../../lib/policy';\nimport { DescribeRequiredArgumentError } from '../../lib/errors/describe-required-argument-error';\nimport help from './help';\nimport { DCTL_EXIT_CODES, runDriftCTL } from '../../lib/iac/drift/driftctl';\n\nexport default async (...args: MethodArgs): Promise<any> => {\n const { options } = processCommandArgs(...args);\n\n // Ensure that this describe command can only be runned when using `snyk iac describe`\n // Avoid `snyk describe` direct usage\n if (options.iac != true) {\n return legacyError('describe');\n }\n\n // Ensure that we are allowed to run that command\n // by checking the entitlement\n const orgPublicId = options.org ?? config.org;\n const iacOrgSettings = await getIacOrgSettings(orgPublicId);\n if (!iacOrgSettings.entitlements?.iacDrift) {\n throw new UnsupportedEntitlementCommandError('drift', 'iacDrift');\n }\n\n const policy = await findAndLoadPolicy(process.cwd(), 'iac', options);\n const driftIgnore = driftignoreFromPolicy(policy);\n\n try {\n const describe = await runDriftCTL({\n options: { ...options, kind: 'describe' },\n driftIgnore: driftIgnore,\n });\n\n process.exitCode = describe.code;\n\n analytics.add('is-iac-drift', true);\n analytics.add('iac-drift-exit-code', describe.code);\n if (describe.code === DCTL_EXIT_CODES.EXIT_ERROR) {\n throw new Error();\n }\n\n // Parse analysis JSON and add to analytics\n const analysis = parseDriftAnalysisResults(describe.stdout);\n addIacDriftAnalytics(analysis, options);\n\n const output = await processAnalysis(options, describe);\n process.stdout.write(output);\n } catch (e) {\n if (e instanceof DescribeRequiredArgumentError) {\n // when missing a required arg we will display help to explain\n const helpMsg = await help('iac', 'describe');\n console.log(helpMsg);\n }\n return Promise.reject(e);\n }\n};\n","import * as fs from 'fs';\nimport * as path from 'path';\nimport { MethodArgs } from '../../args';\nimport { renderMarkdown } from './markdown-renderer';\n\nexport function findHelpFile(\n helpArgs: string[],\n helpFolderPath = '../../help/cli-commands', // this is a relative path from the webpack dist directory,\n): string {\n while (helpArgs.length > 0) {\n // cleanse the filename to only contain letters\n // aka: /\\W/g but figured this was easier to read\n const file = `${helpArgs.join('-').replace(/[^a-z0-9-]/gi, '')}.md`;\n const testHelpAbsolutePath = path.resolve(__dirname, helpFolderPath, file);\n if (fs.existsSync(testHelpAbsolutePath)) {\n return testHelpAbsolutePath;\n }\n helpArgs = helpArgs.slice(0, -1);\n }\n return path.resolve(__dirname, helpFolderPath, `README.md`); // Default help file\n}\n\nexport default async function help(...args: MethodArgs): Promise<string> {\n const helpArgs = args.filter((arg): arg is string => typeof arg === 'string');\n const helpFileAbsolutePath = findHelpFile(helpArgs);\n return renderMarkdown(fs.readFileSync(helpFileAbsolutePath, 'utf8'));\n}\n","import { marked } from 'marked';\nimport chalk from 'chalk';\nimport { reflowText } from './reflow-text';\n\n// stateful variable to control left-padding by header level\nlet currentHeader = 1;\nconst listItemSeparator = 'LISTITEMSEPARATOR'; // Helper string for rendering ListItems\n\n/**\n * @description get padding spaces depending on the last header level used\n * @returns string\n */\nfunction getLeftTextPadding(): string {\n return ' '.repeat(\n currentHeader === 1 || currentHeader === 2 ? 1 : currentHeader - 1,\n );\n}\n\n/**\n * @description Reads current terminal width if available to limit column width for text-reflowing\n * @returns {number}\n */\nconst defaultMaximumLineWidth = 100;\nfunction getIdealTextWidth(maximumLineWidth = defaultMaximumLineWidth): number {\n if (typeof process.stdout.columns === 'number') {\n if (process.stdout.columns < maximumLineWidth) {\n return process.stdout.columns - getLeftTextPadding().length - 5;\n }\n }\n return maximumLineWidth - getLeftTextPadding().length;\n}\n\n// Marked custom renderer class\nconst renderer = {\n em(text) {\n return chalk.italic(text);\n },\n strong(text) {\n return chalk.bold(text);\n },\n link(href, title, text) {\n // Don't render links to relative paths (like local files)\n if (href.startsWith('./') || !href.includes('://')) {\n return text;\n }\n const renderedLink = chalk.bold.blueBright(href);\n if (text && text !== href) {\n return `${text} ${renderedLink}`;\n }\n return renderedLink;\n },\n blockquote(quote) {\n return quote;\n },\n list(body, ordered, start) {\n return (\n body\n .split(listItemSeparator)\n .map((listItem, listItemIndex) => {\n const bulletPoint = ordered ? `${listItemIndex + start}. ` : '- ';\n return reflowText(listItem, getIdealTextWidth())\n .split('\\n')\n .map((listItemLine, listItemLineIndex) => {\n if (!listItemLine) {\n return '';\n }\n return `${getLeftTextPadding()}${\n listItemLineIndex === 0 ? bulletPoint : ' '\n }${listItemLine}`;\n })\n .join('\\n');\n })\n .join('\\n') + '\\n'\n );\n },\n listitem(text) {\n return text + listItemSeparator;\n },\n paragraph(text) {\n return (\n reflowText(text, getIdealTextWidth())\n .split('\\n')\n .map((s) => getLeftTextPadding() + chalk.reset() + s)\n .join('\\n') + '\\n\\n'\n );\n },\n codespan(text) {\n return chalk.italic.blueBright(`${text}`);\n },\n code(code) {\n return (\n code\n .split('\\n')\n .map((s) => getLeftTextPadding() + chalk.reset() + s)\n .join('\\n') + '\\n\\n'\n );\n },\n heading(text, level) {\n currentHeader = level;\n let coloring;\n switch (level) {\n case 1:\n coloring = chalk.bold.underline;\n break;\n case 3:\n case 4:\n coloring = chalk;\n break;\n default:\n coloring = chalk.bold;\n break;\n }\n return `${' '.repeat(level === 1 ? 0 : currentHeader - 2)}${coloring(\n text,\n )}\\n`;\n },\n};\n\nmarked.use({ renderer });\nmarked.setOptions({\n mangle: false,\n});\n\nconst htmlUnescapes = {\n '&amp;': '&',\n '&lt;': '<',\n '&gt;': '>',\n '&quot;': '\"',\n '&#39;': \"'\",\n '&#96;': '`',\n '&#x20;': '',\n};\n\n/**\n * @description Replace HTML entities with their non-encoded variant\n * @param {string} text\n * @returns {string}\n */\nfunction unescape(text: string): string {\n Object.entries(htmlUnescapes).forEach(([escapedChar, unescapedChar]) => {\n const escapedCharRegExp = new RegExp(escapedChar, 'g');\n text = text.replace(escapedCharRegExp, unescapedChar);\n });\n return text;\n}\n\nexport function renderMarkdown(markdown: string): string {\n return unescape(marked.parse(markdown));\n}\n","/**\nCode in this file is adapted from mikaelbr/marked-terminal\nhttps://github.com/mikaelbr/marked-terminal/blob/7501b8bb24a5ed52ec7d9114d4aeefa14f1bf5e6/index.js#L234-L330\n\n\nMIT License\n\nCopyright (c) 2017 Mikael Brevik\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n */\n\n// Compute length of str not including ANSI escape codes.\n// See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\nfunction textLength(str: string): number {\n // eslint-disable-next-line no-control-regex\n return str.replace(/\\u001b\\[(?:\\d{1,3})(?:;\\d{1,3})*m/g, '').length;\n}\n\n// Munge \\n's and spaces in \"text\" so that the number of\n// characters between \\n's is less than or equal to \"width\".\nexport function reflowText(text: string, width: number): string {\n const HARD_RETURN = '\\r|\\n';\n const HARD_RETURN_GFM_RE = new RegExp(HARD_RETURN + '|<br ?/?>');\n\n const splitRe = HARD_RETURN_GFM_RE;\n const sections = text.split(splitRe);\n const reflowed = [] as string[];\n\n sections.forEach((section) => {\n // Split the section by escape codes so that we can\n // deal with them separately.\n // eslint-disable-next-line no-control-regex\n const fragments = section.split(/(\\u001b\\[(?:\\d{1,3})(?:;\\d{1,3})*m)/g);\n let column = 0;\n let currentLine = '';\n let lastWasEscapeChar = false;\n\n while (fragments.length) {\n const fragment = fragments[0];\n\n if (fragment === '') {\n fragments.splice(0, 1);\n lastWasEscapeChar = false;\n continue;\n }\n\n // This is an escape code - leave it whole and\n // move to the next fragment.\n if (!textLength(fragment)) {\n currentLine += fragment;\n fragments.splice(0, 1);\n lastWasEscapeChar = true;\n continue;\n }\n\n const words = fragment.split(/[ \\t\\n]+/);\n\n for (let i = 0; i < words.length; i++) {\n let word = words[i];\n let addSpace = column != 0;\n if (lastWasEscapeChar) addSpace = false;\n\n // If adding the new word overflows the required width\n if (column + word.length > width) {\n if (word.length <= width) {\n // If the new word is smaller than the required width\n // just add it at the beginning of a new line\n reflowed.push(currentLine);\n currentLine = word;\n column = word.length;\n } else {\n // If the new word is longer than the required width\n // split this word into smaller parts.\n const w = word.substr(0, width - column);\n if (addSpace) currentLine += ' ';\n currentLine += w;\n reflowed.push(currentLine);\n currentLine = '';\n column = 0;\n\n word = word.substr(w.length);\n while (word.length) {\n const w = word.substr(0, width);\n\n if (!w.length) break;\n\n if (w.length < width) {\n currentLine = w;\n column = w.length;\n break;\n } else {\n reflowed.push(w);\n word = word.substr(width);\n }\n }\n }\n } else {\n if (addSpace) {\n currentLine += ' ';\n column++;\n }\n\n currentLine += word;\n column += word.length;\n }\n\n lastWasEscapeChar = false;\n }\n\n fragments.splice(0, 1);\n }\n\n if (textLength(currentLine)) reflowed.push(currentLine);\n });\n\n return reflowed.join('\\n');\n}\n","import { Options } from '../../lib/types';\n\nexport function processCommandArgs<CommandOptions>(\n ...args\n): { paths: string[]; options: Options & CommandOptions } {\n let options = ({} as any) as Options & CommandOptions;\n\n if (typeof args[args.length - 1] === 'object') {\n options = (args.pop() as any) as Options & CommandOptions;\n }\n args = args.filter(Boolean);\n\n // For repository scanning, populate with default path (cwd) if no path given\n if (args.length === 0 && !options.docker) {\n args.unshift(process.cwd());\n }\n\n return { options, paths: args };\n}\n","import * as snykPolicyLib from 'snyk-policy';\nimport * as debugModule from 'debug';\nimport { PackageExpanded } from 'snyk-resolve-deps';\n\nimport { pluckPolicies } from '.';\nimport { SupportedPackageManagers } from '../package-managers';\nimport { PackageJson, PolicyOptions } from '../types';\nimport * as analytics from '../analytics';\n\nconst debug = debugModule('snyk');\n\nexport async function findAndLoadPolicy(\n root: string,\n scanType: SupportedPackageManagers | 'docker' | 'iac' | 'cpp',\n options: PolicyOptions,\n pkg?: PackageExpanded,\n scannedProjectFolder?: string,\n): Promise<Policy | undefined> {\n const isDocker = scanType === 'docker';\n const isNodeProject = ['npm', 'yarn'].includes(scanType);\n // monitor\n let policyLocations: string[] = [\n options['policy-path'] || scannedProjectFolder || root,\n ];\n if (isDocker) {\n policyLocations = policyLocations.filter((loc) => loc !== root);\n } else if (isNodeProject) {\n // TODO: pluckPolicies expects a package.json object to\n // find and apply policies in node_modules\n policyLocations = policyLocations.concat(pluckPolicies(pkg as PackageJson));\n }\n\n debug('Potential policy locations found:', policyLocations);\n analytics.add('policies', policyLocations.length);\n analytics.add('policyLocations', policyLocations);\n\n if (policyLocations.length === 0) {\n return;\n }\n let policy;\n try {\n policy = await snykPolicyLib.load(policyLocations, options);\n } catch (err) {\n // note: inline catch, to handle error from .load\n // if the .snyk file wasn't found, it is fine\n if (err.code !== 'ENOENT' && err.code !== 'ENOTDIR') {\n throw err;\n }\n }\n return policy;\n}\n\nexport interface Policy {\n filter(vulns: any, root?: string, matchStrategy?: string): any;\n exclude?: { [key: string]: string[] };\n ignore?: any;\n}\n","export { pluckPolicies } from './pluck-policies';\nexport { findAndLoadPolicy } from './find-and-load-policy';\n","const flatten = require('lodash.flatten');\nimport { PackageExpanded } from 'snyk-resolve-deps';\n\nexport function pluckPolicies(pkg: PackageExpanded): string[] | string {\n if (!pkg) {\n return [];\n }\n\n if (pkg.snyk) {\n return pkg.snyk;\n }\n\n if (!pkg.dependencies) {\n return [];\n }\n\n return flatten(\n Object.keys(pkg.dependencies)\n .map((name: string) => pluckPolicies(pkg.dependencies[name]))\n .filter(Boolean),\n );\n}\n"],"names":[],"sourceRoot":""}