Socket
Socket
Sign inDemoInstall

@jupiterone/graph-feroot

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jupiterone/graph-feroot - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

src/client.d.ts

87

package.json
{
"name": "@jupiterone/graph-feroot",
"version": "1.1.0",
"description": "A JupiterOne Integration",
"license": "MPL-2.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"engines": {
"node": ">=10.22"
},
"files": [
"dist"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"start": "j1-integration collect",
"graph": "j1-integration visualize",
"document": "j1-integration document",
"lint": "eslint . --cache --fix --ext .ts,.tsx",
"format": "prettier --write '**/*.{ts,js,json,css,md,yml}'",
"type-check": "tsc",
"test": "jest --passWithNoTests",
"test:ci": "yarn lint && yarn type-check && yarn test",
"build": "tsc -p tsconfig.dist.json --declaration",
"prepush": "yarn lint && yarn type-check && jest --changedSince master",
"prepack": "yarn build"
},
"peerDependencies": {
"@jupiterone/integration-sdk-core": "^4.0.0"
},
"devDependencies": {
"@jupiterone/integration-sdk-core": "^4.0.0",
"@jupiterone/integration-sdk-dev-tools": "^4.0.0",
"@jupiterone/integration-sdk-testing": "^4.0.0"
},
"dependencies": {
"@types/request-promise-native": "^1.0.17",
"@types/urijs": "^1.19.9",
"axios": "^0.19.2",
"lodash": "^4.17.19",
"request-promise-native": "^1.0.9",
"urijs": "^1.19.2"
}
"name": "@jupiterone/graph-feroot",
"version": "2.0.0",
"description": "A JupiterOne Integration",
"license": "MPL-2.0",
"main": "src/index.js",
"types": "src/index.d.ts",
"files": [
"src"
],
"publishConfig": {
"access": "public"
},
"scripts": {
"start": "j1-integration collect",
"graph": "j1-integration visualize",
"graph:types": "j1-integration visualize-types",
"graph:spec": "j1-integration visualize-types --project-path docs/spec --output-file ./.j1-integration/types-graph/index.spec.html",
"validate:questions:dry": "j1-integration validate-question-file --dry-run",
"validate:questions": "yarn validate:questions:dry",
"lint": "eslint . --cache --fix --ext .ts,.tsx",
"format": "prettier --write '**/*.{ts,js,json,css,md,yml}'",
"type-check": "tsc",
"test": "yarn validate:questions:dry && yarn jest",
"test:env": "LOAD_ENV=1 yarn test",
"test:ci": "yarn validate:questions && yarn lint && yarn type-check",
"prebuild": "rm -rf ./dist",
"build": "yarn tsc -p tsconfig.dist.json --declaration",
"postbuild": "cp README.md dist/README.md && cp -R jupiterone dist/",
"prepush": "yarn lint && yarn type-check && jest --changedSince main"
},
"peerDependencies": {
"@jupiterone/integration-sdk-core": "^7.0.0"
},
"devDependencies": {
"@jupiterone/integration-sdk-core": "^7.0.0",
"@jupiterone/integration-sdk-dev-tools": "^7.0.0",
"@jupiterone/integration-sdk-testing": "^7.0.0",
"@types/urijs": "^1.19.17"
},
"dependencies": {
"axios": "^0.19.2",
"urijs": "^1.19.7"
}
}

@@ -1,79 +0,56 @@

# JupiterOne Integration
# graph-fastly
## Development Environment
Learn about the data ingested, benefits of this integration, and how to use it
with JupiterOne in the [integration documentation](docs/jupiterone.md).
## Development
### Prerequisites
You must have Node.JS installed to run this project. If you don't already have
it installed, you can can download the installer
[here](https://nodejs.org/en/download/). You can alternatively install Node.JS
using a version manager like [fnm](https://github.com/Schniz/fnm) or
[nvm](https://github.com/nvm-sh/nvm).
1. Install [Node.js](https://nodejs.org/) using the
[installer](https://nodejs.org/en/download/) or a version manager such as
[nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm).
2. Install [`yarn`](https://yarnpkg.com/getting-started/install) or
[`npm`](https://github.com/npm/cli#installation) 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.
### Setup
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 `IntegrationInstanceConfigFieldMap`in `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`.
#### Installing dependencies
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.
From the root of this project, run `npm install` to install dependencies. If you
have `yarn` installed, you can install dependencies by running `yarn`.
### Running the integration
#### Loading credentials
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
Create a `.env` file at the root of this project and add environment variables
to match what is in `src/instanceConfigFields.ts`. The `.env` file is ignored by
git, so you won't have to worry about accidentally pushing credentials.
### Making Contributions
Given this example configuration:
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!
```typescript
import { IntegrationInstanceConfigFieldMap } from '@jupiterone/integration-sdk-core';
See the
[SDK development documentation](https://github.com/JupiterOne/sdk/blob/main/docs/integrations/development.md)
for a deep dive into the mechanics of how integrations work.
const instanceConfigFields: IntegrationInstanceConfigFieldMap = {
clientId: {
type: 'string',
},
clientSecret: {
type: 'string',
mask: true,
},
};
See [docs/development.md](docs/development.md) for any additional details about
developing this integration.
export default instanceConfigFields;
```
You would provide a `.env` file like this:
```bash
CLIENT_ID="client-id"
CLIENT_SECRET="supersecret"
```
The snake cased environment variables will automatically be converted and
applied to the camel cased configuration field. So for example, `CLIENT_ID` will
apply to the `clientId` config field, `CLIENT_SECRET` will apply to
`clientSecret`, and `MY_SUPER_SECRET_CONFIGURATION_VALUE` will apply to a
`mySuperSecretConfigurationValue` configuration field.
## Running the integration
To start collecting data, run `yarn start` from the root of the project. This
will load in your configuration from `src/index.ts`.
## Documentation
### Development
Please reference the JupiterOne integration
[development documentation](https://github.com/JupiterOne/sdk/blob/master/docs/integrations/development.md)
for more information on how to use the SDK.
See [docs/development.md](docs/development.md) for details about how to get
started with developing this integration.
### Integration usage and resource coverage
More information about the resources covered by this integration and how to
setup the integration in JupiterOne can be found in
[docs/jupiterone.md](docs/jupiterone.md).
### Changelog

@@ -80,0 +57,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