@xliic/cicd-core-node
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -38,3 +38,3 @@ "use strict"; | ||
let mappedFiles = null; | ||
let failureConditions = DEFAULT_FAILURE_CONDITIONS; | ||
let failureConditions = Object.assign({}, DEFAULT_FAILURE_CONDITIONS); | ||
let audit = {}; | ||
@@ -45,6 +45,12 @@ const confFilePath = path.join(rootDir, CONF_FILE); | ||
} | ||
else if (mandatoryConfig) { | ||
throw new ConfigError(`Config file ${CONF_FILE} is not found`); | ||
else { | ||
if (mandatoryConfig) { | ||
throw new ConfigError(`Config file ${CONF_FILE} is not found`); | ||
} | ||
else { | ||
// don't check for unmapped files if config file does not exists | ||
failureConditions.unmapped_files = false; | ||
} | ||
} | ||
if (typeof (audit === null || audit === void 0 ? void 0 : audit.discovery) === "boolean") { | ||
if (typeof audit.discovery === "boolean") { | ||
if (audit.discovery) { | ||
@@ -72,3 +78,3 @@ // discover files but do not audit | ||
// mapping section | ||
if (audit === null || audit === void 0 ? void 0 : audit.mapping) { | ||
if (audit.mapping) { | ||
mappedFiles = checkMappedFiles(audit.mapping); | ||
@@ -75,0 +81,0 @@ } |
{ | ||
"name": "@xliic/cicd-core-node", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "Performs API contract security audit to get a detailed analysis of the possible vulnerabilities and other issues in the API contract.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -49,3 +49,3 @@ /* | ||
let mappedFiles = null; | ||
let failureConditions: FailureConditions = DEFAULT_FAILURE_CONDITIONS; | ||
let failureConditions: FailureConditions = { ...DEFAULT_FAILURE_CONDITIONS }; | ||
let audit: AuditConfig = {}; | ||
@@ -61,7 +61,12 @@ | ||
); | ||
} else if (mandatoryConfig) { | ||
throw new ConfigError(`Config file ${CONF_FILE} is not found`); | ||
} else { | ||
if (mandatoryConfig) { | ||
throw new ConfigError(`Config file ${CONF_FILE} is not found`); | ||
} else { | ||
// don't check for unmapped files if config file does not exists | ||
failureConditions.unmapped_files = false; | ||
} | ||
} | ||
if (typeof audit?.discovery === "boolean") { | ||
if (typeof audit.discovery === "boolean") { | ||
if (audit.discovery) { | ||
@@ -88,3 +93,3 @@ // discover files but do not audit | ||
// mapping section | ||
if (audit?.mapping) { | ||
if (audit.mapping) { | ||
mappedFiles = checkMappedFiles(audit.mapping); | ||
@@ -91,0 +96,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
137642
2972