Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@xliic/cicd-core-node

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xliic/cicd-core-node - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

61

lib/config.js

@@ -39,39 +39,40 @@ "use strict";

let failureConditions = DEFAULT_FAILURE_CONDITIONS;
let audit = {};
const confFilePath = path.join(rootDir, CONF_FILE);
if (!fs.existsSync(confFilePath) && mandatoryConfig) {
if (fs.existsSync(confFilePath)) {
audit = readBranchConfig(branchName, parse_1.parseYaml(rootDir, CONF_FILE), confFilePath);
}
else if (mandatoryConfig) {
throw new ConfigError(`Config file ${CONF_FILE} is not found`);
}
else {
const audit = readBranchConfig(branchName, parse_1.parseYaml(rootDir, CONF_FILE), confFilePath);
if (typeof (audit === null || audit === void 0 ? void 0 : audit.discovery) === "boolean") {
if (audit.discovery) {
// discover files but do not audit
discoveryPatterns = DEFAULT_PATTERNS;
auditDiscovered = false;
}
else {
// discovery is fully disabled
discoveryPatterns = null;
auditDiscovered = false;
}
if (typeof (audit === null || audit === void 0 ? void 0 : audit.discovery) === "boolean") {
if (audit.discovery) {
// discover files but do not audit
discoveryPatterns = DEFAULT_PATTERNS;
auditDiscovered = false;
}
else {
discoveryPatterns =
typeof ((_a = audit.discovery) === null || _a === void 0 ? void 0 : _a.search) === "object"
? audit.discovery.search
: DEFAULT_PATTERNS;
auditDiscovered =
typeof ((_b = audit.discovery) === null || _b === void 0 ? void 0 : _b.audit) === "boolean"
? audit.discovery.audit
: false;
// discovery is fully disabled
discoveryPatterns = null;
auditDiscovered = false;
}
// mapping section
if (audit === null || audit === void 0 ? void 0 : audit.mapping) {
mappedFiles = checkMappedFiles(audit.mapping);
}
// failure conditions
if (audit.fail_on) {
failureConditions = Object.assign(Object.assign({}, failureConditions), audit.fail_on);
}
}
else {
discoveryPatterns =
typeof ((_a = audit.discovery) === null || _a === void 0 ? void 0 : _a.search) === "object"
? audit.discovery.search
: DEFAULT_PATTERNS;
auditDiscovered =
typeof ((_b = audit.discovery) === null || _b === void 0 ? void 0 : _b.audit) === "boolean"
? audit.discovery.audit
: false;
}
// mapping section
if (audit === null || audit === void 0 ? void 0 : audit.mapping) {
mappedFiles = checkMappedFiles(audit.mapping);
}
// failure conditions
if (audit.fail_on) {
failureConditions = Object.assign(Object.assign({}, failureConditions), audit.fail_on);
}
return { auditDiscovered, discoveryPatterns, mappedFiles, failureConditions };

@@ -78,0 +79,0 @@ }

{
"name": "@xliic/cicd-core-node",
"version": "2.2.0",
"version": "2.2.1",
"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",

@@ -50,8 +50,8 @@ /*

let failureConditions: FailureConditions = DEFAULT_FAILURE_CONDITIONS;
let audit: AuditConfig = {};
const confFilePath = path.join(rootDir, CONF_FILE);
if (!fs.existsSync(confFilePath) && mandatoryConfig) {
throw new ConfigError(`Config file ${CONF_FILE} is not found`);
} else {
const audit = readBranchConfig(
if (fs.existsSync(confFilePath)) {
audit = readBranchConfig(
branchName,

@@ -61,33 +61,35 @@ parseYaml(rootDir, CONF_FILE),

);
} else if (mandatoryConfig) {
throw new ConfigError(`Config file ${CONF_FILE} is not found`);
}
if (typeof audit?.discovery === "boolean") {
if (audit.discovery) {
// discover files but do not audit
discoveryPatterns = DEFAULT_PATTERNS;
auditDiscovered = false;
} else {
// discovery is fully disabled
discoveryPatterns = null;
auditDiscovered = false;
}
if (typeof audit?.discovery === "boolean") {
if (audit.discovery) {
// discover files but do not audit
discoveryPatterns = DEFAULT_PATTERNS;
auditDiscovered = false;
} else {
discoveryPatterns =
typeof audit.discovery?.search === "object"
? audit.discovery.search
: DEFAULT_PATTERNS;
auditDiscovered =
typeof audit.discovery?.audit === "boolean"
? audit.discovery.audit
: false;
// discovery is fully disabled
discoveryPatterns = null;
auditDiscovered = false;
}
} else {
discoveryPatterns =
typeof audit.discovery?.search === "object"
? audit.discovery.search
: DEFAULT_PATTERNS;
auditDiscovered =
typeof audit.discovery?.audit === "boolean"
? audit.discovery.audit
: false;
}
// mapping section
if (audit?.mapping) {
mappedFiles = checkMappedFiles(audit.mapping);
}
// mapping section
if (audit?.mapping) {
mappedFiles = checkMappedFiles(audit.mapping);
}
// failure conditions
if (audit.fail_on) {
failureConditions = { ...failureConditions, ...audit.fail_on };
}
// failure conditions
if (audit.fail_on) {
failureConditions = { ...failureConditions, ...audit.fail_on };
}

@@ -94,0 +96,0 @@

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