1.14.4 • Published 5 months ago

@enterprise-cmcs/macpro-security-hub-sync v1.14.4

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

⚠️ DEPRECATED - macpro-security-hub-sync v1

🚨 IMPORTANT NOTICE: This package (v1) is deprecated and no longer maintained.

All users should migrate to the new version: mac-fc-security-hub-visibility v2

This v1 package should only be used by teams still using Atlassian Jira who cannot immediately migrate.


About This Package

This NPM module creates Jira issues for AWS Security Hub findings in your current AWS account. However, this version is deprecated and users should migrate to the newer, actively maintained version.

Slack Latest Release NPM Version Maintainability Test Coverage Semantic Release Dependabot Code Style: Prettier

Migration Notice

Before using this package, please consider migrating to the newer version:

  • New Version: mac-fc-security-hub-visibility v2
  • Recommended for: All Enterprise Jira teams
  • This v1 version: Only for teams using Atlassian Jira who cannot immediately migrate

Usage (Deprecated)

⚠️ Warning: This usage information is for the deprecated v1 package. Please migrate to v2 instead.

Environment Variables

Set the following environment variables:

export JIRA_HOST=yourorg.atlassian.net
export JIRA_PROJECT=OY2  # Jira Project ID
export JIRA_USERNAME="myuser@example.com"
export JIRA_TOKEN="your-personal-access-token"  # Generate from Atlassian

The JIRA_TOKEN should be a Personal Access Token.

Installation

npm install @enterprise-cmcs/macpro-security-hub-sync --save-dev

Basic Usage

import { SecurityHubJiraSync } from "@enterprise-cmcs/macpro-security-hub-sync";

await new SecurityHubJiraSync().sync();

Advanced Configuration

await new SecurityHubJiraSync({
  region: "us-west-2", // Default: "us-east-1"
  severities: ["HIGH", "CRITICAL"], // Default: ["MEDIUM", "HIGH", "CRITICAL"]
  customJiraFields: {
    customfield_14117: [{ value: "Platform Team" }],
    customfield_14151: [{ value: "Not Applicable" }],
  },
}).sync();

How It Works

Overview

This package synchronizes AWS Security Hub findings to Jira:

  • One Issue Per Finding Type: Each Security Hub finding type (title) creates a single Jira issue, regardless of how many resources are affected
  • Severity Filtering: By default, only CRITICAL and HIGH severity findings create Jira issues (configurable)
  • Automatic Closure: When findings are resolved in Security Hub, corresponding Jira issues are automatically closed on the next sync

Sync Process

  1. Retrieve Open Issues: Get all open Security Hub-related Jira issues (identified by label convention)
  2. Get Current Findings: Fetch all current findings from AWS Security Hub
  3. Close Resolved Issues: Close Jira issues for findings that are no longer active
  4. Create New Issues: Create Jira issues for new findings that don't have existing issues

Local Development (Deprecated)

⚠️ Note: These instructions are for the deprecated v1 package.

Testing with Yarn Link

  1. In your local clone of macpro-security-hub-sync:

    yarn link
    npm install
    npm run build
  2. In your test project:

    rm -rf node_modules
    yarn link "@enterprise-cmcs/macpro-security-hub-sync"
    yarn install
  3. When testing is complete

    yarn unlink "@enterprise-cmcs/macpro-security-hub-sync"
    yarn unlink  # Run this in the macpro-security-hub-sync directory

Advanced Features (Deprecated)

Automated Closure (v1.7.0+)

Control automatic ticket closure:

AUTO_CLOSE=true   # Automatically close resolved tickets
AUTO_CLOSE=false  # Add resolution comment instead of closing

Issue Linking (v1.7.2+)

Link new issues to existing Jira issues:

JIRA_FEATURE_KEY='PJ-12'
JIRA_LINK_TYPE='Relates'
JIRA_LINK_DIRECTION='inward'  # v1.11.0+

Custom Labels Configuration

Configure custom labels with JSON:

jira-labels-config='[{"labelField":"ProductName","labelPrefix":"product","labelDelimiter":":"}, {"labelField":"severity"}]'

Multi-Product Support

Include findings from other security products:

include-all-products=true
skip-products="Trivy, Guard Duty"

Ticket Assignment

Assign new tickets to specific users:

ASSIGNEE='user1253'

Resource Information (v1.9.0+)

Non-compliant resources are automatically included in issue descriptions:

Resource Id | Partition | Region | Type
resource-xxvysdh | aws | us-east-1 | AwsDynamoDbTable

Contributing

⚠️ Note: This project is deprecated. Consider contributing to the new version instead.

License

License

See LICENSE for full details.


🚨 Final Reminder

This package is deprecated. Please migrate to mac-fc-security-hub-visibility v2 for continued support and new features.

1.14.4

5 months ago

1.14.1

1 year ago

1.14.0

1 year ago

1.11.3

1 year ago

1.13.0

1 year ago

1.11.2

1 year ago

1.12.0

1 year ago

1.11.1

1 year ago

1.10.2

1 year ago

1.14.3

1 year ago

1.14.2

1 year ago

1.9.0

1 year ago

1.7.2

1 year ago

1.8.0

1 year ago

1.7.1

1 year ago

1.7.0

1 year ago

1.11.0

1 year ago

1.10.1

1 year ago

1.10.0

1 year ago

1.6.4

2 years ago

1.6.3

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago