New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

snyk-delta

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

snyk-delta - npm Package Compare versions

Comparing version 1.7.1 to 1.7.2

17

dist/index.js

@@ -24,2 +24,3 @@ #!/usr/bin/env node

const getDelta = async (snykTestOutput = undefined, debugMode = false, setPassIfNoBaselineFlag = false, failOnOverride) => {
var _a, _b, _c, _d, _e;
if (process.env.NODE_ENV == 'prod') {

@@ -30,5 +31,5 @@ console.log(banner);

const debug = utils.getDebugModule();
const mode = argv.currentProject ?? argv.currentOrg ? 'standalone' : 'inline';
const mode = ((_a = argv.currentProject) !== null && _a !== void 0 ? _a : argv.currentOrg) ? 'standalone' : 'inline';
debug(mode, 'mode');
const passIfNoBaseline = argv.setPassIfNoBaseline ?? setPassIfNoBaselineFlag;
const passIfNoBaseline = (_b = argv.setPassIfNoBaseline) !== null && _b !== void 0 ? _b : setPassIfNoBaselineFlag;
let baselineProjectPublicID = argv.baselineProject;

@@ -41,5 +42,5 @@ let snykTestJsonDependencies, snykTestJsonResults, newVulns, newLicenseIssues;

}
const currentOrg = argv.currentOrg ?? '';
const currentProject = argv.currentProject ?? '';
const failOnFixableSetting = argv['fail-on'] ?? failOnOverride?.toLowerCase();
const currentOrg = (_c = argv.currentOrg) !== null && _c !== void 0 ? _c : '';
const currentProject = (_d = argv.currentProject) !== null && _d !== void 0 ? _d : '';
const failOnFixableSetting = (_e = argv['fail-on']) !== null && _e !== void 0 ? _e : failOnOverride === null || failOnOverride === void 0 ? void 0 : failOnOverride.toLowerCase();
if (failOnFixableSetting &&

@@ -50,3 +51,3 @@ !['all', 'upgradable', 'patchable'].includes(failOnFixableSetting.toLowerCase())) {

if (mode == 'inline') {
const rawSnykTestData = snykTestOutput ?? (await utils.getPipedDataIn());
const rawSnykTestData = snykTestOutput !== null && snykTestOutput !== void 0 ? snykTestOutput : (await utils.getPipedDataIn());
// Verify it's JSON data structure

@@ -78,5 +79,3 @@ debug('Verify input data for JSON structure');

if (!baselineProjectPublicID) {
baselineProjectPublicID =
projectId ??
(await snyk.getProjectUUID(baselineOrgPublicId, projectNameFromJson, 'cli', packageManager));
baselineProjectPublicID = projectId !== null && projectId !== void 0 ? projectId : (await snyk.getProjectUUID(baselineOrgPublicId, projectNameFromJson, 'cli', packageManager));
}

@@ -83,0 +82,0 @@ if (!baselineProjectPublicID) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertIntoIssueWithPath = exports.isVulnerablePathNew = void 0;
const tslib_1 = require("tslib");
const _ = require("lodash");

@@ -47,3 +48,3 @@ const snyk_1 = require("../snyk/snyk");

const issuePaths = await snyk_1.getUpgradePath(orgId, projectId, aggregatedIssueData.id);
const { cvssScore, ...everythingElse } = aggregatedIssueData;
const { cvssScore } = aggregatedIssueData, everythingElse = tslib_1.__rest(aggregatedIssueData, ["cvssScore"]);
issuesPostResponse.ok = true;

@@ -56,3 +57,3 @@ let pkgVersionIndex = 0;

while (LegacyPathIndex < issuePaths.IssueFromLegacy.length) {
const issueDataWithMissingField = { from: [], package: '', upgradePath: [], version: '', isPatched: aggregatedIssues.issues[issueIndex].isPatched, isIgnored: aggregatedIssues.issues[issueIndex].isIgnored, cvssScore: parseInt(cvssScore), ...everythingElse };
const issueDataWithMissingField = Object.assign({ from: [], package: '', upgradePath: [], version: '', isPatched: aggregatedIssues.issues[issueIndex].isPatched, isIgnored: aggregatedIssues.issues[issueIndex].isIgnored, cvssScore: parseInt(cvssScore) }, everythingElse);
issueDataWithMissingField.package = aggregatedIssues.issues[issueIndex].pkgName;

@@ -69,3 +70,3 @@ issueDataWithMissingField.version = versionKey;

while (LegacyPathIndex < issuePaths.IssueFromLegacy.length) {
const issueDataWithMissingField = { from: [], package: '', upgradePath: [], version: '', isPatched: aggregatedIssues.issues[issueIndex].isPatched, isIgnored: aggregatedIssues.issues[issueIndex].isIgnored, cvssScore: parseInt(cvssScore), ...everythingElse };
const issueDataWithMissingField = Object.assign({ from: [], package: '', upgradePath: [], version: '', isPatched: aggregatedIssues.issues[issueIndex].isPatched, isIgnored: aggregatedIssues.issues[issueIndex].isIgnored, cvssScore: parseInt(cvssScore) }, everythingElse);
issueDataWithMissingField.package = aggregatedIssues.issues[issueIndex].pkgName;

@@ -72,0 +73,0 @@ issueDataWithMissingField.version = versionKey;

@@ -5,3 +5,3 @@ {

"main": "dist/index.js",
"version": "1.7.1",
"version": "1.7.2",
"bin": {

@@ -8,0 +8,0 @@ "snyk-delta": "dist/index.js"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc