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

@enterprise-cmcs/macpro-security-hub-sync

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@enterprise-cmcs/macpro-security-hub-sync - npm Package Compare versions

Comparing version 1.12.0 to 1.13.0

2

dist/libs/security-hub-lib.d.ts

@@ -9,2 +9,3 @@ import { Remediation, AwsSecurityFinding } from "@aws-sdk/client-securityhub";

export interface SecurityHubFinding {
id?: string;
title?: string;

@@ -32,2 +33,3 @@ region?: string;

getAllActiveFindings(): Promise<{
id?: string | undefined;
title?: string | undefined;

@@ -34,0 +36,0 @@ region?: string | undefined;

@@ -98,2 +98,3 @@ "use strict";

return {
id: finding.Id,
title: finding.Title,

@@ -100,0 +101,0 @@ region: finding.Region,

@@ -32,2 +32,3 @@ import { Resource, SecurityHubFinding } from "./libs";

makeResourceList(resources: Resource[] | undefined): string;
createSecurityHubFindingUrlThroughFilters(findingId: string): string;
createIssueBody(finding: SecurityHubFinding): string;

@@ -34,0 +35,0 @@ createSecurityHubFindingUrl(standardsControlArn?: string): string;

@@ -113,4 +113,33 @@ "use strict";

}
createSecurityHubFindingUrlThroughFilters(findingId) {
let region, accountId;
if (findingId.startsWith("arn:")) {
// Extract region and account ID from the ARN
const arnParts = findingId.split(":");
if (arnParts.length >= 5) {
region = arnParts[3];
accountId = arnParts[4];
}
else {
return "Invalid URL";
}
}
else {
// Extract region and account ID from the non-ARN format
const parts = findingId.split("/");
if (parts.length >= 3) {
region = parts[1];
accountId = parts[2];
}
else {
return "Invalid URL";
}
}
const baseUrl = `https://${region}.console.aws.amazon.com/securityhub/home?region=${region}`;
const searchParam = `Id%3D%255Coperator%255C%253AEQUALS%255C%253A${findingId}`;
const url = `${baseUrl}#/findings?search=${searchParam}`;
return url;
}
createIssueBody(finding) {
const { remediation: { Recommendation: { Url: remediationUrl = "", Text: remediationText = "", } = {}, } = {}, title = "", description = "", accountAlias = "", awsAccountId = "", severity = "", standardsControlArn = "", } = finding;
const { remediation: { Recommendation: { Url: remediationUrl = "", Text: remediationText = "", } = {}, } = {}, id = "", title = "", description = "", accountAlias = "", awsAccountId = "", severity = "", standardsControlArn = "", } = finding;
return `----

@@ -148,3 +177,5 @@

h2. SecurityHubFindingUrl:
${this.createSecurityHubFindingUrl(standardsControlArn)}
${standardsControlArn
? this.createSecurityHubFindingUrl(standardsControlArn)
: this.createSecurityHubFindingUrlThroughFilters(id)}

@@ -151,0 +182,0 @@ h2. Resources:

2

package.json

@@ -7,3 +7,3 @@ {

},
"version": "1.12.0",
"version": "1.13.0",
"description": "NPM module to create Jira issues for all findings in Security Hub for the current AWS account..",

@@ -10,0 +10,0 @@ "main": "./dist/index.js",

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