Giter Club home page Giter Club logo

graph-tenable-io's Introduction

JupiterOne Integration

Learn about the data ingested, benefits of this integration, and how to use it with JupiterOne in the integration documentation.

Development

Prerequisites

  1. Install Node.js using the installer or a version manager such as nvm or fnm.

  2. Install yarn or npm to install dependencies.

  3. Install dependencies with yarn install.

  4. Register an account in the system this integration targets for ingestion and obtain API credentials.

  5. cp .env.example .env and add necessary values for runtime configuration.

    When an integration executes, it needs API credentials and any other configuration parameters necessary for its work (provider API credentials, data ingestion parameters, etc.). The names of these parameters are defined by the IntegrationInstanceConfigFieldMapin src/config.ts. When the integration is executed outside the JupiterOne managed environment (local development or on-prem), values for these parameters are read from Node's process.env by converting config field names to constant case. For example, clientId is read from process.env.CLIENT_ID.

    The .env file is loaded into process.env before the integration code is executed. This file is not required should you configure the environment another way. .gitignore is configured to to avoid commiting the .env file.

Running the integration

  1. yarn start to collect data
  2. yarn graph to show a visualization of the collected data
  3. yarn j1-integration -h for additional commands

Making Contributions

Start by taking a look at the source code. The integration is basically a set of functions called steps, each of which ingests a collection of resources and relationships. The goal is to limit each step to as few resource types as possible so that should the ingestion of one type of data fail, it does not necessarily prevent the ingestion of other, unrelated data. That should be enough information to allow you to get started coding!

See the SDK development documentation for a deep dive into the mechanics of how integrations work.

See docs/development.md for any additional details about developing this integration.

Changelog

The history of this integration's development can be viewed at CHANGELOG.md.

Versioning this project

This project is versioned using auto.

Versioning and publishing to NPM are now handled via adding GitHub labels to pull requests. The following labels should be used for this process:

  • patch
  • minor
  • major
  • release

For each pull request, the degree of change should be registered by applying the appropriate label of patch, minor, or major. This allows the repository to keep track of the highest degree of change since the last release. When ready to publish to NPM, the PR should have both its appropriate patch, minor, or major label applied as well as a release label. The release label will denote to the system that we need to publish to NPM and will correctly version based on the highest degree of change since the last release, package the project, and publish it to NPM.

graph-tenable-io's People

Contributors

adamz611 avatar aiwilliams avatar austin-rausch avatar austinkelleher avatar befirst avatar ctdio avatar dependabot[bot] avatar electricgull avatar ericanagle1 avatar erichs avatar extremex avatar gonzalo-avalos-ribas avatar greenkeeper[bot] avatar j1-internal-automation avatar jablonnc avatar janettelynch avatar jayson-jensen-pro avatar jpodlasnisky avatar jroblesx avatar llravelo avatar mdaum avatar mknoedel avatar ndowmon avatar nick-ncsu avatar ronaldeam avatar sl45082 avatar vdubber avatar zemberdotnet avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graph-tenable-io's Issues

Validate Diffs

See computed diffs between the old integration & new integration. Notes:

  • This diff does not have any tenable_scan_report, tenable_scan_finding, tenable_scan_malware, or tenable_scan_unwanted_programs entities or associated relationships.
  • The id properties were changed from number to string in order to conform to some requirements of jobState.addEntity. I could change them back for posterity, and we could open issues to use createIntegrationEntity() for safety.
  • The mapper creates _key properties using the source entity ID, rather than source entity key. I've visually confirmed that the only difference between the 8 mapped relationships is that some of the old mapped relationships have a tag.AccountName property, where the new mapped relationships do not.
  • This diff was generated with two fresh integration instances. I'm not sure if the old integration had behavior that allowed certain findings / reports etc to not be deleted (partial datasets). I would appreciate a review of the old code to ensure I haven't missed any partial datasets in the conversion.
 {
   tenable_user_2232707: {
     properties: {
-      id: 2232707
+      id: "2232707"
     }
   }
   tenable_scan_19: {
     properties: {
-      id: 19
+      id: "19"
     }
   }
   tenable_scan_13: {
     properties: {
-      id: 13
+      id: "13"
     }
   }
   tenable_scan_17: {
     properties: {
-      id: 17
+      id: "17"
     }
   }
   tenable_scan_15: {
     properties: {
-      id: 15
+      id: "15"
     }
   }
   tenable_scan_11: {
     properties: {
-      id: 11
+      id: "11"
     }
   }
   tenable_vulnerability_finding_17_14272_1: {
     properties: {
       targets: [
+        "10.132.0.4"
+        "10.17.0.8"
         "159.89.38.68"
-        "10.17.0.8"
-        "10.132.0.4"
+        "36:25:49:fb:f3:86"
+        "a6:a1:a1:62:35:a6"
         "fe80:0:0:0:3425:49ff:fefb:f386"
         "fe80:0:0:0:a4a1:a1ff:fe62:35a6"
-        "36:25:49:fb:f3:86"
-        "a6:a1:a1:62:35:a6"
       ]
     }
   }
   tenable_vulnerability_finding_17_19506_1: {
     properties: {
       targets: [
+        "10.132.0.4"
+        "10.17.0.8"
         "159.89.38.68"
-        "10.17.0.8"
-        "10.132.0.4"
+        "36:25:49:fb:f3:86"
+        "a6:a1:a1:62:35:a6"
         "fe80:0:0:0:3425:49ff:fefb:f386"
         "fe80:0:0:0:a4a1:a1ff:fe62:35a6"
-        "36:25:49:fb:f3:86"
-        "a6:a1:a1:62:35:a6"
       ]
     }
   }
   tenable_user_2109705: {
     properties: {
-      id: 2109705
+      id: "2109705"
     }
   }
   tenable_user_2250642: {
     properties: {
-      id: 2250642
+      id: "2250642"
     }
   }
   tenable_user_2110185: {
     properties: {
-      id: 2110185
+      id: "2110185"
     }
   }
 }

 {
-  4c823f59-40ba-4558-8268-4d6229dd649a:IS:Person:[email protected]: {
-    _type: "mapped_relationship"
-    _class: "IS"
-    _source: "system-mapper"
-    _fromEntityKey: "tenable_user_2232707"
-    _toEntityKey: "Person:[email protected]"
-    properties: {
-    }
-  }
-  tenable_vulnerability_finding_17_19506_1_tenable_vulnerability_19506: {
-    _type: "tenable_vulnerability_finding_is_vulnerability"
-    _class: "IS"
-    _source: "system-mapper"
-    displayName: "IS"
-    _fromEntityKey: "tenable_vulnerability_finding_17_19506_1"
-    _toEntityKey: "tenable_vulnerability_19506"
-    properties: {
-      assetUuid: "604894a3-b8af-4479-85b4-e00343dbd309"
-      pluginId: 19506
-      scanUuid: "a4c0b1b7-8e87-41e0-bd62-a284264b1b93"
-      tag.AccountName: "Tenable Nick Test"
-      scanId: 17
-    }
-  }
-  tenable_scan_17_identified_tenable_vulnerability_19506: {
-    _type: "tenable_scan_identified_vulnerability"
-    _class: "IDENTIFIED"
-    _source: "system-mapper"
-    displayName: "IDENTIFIED"
-    _fromEntityKey: "tenable_scan_17"
-    _toEntityKey: "tenable_vulnerability_19506"
-    properties: {
-      scanUuid: "a4c0b1b7-8e87-41e0-bd62-a284264b1b93"
-      count: 1
-      scanId: 17
-      tag.AccountName: "Tenable Nick Test"
-    }
-  }
-  tenable_scan_17_identified_tenable_vulnerability_14272: {
-    _type: "tenable_scan_identified_vulnerability"
-    _class: "IDENTIFIED"
-    _source: "system-mapper"
-    displayName: "IDENTIFIED"
-    _fromEntityKey: "tenable_scan_17"
-    _toEntityKey: "tenable_vulnerability_14272"
-    properties: {
-      scanUuid: "a4c0b1b7-8e87-41e0-bd62-a284264b1b93"
-      count: 2
-      scanId: 17
-      tag.AccountName: "Tenable Nick Test"
-    }
-  }
-  tenable_vulnerability_finding_17_14272_1_tenable_vulnerability_14272: {
-    _type: "tenable_vulnerability_finding_is_vulnerability"
-    _class: "IS"
-    _source: "system-mapper"
-    displayName: "IS"
-    _fromEntityKey: "tenable_vulnerability_finding_17_14272_1"
-    _toEntityKey: "tenable_vulnerability_14272"
-    properties: {
-      assetUuid: "604894a3-b8af-4479-85b4-e00343dbd309"
-      pluginId: 14272
-      scanUuid: "a4c0b1b7-8e87-41e0-bd62-a284264b1b93"
-      tag.AccountName: "Tenable Nick Test"
-      scanId: 17
-    }
-  }
-  d552b241-8d88-45f7-8ddb-4417ffdadb0a:IS:Person:[email protected]: {
-    _type: "mapped_relationship"
-    _class: "IS"
-    _source: "system-mapper"
-    _fromEntityKey: "tenable_user_2250642"
-    _toEntityKey: "Person:[email protected]"
-    properties: {
-    }
-  }
-  09058885-2e94-42c1-96d4-027cc0481b55:HOSTS:Vendor:Tenable Cloud: {
-    _type: "mapped_relationship"
-    _class: "HOSTS"
-    _source: "system-mapper"
-    _fromEntityKey: "Vendor:Tenable Cloud"
-    _toEntityKey: "tenable_account_49a7e31b-b2b9-41c2-b0bd-3149141bb648"
-    properties: {
-    }
-  }
-  09058885-2e94-42c1-96d4-027cc0481b55:OWNS:mapper:root: {
-    _type: "mapped_relationship"
-    _class: "OWNS"
-    _source: "system-mapper"
-    _fromEntityKey: "mapper:root"
-    _toEntityKey: "tenable_account_49a7e31b-b2b9-41c2-b0bd-3149141bb648"
-    properties: {
-    }
-  }
+  9b93980f-9869-472b-94e9-e4742fb920b9:IDENTIFIED:tenable_vulnerability_19506:tenable_scan_17_identified_tenable_vulnerability_19506: {
+    _type: "tenable_scan_identified_vulnerability"
+    _class: "IDENTIFIED"
+    _source: "system-mapper"
+    displayName: "IDENTIFIED"
+    _fromEntityKey: "tenable_scan_17"
+    _toEntityKey: "tenable_vulnerability_19506"
+    properties: {
+      scanUuid: "a4c0b1b7-8e87-41e0-bd62-a284264b1b93"
+      count: 1
+      scanId: 17
+    }
+  }
+  1fb2a48d-bf1b-47be-b855-0922c1fe9485:IS:tenable_vulnerability_19506:tenable_vulnerability_finding_17_19506_1_tenable_vulnerability_19506: {
+    _type: "tenable_vulnerability_finding_is_vulnerability"
+    _class: "IS"
+    _source: "system-mapper"
+    displayName: "IS"
+    _fromEntityKey: "tenable_vulnerability_finding_17_19506_1"
+    _toEntityKey: "tenable_vulnerability_19506"
+    properties: {
+      assetUuid: "604894a3-b8af-4479-85b4-e00343dbd309"
+      pluginId: 19506
+      scanUuid: "a4c0b1b7-8e87-41e0-bd62-a284264b1b93"
+      scanId: 17
+    }
+  }
+  9b93980f-9869-472b-94e9-e4742fb920b9:IDENTIFIED:tenable_vulnerability_14272:tenable_scan_17_identified_tenable_vulnerability_14272: {
+    _type: "tenable_scan_identified_vulnerability"
+    _class: "IDENTIFIED"
+    _source: "system-mapper"
+    displayName: "IDENTIFIED"
+    _fromEntityKey: "tenable_scan_17"
+    _toEntityKey: "tenable_vulnerability_14272"
+    properties: {
+      scanUuid: "a4c0b1b7-8e87-41e0-bd62-a284264b1b93"
+      count: 2
+      scanId: 17
+    }
+  }
+  05581a65-f3ef-47ca-a66e-ad158221e48f:IS:tenable_vulnerability_14272:tenable_vulnerability_finding_17_14272_1_tenable_vulnerability_14272: {
+    _type: "tenable_vulnerability_finding_is_vulnerability"
+    _class: "IS"
+    _source: "system-mapper"
+    displayName: "IS"
+    _fromEntityKey: "tenable_vulnerability_finding_17_14272_1"
+    _toEntityKey: "tenable_vulnerability_14272"
+    properties: {
+      assetUuid: "604894a3-b8af-4479-85b4-e00343dbd309"
+      pluginId: 14272
+      scanUuid: "a4c0b1b7-8e87-41e0-bd62-a284264b1b93"
+      scanId: 17
+    }
+  }
+  186b8b60-9911-4e53-b3c7-c8ba78f5d80f:IS:Person:[email protected]: {
+    _type: "mapped_relationship"
+    _class: "IS"
+    _source: "system-mapper"
+    _fromEntityKey: "tenable_user_2250642"
+    _toEntityKey: "Person:[email protected]"
+    properties: {
+    }
+  }
+  1e44a074-b7d2-4ca6-b111-e0c4f25a1a23:IS:Person:[email protected]: {
+    _type: "mapped_relationship"
+    _class: "IS"
+    _source: "system-mapper"
+    _fromEntityKey: "tenable_user_2232707"
+    _toEntityKey: "Person:[email protected]"
+    properties: {
+    }
+  }
+  5347517e-a4a4-4ab8-9d64-d0acb628eb81:HOSTS:Vendor:Tenable Cloud: {
+    _type: "mapped_relationship"
+    _class: "HOSTS"
+    _source: "system-mapper"
+    _fromEntityKey: "Vendor:Tenable Cloud"
+    _toEntityKey: "tenable_account_49a7e31b-b2b9-41c2-b0bd-3149141bb648"
+    properties: {
+    }
+  }
+  5347517e-a4a4-4ab8-9d64-d0acb628eb81:OWNS:mapper:root: {
+    _type: "mapped_relationship"
+    _class: "OWNS"
+    _source: "system-mapper"
+    _fromEntityKey: "mapper:root"
+    _toEntityKey: "tenable_account_49a7e31b-b2b9-41c2-b0bd-3149141bb648"
+    properties: {
+    }
+  }
 }

Move to Container Security API V2

The newer API has a much clearer concept of images vs containers. Currently, the integration is ingesting reports/finding for images, but the API V1 talks about everything as containers (it seems, YMMV, caveats etc.).

Improve error messaging for `Duplicate export not allowed.`

When we encounter Duplicate export not allowed. Please modify request or wait until existing export is complete on the /export/assets or /export/* endpoints, it means the customer needs to go and explicitly kill the export job. We should post a message to the job log with explicit instructions in how to do so.

[terminate_export_job] An existing export job is running at `/export/assets` that is preventing the JupiterOne integration from fetching these resources. Please terminate this job using the following documented API: https://developer.tenable.com/reference#exports-assets-export-cancel

Create CWE/CVE entities and mapped relationships to them

See the Veracode integration for more details of how a vulnerability exploits weakness relationships. Note that it seems only the Container Security API answers CWE/CVE data ๐Ÿ˜• This needs to be looked at more carefully. Also, do the Agent scanners provide anything more than we're seeing from the other (remote) scans?

Make `sources` configurable when exporting Assets

Tenable assets can be of the types listed below or others (such as AZURE). Currently, we default to NESSUS_SCAN and NESSUS_AGENT as the possible sources, but we should make this configurable in the future.

Screen Shot 2021-08-02 at 12 09 19 PM

Add Account, UserGroup, and User entities and relationships

Entities

The following entity resources are ingested when the integration runs:

Tenable Entity Resource _type : _class of the Entity
Account tenable_account : Account
Group tenable_user_group : UserGroup
User tenable_user : User

Relationships

The following relationships are created/mapped:

From Type To
tenable_account HAS tenable_user_group
tenable_user_group HAS tenable_user

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.