diff --git a/.cloud-graphrc.example.json b/.cloud-graphrc.example.json
index 82fc609..4883d6f 100644
--- a/.cloud-graphrc.example.json
+++ b/.cloud-graphrc.example.json
@@ -28,6 +28,14 @@
},
"versionLimit": 10,
"queryEngine": "playground",
- "port": "5555"
+ "port": "5555",
+ "plugins": {
+ "policyPack": [
+ {
+ "name": "aws-cis-1.2",
+ "providers": ["aws"]
+ }
+ ]
+ }
}
-}
\ No newline at end of file
+}
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000..e051bbf
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,23 @@
+## Issue tracker links
+
+_Add links to any relevant tasks/stories/bugs/pagerduty/etc_
+
+*Example - dummy TODO project*
+
+[TODO-123](https://autoclouddev.atlassian.net/browse/TODO-123)
+
+## Changes/solution
+
+_How does this change address the problem?_
+
+## Testing
+
+_Describe how the testing was done, plus evidence, if not covered by automated tests_
+
+## Notes and considerations
+
+_Add any additional notes and/or considerations_
+
+## Dependencies
+
+_Add dependencies on any other PRs, if applicable
diff --git a/.github/workflows/homebrew.yaml b/.github/workflows/homebrew.yaml
new file mode 100644
index 0000000..c5651e9
--- /dev/null
+++ b/.github/workflows/homebrew.yaml
@@ -0,0 +1,74 @@
+name: homebrew
+
+on:
+ push:
+ branches:
+ - main
+
+jobs:
+ homebrew:
+ runs-on: ubuntu-latest
+ env:
+ NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
+ AWS_SDK_LOAD_CONFIG: true
+ AWS_PROFILE: cloudgraph-iac
+ NODE_ENV: "cicd"
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ persist-credentials: false
+ token: ${{secrets.GH_TOKEN}}
+
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 16
+ registry-url: "https://registry.npmjs.org"
+ cache: yarn
+
+ - name: Mkdir .aws
+ run: mkdir -p ~/.aws
+
+ - name: Set .aws/config
+ run: |
+ cat << EOF > ~/.aws/config
+ [default]
+ region=us-east-1
+ output=json
+
+ [profile cloudgraph-iac]
+ role_arn = ${{ secrets.AWS_ROLE_ARN }}
+ source_profile = default
+ EOF
+ - name: Set .aws/credentials
+ run: |
+ cat << EOF > ~/.aws/credentials
+ [default]
+ aws_access_key_id = ${{ secrets.AWS_ACCESS_KEY_ID }}
+ aws_secret_access_key = ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ EOF
+
+ - name: Install Packages
+ run: yarn install --prefer-offline --frozen-lockfile
+
+ - name: Build
+ run: yarn build
+
+ - name: Add SSH key
+ env:
+ SSH_AUTH_SOCK: /tmp/ssh_agent.sock
+ run: |
+ mkdir -p ~/.ssh
+ ssh-keyscan github.com >> ~/.ssh/known_hosts
+ echo "${{ secrets.AUTODEPLOY_SSH_KEY }}" > ~/.ssh/github_actions
+ chmod 600 ~/.ssh/github_actions
+ ssh-agent -a $SSH_AUTH_SOCK > /dev/null
+ ssh-add ~/.ssh/github_actions
+
+ - name: Homebrew
+ env:
+ SSH_AUTH_SOCK: /tmp/ssh_agent.sock
+ run: |
+ git config --global user.email "no-reply@autocloud.dev"
+ git config --global user.name "autocloud-deploy-bot"
+ yarn homebrew
diff --git a/.github/workflows/notify.yml b/.github/workflows/notify.yml
new file mode 100644
index 0000000..4fc01bd
--- /dev/null
+++ b/.github/workflows/notify.yml
@@ -0,0 +1,23 @@
+---
+name: notify
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ notify:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 16
+ - run: |
+ GIT_COMMIT_TILE=$(git log -1 --pretty=format:"%s")
+ curl -X POST --data-urlencode "payload={\"attachments\":[{\"fallback\":\"$GIT_AUTHOR_NAME released new $ORGANIZATION_NAME $REPO_NAME version of $GITHUB_REF_NAME\",\"color\":\"good\",\"title\":\"Version $GITHUB_REF_NAME of $ORGANIZATION_NAME $REPO_NAME released\",\"title_link\":\"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/tag/$GITHUB_REF_NAME\",\"fields\":[{\"title\":\"Tag\",\"value\":\"<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/commits/$GITHUB_REF_NAME|$GITHUB_REF_NAME>\",\"short\":true},{\"title\":\"Commit\",\"value\":\"<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$GITHUB_REF_NAME|$GIT_COMMIT_TILE>\",\"short\":true}],\"footer\":\"$ORGANIZATION_NAME $REPO_NAME \",\"ts\":\"$( date +%s )\"}]}" $SLACK_WEBHOOK
+ env:
+ REPO_NAME: ${{ github.event.repository.name }}
+ GIT_AUTHOR_NAME: "AutoCloud Deploy Bot"
+ SLACK_WEBHOOK: ${{secrets.slack_api_endpoint}}
+ ORGANIZATION_NAME: ${{secrets.organization_name}}
diff --git a/.github/workflows/pr-validator.yml b/.github/workflows/pr-validator.yml
new file mode 100644
index 0000000..96511e9
--- /dev/null
+++ b/.github/workflows/pr-validator.yml
@@ -0,0 +1,29 @@
+---
+name: pr-validator
+
+on:
+ pull_request:
+ types: [synchronize, opened, reopened, edited]
+ branches:
+ - main
+ - beta
+
+jobs:
+ pr-validation:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - run: |
+ if [ "$TARGET_BRANCH" == "main" ] && [ "$SOURCE_BRANCH" == "beta" ]; then
+ echo "Merge from $SOURCE_BRANCH to $TARGET_BRANCH is valid"
+ exit 0
+ elif [ "$TARGET_BRANCH" == "beta" ] && [ "$SOURCE_BRANCH" == "alpha" ]; then
+ echo "Merge from $SOURCE_BRANCH to $TARGET_BRANCH is valid"
+ exit 0
+ else
+ echo "You cannot merge from $SOURCE_BRANCH to $TARGET_BRANCH"
+ exit 1
+ fi
+ env:
+ SOURCE_BRANCH: ${{ github.head_ref }}
+ TARGET_BRANCH: ${{ github.base_ref }}
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..14695fa
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,59 @@
+---
+name: publish
+
+on:
+ push:
+ branches:
+ - alpha
+ - beta
+ - main
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ persist-credentials: false
+ token: ${{secrets.gh_token}}
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 16
+ registry-url: "https://registry.npmjs.org"
+
+ - name: Get cache directory
+ id: yarn-cache-dir
+ run: |
+ echo "::set-output name=dir::$(yarn cache dir)"
+
+ - name: Restoring cache
+ uses: actions/cache@v3
+ id: yarn-cache # use this to check for `cache-hit` ==> if: steps.yarn-cache.outputs.cache-hit != 'true'
+ with:
+ path: ${{ steps.yarn-cache-dir.outputs.dir }}
+ key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
+ restore-keys: |
+ ${{ runner.os }}-yarn-
+
+ - name: Install Packages
+ # NOTE: The --ignore-scripts flag is required to prevent leakage of NPM_TOKEN value
+ # See https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#use-private-packages
+ run: yarn install --frozen-lockfile --prefer-offline --ignore-scripts
+
+ - name: Build
+ run: yarn prepack
+
+ # - name: Test
+ # run: yarn lint
+
+ - name: Publish
+ run: npx semantic-release
+ env:
+ NODE_ENV: "cicd"
+ NODE_AUTH_TOKEN: ${{secrets.npm_token}}
+ GITHUB_TOKEN: ${{secrets.gh_token}}
+ GIT_AUTHOR_NAME: "autocloud-deploy-bot"
+ GIT_AUTHOR_EMAIL: "no-reply@autocloud.dev"
+ GIT_COMMITTER_NAME: "autocloud-deploy-bot"
+ GIT_COMMITTER_EMAIL: "no-reply@autocloud.dev"
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
deleted file mode 100644
index 3359c2d..0000000
--- a/.gitlab-ci.yml
+++ /dev/null
@@ -1,109 +0,0 @@
----
-.configure-registry: &configure-registry
- - apk --quiet --no-progress --update --no-cache add git openssh
- - |
- {
- echo "//registry.npmjs.com/:_authToken=${NPM_TOKEN}"
- echo "@cloudgraph:registry=https://registry.npmjs.com/"
- } | tee -a .npmrc
- - |
- {
- echo "\"@cloudgraph:registry\" \"https://registry.npmjs.com/\""
- echo "\"//registry.npmjs.com/:_authToken\" \"${NPM_TOKEN}\""
- } | tee -a .yarnrc
- - NODE_ENV=cicd yarn install --frozen-lockfile --cache-folder .npm --prefer-offline
-default:
- image: node:16-alpine
- before_script:
- - *configure-registry
- cache:
- key: ${CI_COMMIT_REF_SLUG}
- paths:
- - .npm/
- - lib/
-
-workflow:
- rules:
- - if: '$CI_PIPELINE_SOURCE == "push"'
-
-variables:
- NPM_TOKEN: ${NPM_TOKEN}
-
-stages:
- - build
- - test
- - release
- - publish
- - notify
-
-build:
- image: node:16-alpine
- stage: build
- rules:
- - if: $CI_COMMIT_TAG
- when: never
- - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE =~ /^chore\(release\)/'
- when: never
- - if: $CI_COMMIT_BRANCH
- when: always
- script:
- - yarn prepack
-
-lint:
- image: node:16-alpine
- stage: test
- rules:
- - when: always
- script:
- - yarn lint
-
-# test:
-# image: node:16-alpine
-# stage: test
-# rules:
-# - when: always
-# script:
-# - yarn test
-
-semantic release:
- image: node:16-alpine
- stage: release
- rules:
- - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE =~ /^chore\(release\)/'
- when: never
- - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- - if: $CI_COMMIT_BRANCH == "alpha"
- - if: $CI_COMMIT_BRANCH == "beta"
- variables:
- # Set git commit identity
- GIT_AUTHOR_NAME: 'AutoCloud Deploy Bot'
- GIT_AUTHOR_EMAIL: 'no-reply@loudcloud.dev'
- GIT_COMMITTER_NAME: 'AutoCloud Deploy Bot'
- GIT_COMMITTER_EMAIL: 'no-reply@loudcloud.dev'
- # Disable Husky for the git step of semantic release (handles all versions, env var name changed in v6)
- HUSKY_SKIP_HOOKS: 1
- HUSKY: 0
- before_script:
- - *configure-registry
- script:
- - npx semantic-release -r $CI_PROJECT_URL
-
-.curlcmd: &curlcmd >
- curl
- -sS
- -X POST
- --data-urlencode "payload={\"attachments\":[{\"fallback\":\"$GITLAB_USER_NAME released new $CI_PROJECT_TITLE version $CI_COMMIT_TAG\",\"color\":\"good\",\"author_name\":\"$GITLAB_USER_NAME ($GITLAB_USER_LOGIN)\",\"author_icon\":\"$GITLAB_USER_AVATAR\",\"author_link\":\"https://gitlab.com/$GITLAB_USER_LOGIN\",\"title\":\"Version $CI_COMMIT_TAG of $CI_PROJECT_NAME released\",\"title_link\":\"$CI_PROJECT_URL/-/tags/$CI_COMMIT_TAG\",\"fields\":[{\"title\":\"Tag\",\"value\":\"<$CI_PROJECT_URL/commits/$CI_COMMIT_TAG|$CI_COMMIT_TAG>\",\"short\":true},{\"title\":\"Commit\",\"value\":\"<$CI_PROJECT_URL/tree/$CI_COMMIT_SHA|$CI_COMMIT_TITLE>\",\"short\":true}],\"footer\":\"$CI_PROJECT_NAME\",\"ts\":$( date +%s )}]}"
- $SLACK_API_ENDPOINT
-
-notify:
- image: alpine:latest
- stage: notify
- rules:
- - if: $CI_COMMIT_TAG
- # Overwrite the default before script with a no-op action to disable the node specific actions
- before_script:
- - echo "noop"
- script:
- - apk add --no-cache curl
- - GITLAB_USER_AVATAR=$( echo $GITLAB_USER_EMAIL | tr '[:upper:]' '[:lower:]' | tr -d '[:space:]' | md5sum | awk -F' ' '{print $1}' | xargs -I{} echo 'https://www.gravatar.com/avatar/{}?s=80&d=identicon' )
- - *curlcmd
diff --git a/.releaserc.yml b/.releaserc.yml
index da58bef..2106544 100644
--- a/.releaserc.yml
+++ b/.releaserc.yml
@@ -1,10 +1,13 @@
---
branches:
- - name: master
- - name: beta
- prerelease: true
- name: alpha
+ channel: alpha
+ prerelease: true
+ - name: beta
+ channel: beta
prerelease: true
+ - name: main
+
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
@@ -12,14 +15,14 @@ plugins:
- changelogFile: CHANGELOG.md
- - "@semantic-release/git"
- assets:
- - CHANGELOG.md
- - package.json
+ - CHANGELOG.md
+ - package.json
- - "@semantic-release/npm"
- npmPublish: true
- - "@semantic-release/gitlab"
+ - "@semantic-release/github"
verifyConditions:
- "@semantic-release/changelog"
- - "@semantic-release/gitlab"
+ - "@semantic-release/github"
- "@semantic-release/npm"
prepare:
- "@semantic-release/changelog"
@@ -27,7 +30,7 @@ prepare:
- - "@semantic-release/git"
- message: "chore(release): ${nextRelease.version} \n\n${nextRelease.notes}"
publish:
- - "@semantic-release/gitlab"
+ - "@semantic-release/github"
- "@semantic-release/npm"
success: false
fail: false
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e8f6d65..89f9a65 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,110 +1,790 @@
-## [0.13.9](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.8...0.13.9) (2021-11-11)
+## [0.25.1](https://github.com/cloudgraphdev/cli/compare/0.25.0...0.25.1) (2022-12-13)
### Bug Fixes
-* Imported schemasMap from provider package ([8fda732](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/8fda7324e262b87bf36b47a5897d3e4a331a03e7))
+* **dgraph:** update dgraph version to latest ([6f75da7](https://github.com/cloudgraphdev/cli/commit/6f75da704169418b88ef1bca13692cc066235a76))
-## [0.13.8](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.7...0.13.8) (2021-11-05)
+## [0.25.1-beta.1](https://github.com/cloudgraphdev/cli/compare/0.25.0...0.25.1-beta.1) (2022-12-13)
### Bug Fixes
-* **package:** peg typescript version ([04a9df4](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/04a9df445838653e8d942e4e67149931c8ff9e44))
+* **dgraph:** update dgraph version to latest ([6f75da7](https://github.com/cloudgraphdev/cli/commit/6f75da704169418b88ef1bca13692cc066235a76))
-## [0.13.7](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.6...0.13.7) (2021-11-05)
+## [0.25.1-alpha.1](https://github.com/cloudgraphdev/cli/compare/0.25.0...0.25.1-alpha.1) (2022-12-13)
### Bug Fixes
-* Fixed npm as a main dependency ([ac4d322](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/ac4d322721335f965cec9f547953a95425893f57))
-* Fixed npm as a main dependency ([d842222](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/d842222c8d548064da47176211c1f58c90e455d0))
+* **dgraph:** update dgraph version to latest ([6f75da7](https://github.com/cloudgraphdev/cli/commit/6f75da704169418b88ef1bca13692cc066235a76))
-## [0.13.6](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.5...0.13.6) (2021-11-05)
+# [0.25.0](https://github.com/cloudgraphdev/cli/compare/0.24.0...0.25.0) (2022-12-08)
+
+
+### Features
+
+* **cli:** convert ASTNode to string since now providers return raw schemas instead of strings ([55e6468](https://github.com/cloudgraphdev/cli/commit/55e646870e222c90a6218e2701d53ffe864a5c99))
+* **cli:** handle provider schema type ([074b03e](https://github.com/cloudgraphdev/cli/commit/074b03ef1d1d7e23ccb01c234050741311aee9d6))
+* **cli:** Updated sdk version ([1f02b6c](https://github.com/cloudgraphdev/cli/commit/1f02b6c743bca6cbbdba982c5980b174ca2624be))
+
+# [0.25.0-beta.1](https://github.com/cloudgraphdev/cli/compare/0.24.0...0.25.0-beta.1) (2022-12-08)
+
+
+### Features
+
+* **cli:** convert ASTNode to string since now providers return raw schemas instead of strings ([55e6468](https://github.com/cloudgraphdev/cli/commit/55e646870e222c90a6218e2701d53ffe864a5c99))
+* **cli:** handle provider schema type ([074b03e](https://github.com/cloudgraphdev/cli/commit/074b03ef1d1d7e23ccb01c234050741311aee9d6))
+* **cli:** Updated sdk version ([1f02b6c](https://github.com/cloudgraphdev/cli/commit/1f02b6c743bca6cbbdba982c5980b174ca2624be))
+
+# [0.25.0-alpha.1](https://github.com/cloudgraphdev/cli/compare/0.24.0...0.25.0-alpha.1) (2022-12-08)
+
+
+### Features
+
+* **cli:** convert ASTNode to string since now providers return raw schemas instead of strings ([55e6468](https://github.com/cloudgraphdev/cli/commit/55e646870e222c90a6218e2701d53ffe864a5c99))
+* **cli:** handle provider schema type ([074b03e](https://github.com/cloudgraphdev/cli/commit/074b03ef1d1d7e23ccb01c234050741311aee9d6))
+* **cli:** Updated sdk version ([1f02b6c](https://github.com/cloudgraphdev/cli/commit/1f02b6c743bca6cbbdba982c5980b174ca2624be))
+
+# [0.24.0](https://github.com/cloudgraphdev/cli/compare/0.23.1...0.24.0) (2022-08-05)
+
+
+### Features
+
+* exclude subscription from scan report ([47a398c](https://github.com/cloudgraphdev/cli/commit/47a398c16af7f6ddf2b9078fc5eeaaa8aea27bb6))
+
+# [0.24.0-beta.1](https://github.com/cloudgraphdev/cli/compare/0.23.1...0.24.0-beta.1) (2022-08-05)
+
+
+### Features
+
+* exclude subscription from scan report ([47a398c](https://github.com/cloudgraphdev/cli/commit/47a398c16af7f6ddf2b9078fc5eeaaa8aea27bb6))
+
+# [0.24.0-alpha.1](https://github.com/cloudgraphdev/cli/compare/0.23.1...0.24.0-alpha.1) (2022-08-05)
+
+
+### Features
+
+* exclude subscription from scan report ([47a398c](https://github.com/cloudgraphdev/cli/commit/47a398c16af7f6ddf2b9078fc5eeaaa8aea27bb6))
+
+## [0.23.1](https://github.com/cloudgraphdev/cli/compare/0.23.0...0.23.1) (2022-07-18)
### Bug Fixes
-* Bring fix for npm manager to master branch ([476676e](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/476676e2fe20801c4d9acc6403d397717c95cabe))
+* Updated sdk version ([19c63e2](https://github.com/cloudgraphdev/cli/commit/19c63e2b8db44377f7b3d6a226bcf5a7c68bd5e2))
+* Updated yarn.lock sdk version ([63d5487](https://github.com/cloudgraphdev/cli/commit/63d54877724f6a046c99446ff42383ab783e8466))
-## [0.13.5](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.4...0.13.5) (2021-11-03)
+## [0.23.1-beta.1](https://github.com/cloudgraphdev/cli/compare/0.23.0...0.23.1-beta.1) (2022-07-18)
### Bug Fixes
-* **queryEngine:** detect if wanted port is in use and move to next available port ([35978aa](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/35978aa2f6247fcd328e91ce7473c81805e0b5ef))
+* Updated sdk version ([19c63e2](https://github.com/cloudgraphdev/cli/commit/19c63e2b8db44377f7b3d6a226bcf5a7c68bd5e2))
+* Updated yarn.lock sdk version ([63d5487](https://github.com/cloudgraphdev/cli/commit/63d54877724f6a046c99446ff42383ab783e8466))
-## [0.13.4](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.3...0.13.4) (2021-11-02)
+## [0.23.1-alpha.1](https://github.com/cloudgraphdev/cli/compare/0.23.0...0.23.1-alpha.1) (2022-07-18)
### Bug Fixes
-* Moved npm library to dev dependency only ([58ecbd2](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/58ecbd2adafd1b740d391e4821434cebf4971be4))
+* Updated sdk version ([19c63e2](https://github.com/cloudgraphdev/cli/commit/19c63e2b8db44377f7b3d6a226bcf5a7c68bd5e2))
+* Updated yarn.lock sdk version ([63d5487](https://github.com/cloudgraphdev/cli/commit/63d54877724f6a046c99446ff42383ab783e8466))
-## [0.13.3](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.2...0.13.3) (2021-11-02)
+# [0.23.0](https://github.com/cloudgraphdev/cli/compare/0.22.0...0.23.0) (2022-07-07)
+
+
+### Features
+
+* adapt CLI to pass data instead of queries ([1244617](https://github.com/cloudgraphdev/cli/commit/1244617f21abb7ae0686b16487c246b51be8dd21))
+* update sdk version ([fc6ad87](https://github.com/cloudgraphdev/cli/commit/fc6ad873761d02cf9e5961e4713ac027d99d0bb0))
+
+# [0.23.0-beta.1](https://github.com/cloudgraphdev/cli/compare/0.22.0...0.23.0-beta.1) (2022-07-07)
+
+
+### Features
+
+* adapt CLI to pass data instead of queries ([1244617](https://github.com/cloudgraphdev/cli/commit/1244617f21abb7ae0686b16487c246b51be8dd21))
+* update sdk version ([fc6ad87](https://github.com/cloudgraphdev/cli/commit/fc6ad873761d02cf9e5961e4713ac027d99d0bb0))
+
+# [0.23.0-alpha.1](https://github.com/cloudgraphdev/cli/compare/0.22.0...0.23.0-alpha.1) (2022-07-07)
+
+
+### Features
+
+* adapt CLI to pass data instead of queries ([1244617](https://github.com/cloudgraphdev/cli/commit/1244617f21abb7ae0686b16487c246b51be8dd21))
+* update sdk version ([fc6ad87](https://github.com/cloudgraphdev/cli/commit/fc6ad873761d02cf9e5961e4713ac027d99d0bb0))
+
+# [0.22.0](https://github.com/cloudgraphdev/cli/compare/0.21.4...0.22.0) (2022-05-27)
+
+
+### Features
+
+* **tencent:** add tencent in provider list ([f4ade5b](https://github.com/cloudgraphdev/cli/commit/f4ade5b3dbf6343e7595afb2ee8ecf5c7dbb412b))
+
+# [0.22.0-beta.1](https://github.com/cloudgraphdev/cli/compare/0.21.4...0.22.0-beta.1) (2022-05-20)
+
+
+### Features
+
+* **tencent:** add tencent in provider list ([f4ade5b](https://github.com/cloudgraphdev/cli/commit/f4ade5b3dbf6343e7595afb2ee8ecf5c7dbb412b))
+
+# [0.22.0-alpha.1](https://github.com/cloudgraphdev/cli/compare/0.21.4...0.22.0-alpha.1) (2022-05-10)
+
+
+### Features
+
+* **tencent:** add tencent in provider list ([f4ade5b](https://github.com/cloudgraphdev/cli/commit/f4ade5b3dbf6343e7595afb2ee8ecf5c7dbb412b))
+
+## [0.21.4](https://github.com/cloudgraphdev/cli/compare/0.21.3...0.21.4) (2022-04-27)
### Bug Fixes
-* **provider:** remove aws provider dep ([3ea2238](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/3ea2238e737011e8517375fbc1adaeb04c720656))
+* **rebase:** fastforward alpha to main ([a2416f4](https://github.com/cloudgraphdev/cli/commit/a2416f4a4c83836c0f65aa4f7ed22026f35bceba))
+* Update scan/load output of query engine location to be accurate ([af74605](https://github.com/cloudgraphdev/cli/commit/af746059eab95ec8163fc4d14c9e2d7321e84e46))
-## [0.13.2](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.1...0.13.2) (2021-11-01)
+## [0.21.4-beta.1](https://github.com/cloudgraphdev/cli/compare/0.21.3...0.21.4-beta.1) (2022-04-14)
### Bug Fixes
-* **aws:** add aws as a dep until we fix plugin manager ([04e5bfc](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/04e5bfc9d2122e256fa7572330edd968e56b8c5d))
-* **aws:** add aws as a dep until we fix plugin manager ([0b2beb4](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/0b2beb45f4eaba8b76036028fbfa65fd9ad0b293))
+* **rebase:** fastforward alpha to main ([a2416f4](https://github.com/cloudgraphdev/cli/commit/a2416f4a4c83836c0f65aa4f7ed22026f35bceba))
+* Update scan/load output of query engine location to be accurate ([af74605](https://github.com/cloudgraphdev/cli/commit/af746059eab95ec8163fc4d14c9e2d7321e84e46))
-## [0.13.1](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.0...0.13.1) (2021-11-01)
+## [0.21.4-alpha.1](https://github.com/cloudgraphdev/cli/compare/0.21.3...0.21.4-alpha.1) (2022-04-14)
### Bug Fixes
-* Removed aws provider dependency ([94bb59d](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/94bb59d84e78cfd1356651a7448fa7bdacdf58ba))
+* **rebase:** fastforward alpha to main ([a2416f4](https://github.com/cloudgraphdev/cli/commit/a2416f4a4c83836c0f65aa4f7ed22026f35bceba))
+* Update scan/load output of query engine location to be accurate ([af74605](https://github.com/cloudgraphdev/cli/commit/af746059eab95ec8163fc4d14c9e2d7321e84e46))
-# [0.13.0](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.12.3...0.13.0) (2021-10-29)
+## [0.21.3](https://github.com/cloudgraphdev/cli/compare/0.21.2...0.21.3) (2022-04-06)
+
+
+### Bug Fixes
+
+* Handle add policy without a cg config file ([4813b16](https://github.com/cloudgraphdev/cli/commit/4813b1605717e30fcfa6689f044b74e029fe0427))
+
+## [0.21.3-beta.1](https://github.com/cloudgraphdev/cli/compare/0.21.2...0.21.3-beta.1) (2022-04-06)
+
+
+### Bug Fixes
+
+* Handle add policy without a cg config file ([4813b16](https://github.com/cloudgraphdev/cli/commit/4813b1605717e30fcfa6689f044b74e029fe0427))
+
+## [0.21.3-alpha.1](https://github.com/cloudgraphdev/cli/compare/0.21.2...0.21.3-alpha.1) (2022-04-06)
+
+
+### Bug Fixes
+
+* Handle add policy without a cg config file ([4813b16](https://github.com/cloudgraphdev/cli/commit/4813b1605717e30fcfa6689f044b74e029fe0427))
+
+## [0.21.2](https://github.com/cloudgraphdev/cli/compare/0.21.1...0.21.2) (2022-03-23)
+
+
+### Bug Fixes
+
+* **deps:** update deps to pin version for node-jq and oclif packages. Fix build command for tarballs ([2d08023](https://github.com/cloudgraphdev/cli/commit/2d080237eeb500abb116441c371cf898d65052de))
+* rename delete command examples to remove ([e332b59](https://github.com/cloudgraphdev/cli/commit/e332b59019c68730d487b88b2bc831b11f548be1))
+
+## [0.21.2-beta.1](https://github.com/cloudgraphdev/cli/compare/0.21.1...0.21.2-beta.1) (2022-03-23)
+
+
+### Bug Fixes
+
+* **deps:** update deps to pin version for node-jq and oclif packages. Fix build command for tarballs ([2d08023](https://github.com/cloudgraphdev/cli/commit/2d080237eeb500abb116441c371cf898d65052de))
+* rename delete command examples to remove ([e332b59](https://github.com/cloudgraphdev/cli/commit/e332b59019c68730d487b88b2bc831b11f548be1))
+
+## [0.21.2-alpha.2](https://github.com/cloudgraphdev/cli/compare/0.21.2-alpha.1...0.21.2-alpha.2) (2022-03-23)
+
+
+### Bug Fixes
+
+* **deps:** update deps to pin version for node-jq and oclif packages. Fix build command for tarballs ([2d08023](https://github.com/cloudgraphdev/cli/commit/2d080237eeb500abb116441c371cf898d65052de))
+
+## [0.21.2-alpha.1](https://github.com/cloudgraphdev/cli/compare/0.21.1...0.21.2-alpha.1) (2022-03-23)
+
+
+### Bug Fixes
+
+* rename delete command examples to remove ([e332b59](https://github.com/cloudgraphdev/cli/commit/e332b59019c68730d487b88b2bc831b11f548be1))
+
+## [0.21.1](https://github.com/cloudgraphdev/cli/compare/0.21.0...0.21.1) (2022-03-18)
+
+
+### Bug Fixes
+
+* Removed account from scan report ([50a38d9](https://github.com/cloudgraphdev/cli/commit/50a38d94d3ea4232d70d944f37aea5dc9e2d1ce8))
+* Update oclif version to fix Aliases issue ([4c4c860](https://github.com/cloudgraphdev/cli/commit/4c4c860a4d1ecf0fc3e7a4bd690ffece2d3441c9))
+
+## [0.21.1-beta.1](https://github.com/cloudgraphdev/cli/compare/0.21.0...0.21.1-beta.1) (2022-03-18)
+
+
+### Bug Fixes
+
+* Removed account from scan report ([50a38d9](https://github.com/cloudgraphdev/cli/commit/50a38d94d3ea4232d70d944f37aea5dc9e2d1ce8))
+* Update oclif version to fix Aliases issue ([4c4c860](https://github.com/cloudgraphdev/cli/commit/4c4c860a4d1ecf0fc3e7a4bd690ffece2d3441c9))
+
+## [0.21.1-alpha.2](https://github.com/cloudgraphdev/cli/compare/0.21.1-alpha.1...0.21.1-alpha.2) (2022-03-18)
+
+
+### Bug Fixes
+
+* Update oclif version to fix Aliases issue ([4c4c860](https://github.com/cloudgraphdev/cli/commit/4c4c860a4d1ecf0fc3e7a4bd690ffece2d3441c9))
+
+## [0.21.1-alpha.1](https://github.com/cloudgraphdev/cli/compare/0.21.0...0.21.1-alpha.1) (2022-03-18)
### Bug Fixes
-* **deps:** bump provider version ([3826f77](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/3826f77a7238ff2573486b805f9e4e1da1a7ba5d))
-* Dropped pluginType as param from lock file methods ([3328c8b](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/3328c8b60ce76c36d9584d7156e5ecef5c4211e1))
-* Restored install provider command ([c6a33b9](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/c6a33b9e63acff9840b6c6dbad127ffc90671761))
-* Restored install provider command ([49316d9](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/49316d99bf374364ca686f8179ed93b609dc478f))
-* solved alpha versions condition when getting plugin ([1effb43](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/1effb430b8b181638d08e329dc1f059c4144b214))
-* Update aws provider to 0.39.0 version ([656ba99](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/656ba99bec8440ae679003060b576dc3e32d8719))
-* Update aws provider to 0.39.0 version ([d076b63](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/d076b63342dda864afb1f77e7a2ba2af0cfb4aa7))
-* Updated npm binary reference ([fa16ffe](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/fa16ffe6640999ffe46852e94c46d88ed30a0e88))
-* Updated npm binary reference ([c64a6db](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/c64a6db874fb9df33519d34bc9c5bdcedd8e0e2a))
+* Removed account from scan report ([50a38d9](https://github.com/cloudgraphdev/cli/commit/50a38d94d3ea4232d70d944f37aea5dc9e2d1ce8))
+
+# [0.21.0](https://github.com/cloudgraphdev/cli/compare/0.20.12...0.21.0) (2022-03-18)
+
+
+### Bug Fixes
+
+* **brew:** update brew script with version key, update brew install dirs ([8d79abb](https://github.com/cloudgraphdev/cli/commit/8d79abb9f8cee442ff5e912dd457101b9d2fc817))
### Features
-* Moved PluginManager methods to NpmManager ([f14502b](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/f14502b708e499f757eaa80264962f92d103df55))
+* Update CG to use Oclif core and space for the `topicSeparator` ([8b1e7e8](https://github.com/cloudgraphdev/cli/commit/8b1e7e853a5cbd92b47abe7773283b44a7a03b35))
-## [0.12.3](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.12.2...0.12.3) (2021-10-28)
+# [0.21.0-beta.1](https://github.com/cloudgraphdev/cli/compare/0.20.12...0.21.0-beta.1) (2022-03-16)
### Bug Fixes
-* **deps:** bump provider version ([d7dfc75](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/d7dfc75fd0aaf9a7fa069935af78cf5d4b44d208))
+* **brew:** update brew script with version key, update brew install dirs ([8d79abb](https://github.com/cloudgraphdev/cli/commit/8d79abb9f8cee442ff5e912dd457101b9d2fc817))
-## [0.12.2](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.12.1...0.12.2) (2021-10-27)
+
+### Features
+
+* Update CG to use Oclif core and space for the `topicSeparator` ([8b1e7e8](https://github.com/cloudgraphdev/cli/commit/8b1e7e853a5cbd92b47abe7773283b44a7a03b35))
+
+# [0.21.0-alpha.5](https://github.com/cloudgraphdev/cli/compare/0.21.0-alpha.4...0.21.0-alpha.5) (2022-03-16)
+
+
+### Features
+
+* Update CG to use Oclif core and space for the `topicSeparator` ([8b1e7e8](https://github.com/cloudgraphdev/cli/commit/8b1e7e853a5cbd92b47abe7773283b44a7a03b35))
+
+# [0.21.0-alpha.4](https://github.com/cloudgraphdev/cli/compare/0.21.0-alpha.3...0.21.0-alpha.4) (2022-03-15)
### Bug Fixes
-* Update aws provider to 0.39.0 version ([42bbd94](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/42bbd9419f159aa9044141d3c8afb99803c1e14a))
+* **brew:** update brew script with version key, update brew install dirs ([8d79abb](https://github.com/cloudgraphdev/cli/commit/8d79abb9f8cee442ff5e912dd457101b9d2fc817))
-## [0.12.1](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.12.0...0.12.1) (2021-10-26)
+## [0.20.12](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.20.11...0.20.12) (2022-03-01)
+
+
+### Bug Fixes
+
+* Deleted codeblock comment that creates a new toc item ([637505c](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/637505c3c09b82ffdab10d6eb52dd9c058441756))
+
+## [0.20.11](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.20.10...0.20.11) (2022-03-01)
+
+
+### Bug Fixes
+
+* Updated SDK version ([230ab71](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/230ab7134b76f37bbf900e24b597ab5d41b280c2))
+
+## [0.20.10](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.20.9...0.20.10) (2022-02-24)
+
+
+### Bug Fixes
+
+* Custom provider with forward slash in name ([dbe4f8d](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/dbe4f8d7c8672cb1bcbe123ac9216ca7f331e229))
+
+## [0.20.9](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.20.8...0.20.9) (2022-02-22)
+
+
+### Bug Fixes
+
+* **deps:** update node eng requirement to 16 ([d43f18c](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/d43f18cdbf701d5df81ac321d9d950d67459bd29))
+
+## [0.20.8](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.20.7...0.20.8) (2022-02-22)
+
+
+### Bug Fixes
+
+* spelling ([b7ba7b5](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/b7ba7b55f3aa85927d218b225d9060ac41ecc24e))
+
+## [0.20.7](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.20.6...0.20.7) (2022-02-21)
+
+
+### Bug Fixes
+
+* **brew:** update brew script to use correct profile ([f417eb3](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/f417eb3503545a2d9c3712e7927a8e10aa5b9157))
+
+## [0.20.6](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.20.5...0.20.6) (2022-02-21)
+
+
+### Bug Fixes
+
+* **brew:** update brew pipeline before script with correct aws file locations ([8866570](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/8866570fde67cb05e82cdea01cce647a7e0f0041))
+
+## [0.20.5](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.20.4...0.20.5) (2022-02-21)
+
+
+### Bug Fixes
+
+* **brew:** update brew pipeline to use node profile and correct iac acct ([667eb43](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/667eb43ce3dd4893987d843e6af464852f6749ea))
+
+## [0.20.4](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.20.3...0.20.4) (2022-02-19)
+
+
+### Bug Fixes
+
+* **readme:** update readme as well as homebrew script ([6386017](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/638601795c0fea3a9b942b07afa18eb51a0ade2f))
+
+## [0.20.3](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.20.2...0.20.3) (2022-02-18)
+
+
+### Bug Fixes
+
+* **scan-report:** ignore label service ([efb5f3f](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/efb5f3feb3a009f219b0e7a2becbf72c79c1242b))
+
+## [0.20.2](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.20.1...0.20.2) (2022-02-16)
+
+
+### Bug Fixes
+
+* **plugin:** fix plugin add and remove commands for case where there is no plugins block in config ([3d7265c](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/3d7265ca5556abadabab8f0481075168e879a78c))
+
+## [0.20.1](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.20.0...0.20.1) (2022-02-10)
+
+
+### Bug Fixes
+
+* Updated SDK to latest version ([9e0c04b](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/9e0c04b157a38d65131158494ff1d80bd6200ecd))
+
+# [0.20.0](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.19.0...0.20.0) (2022-02-04)
+
+
+### Features
+
+* Refactored Plugins execution after inserted scanned data ([db0c731](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/db0c731451762b0e4defcf5d549abe409fb598f6))
+* Updated policy commands to support new plugin structure ([606609d](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/606609d1a8678bf198a807e34b8f232856170fc6))
+
+# [0.19.0](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.18.2...0.19.0) (2022-02-03)
+
+
+### Bug Fixes
+
+* **brew:** Add try/catch to brew script ([49bba1e](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/49bba1ee7b9fa8db201b11456687603e48ddce10))
+* **brew:** await sha ([9ac979a](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/9ac979a42427280a20f7ce73544f5df908c7982e))
+* **brew:** update aws to use sts to grab creds ([7a29c2d](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/7a29c2d407f5499b4aad3ac413612d18fe452eff))
+* **brew:** update ci and brew func for aws ([96c87a5](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/96c87a53a949999b5fc2b0e95b10d3b5353bec90))
+* **brew:** update gitlab ci and update upgrade message ([4141ade](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/4141ade942e1d1bd7903b9f55da93417ddd2a3a9))
+* **brew:** update gitlab ci for homebrew ([4e91e40](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/4e91e4009d8ced864871d870ce21a4436d6d4adc))
+* **brew:** update gitlab ci to call build before homebrew ([5983f86](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/5983f86a33057f1dd2971b3cb451f56cb5398e14))
+* **brew:** update hashing code ([1d5f02a](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/1d5f02ad38d37b55eb50c4510d9911c9b99a47d7))
+* **brew:** update logger func ([f937538](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/f9375380fa08ca4535ee0d31f879ae5d0e9520a1))
+* **brew:** update logger func again ([08e46e9](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/08e46e9ef4888249049c79c7307a63c98fb4ecbf))
+* **brew:** update s3 call to use creds in the system ([1c36e1b](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/1c36e1b277c5bde3758c83504d2fed859a65c6c3))
+* **brew:** update s3 function to grab aws creds by profile ([897e325](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/897e325a180af79c352fa1018dedb0a3813fd232))
+* **brew:** updates from PR review. remove unneeded error throw and unused code ([9c11296](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/9c11296beb8fb59c422eb3b321f2d97d35493498))
+* **brew:** work on getting aws creds to validate ([566f199](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/566f1999a7930fccfea55a2a0f6e5417d5f688de))
+* **deploy:** update gitlab ci for aws config ([8423d08](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/8423d081f60b3561828cff4d5d16e2876d8cf589))
+
+
+### Features
+
+* **release:** first work on homebrew setup ([5bb3d16](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/5bb3d161dfab3fd079a27b8e58ecfadb97765f85))
+
+## [0.18.2](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.18.1...0.18.2) (2022-02-01)
+
+
+### Bug Fixes
+
+* **deps:** update sdk dep ([71b113c](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/71b113c8b772b6235679685db27ac971b497ed40))
+
+## [0.18.1](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.18.0...0.18.1) (2022-01-28)
+
+
+### Bug Fixes
+
+* **deps:** update sdk dep ([90821bd](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/90821bd5471966c0b5a55f3e770a9630c1dabadb))
+
+# [0.18.0](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.17.0...0.18.0) (2022-01-27)
+
+
+### Features
+
+* add additional connections mutation to insert edges between existing entities ([9313b4a](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/9313b4a4198ed3ef46f5947450db8068b5e035d6))
+
+# [0.17.0](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.12...0.17.0) (2022-01-24)
+
+
+### Bug Fixes
+
+* Added missing aliases ([a9fbb03](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/a9fbb036a42624ed3fbf64c14845455edd840d74))
+* Removed unused scripts from the package.json ([680f9dc](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/680f9dc208580c3dae3fe52400a0d30e6019a953))
+* Renamed plugin commands ([0b92db8](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/0b92db82438e498923a32a75a49fe0142fa26833))
+
+
+### Features
+
+* Created operation base command ([8ee9093](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/8ee9093cd960b665e1fed15df69349d222e231c7))
+* Improved error messages with plugin commands ([3747df9](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/3747df9ef59912f86a8217c56dedb3140938ce79))
+* Migrated add command ([4d83128](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/4d83128b5074c4ab60640df4a38b7bcdb58ab580))
+* Migrated install command ([7890340](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/7890340de81ba23f641f15ed5cad561d999490fa))
+* Migrated list command ([0ced854](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/0ced85459dfdc5fdd80713af7d3b50154ad5a487))
+* Migrated remove command ([8a80b70](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/8a80b70aca6aab1b3e3f1068d4475ba6f3693292))
+* Migrated update command ([1e4eec4](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/1e4eec4ca721491f72402b3f8ccce66d7306c782))
+* Reverted changes to keep upgrade all command ([cc95962](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/cc95962207a33cefdebaaf99c78acee0077d3a28))
+
+## [0.16.12](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.11...0.16.12) (2022-01-18)
+
+
+### Bug Fixes
+
+* Removed schema util from CLI ([f38fb60](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/f38fb6052a7643597f710d7cb02b9be71ab23f55))
+* Updated sdk to the latest version ([a0f8c74](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/a0f8c74fcf881d6be5c8f66aff3160bc75a13ab0))
+
+## [0.16.11](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.10...0.16.11) (2022-01-17)
+
+
+### Bug Fixes
+
+* Fixed display scan results for apigatewaystage service ([128c261](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/128c2617f88bdf52a2b6884c0764ff286d2ca269))
+
+## [0.16.10](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.9...0.16.10) (2022-01-17)
+
+
+### Bug Fixes
+
+* Moved scripts to root folder ([005bc09](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/005bc096f23046fcbbc78636b1647f632d678bb9))
+* Preserved scripts folder during build ([ca15db3](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/ca15db3fecdf8ccf4b4d5cce67057cda2b6e36fc))
+
+## [0.16.9](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.8...0.16.9) (2022-01-12)
+
+
+### Bug Fixes
+
+* img src ([62d4dde](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/62d4dde970d8ae4c882caecee77aea4377415ede))
+
+## [0.16.8](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.7...0.16.8) (2022-01-12)
+
+
+### Bug Fixes
+
+* Updated sdk to latest version ([c4cfc6a](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/c4cfc6afef38450ab71a03ac15bb440b6b5c521e))
+
+## [0.16.7](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.6...0.16.7) (2022-01-12)
+
+
+### Bug Fixes
+
+* links ([1ea9c68](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/1ea9c689237c2b78e086dd602be700b216815c13))
+* **init:** update init command for k8s ([5fc0068](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/5fc0068afa879915ca417a8842d51ade3c9bbc14))
+
+## [0.16.6](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.5...0.16.6) (2022-01-11)
+
+
+### Bug Fixes
+
+* Awaited for plugin installation message ([0fdad5a](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/0fdad5ad571972920a7f92fe50fbf2f751ce7dd0))
+* Solved issue with repeated mutations ([4b52177](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/4b52177f2a0169bb6974f553064c51dd5c47c64b))
+* Updated sdk to latest version ([de3cced](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/de3ccedbb6463795b790ce7b6eb52cd82807336b))
+
+## [0.16.5](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.4...0.16.5) (2022-01-10)
+
+
+### Bug Fixes
+
+* **update:** fix update command when using a arg ([e7f58b7](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/e7f58b7a11f1de0e34581d19737c1d763dd5d82b))
+
+## [0.16.4](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.3...0.16.4) (2022-01-10)
+
+
+### Bug Fixes
+
+* **deps:** add semver as a dep ([c7f493a](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/c7f493a55fcb68980ad23d5cba1854891f0166a2))
+
+## [0.16.3](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.2...0.16.3) (2022-01-10)
+
+
+### Bug Fixes
+
+* Updated SDK version to latest ([710a7bb](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/710a7bb585d794fe8b5ae81719c446b80e9c9b62))
+
+## [0.16.2](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.1...0.16.2) (2022-01-07)
+
+
+### Bug Fixes
+
+* **server:** add settings to playground to stop schema polling ([a8e6f95](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/a8e6f9524d22aba784a2517565331f6b1d226711))
+
+## [0.16.1](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.0...0.16.1) (2022-01-05)
+
+
+### Bug Fixes
+
+* Removed aliases for policy commands ([27adcf3](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/27adcf37c34776773032c58c5ffccae24c584957))
+* Validated empty lock file for policy and provider commands ([8a397a5](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/8a397a5d6170476b14232bae3c0d6ff05fc4beb7))
+
+# [0.16.0](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.15.5...0.16.0) (2022-01-05)
+
+
+### Bug Fixes
+
+* Fixed empty policies key on CloudGraph config file ([95f2c69](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/95f2c69fc3294f6db4143d7df57bce1699c4caee))
+* Fixed empty policies key on CloudGraph config file ([ec92905](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/ec92905b0ae070f5bd575f87e813f1b4472db631))
+* Fixed issue getting plugin version from lockfile ([b8fe334](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/b8fe33412d1b43c2658fd2fdb17535dfd0b87f86))
+* Removed unused code ([ea3aa94](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/ea3aa942a9cf7a7240c6721fab12d5ec69fb5e4d))
+* Solved type for flags attribute ([97bd99e](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/97bd99ec335789540b304785557d9a17c707c10d))
+* updated references from sdk ([e8c4f1b](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/e8c4f1b98ad01ebd86c9b1064b829550ffcbb028))
+* Updated SDK version and docs for policy packs ([4414818](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/4414818e83ffdc453a7675fbf730d6e1dcedf61c))
+* Uses missing cwd to fix installed packages issue ([6c5ffa7](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/6c5ffa728e354361ea19e13dab22d83cc3fa6cbc))
+* Uses missing cwd to fix installed packages issue ([e59e86d](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/e59e86d448dee53b59899072c1738d07e04b31a8))
+
+
+### Features
+
+* Implemented generic plugin system ([a538a86](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/a538a86041009c1e2f52554d1f7e57d7da0036a1))
+* Policy Packs Alpha version. ([2560f5b](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/2560f5b9cbdb61a2f6089dfdfc430319a5127071))
+* Policy Packs Alpha version. ([5abfcd2](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/5abfcd2534236792c4ab9038b6d31aeb90bd42a8))
+* Replaced Dgraph types from SDK ([a32bcf5](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/a32bcf5b8d70a0a31ccf984a62890ee5bccaa065))
+
+# [0.16.0-alpha.2](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.16.0-alpha.1...0.16.0-alpha.2) (2022-01-05)
+
+
+### Bug Fixes
+
+* Updated SDK version and docs for policy packs ([4414818](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/4414818e83ffdc453a7675fbf730d6e1dcedf61c))
+* **deps:** update version of oclif help plugin to fixed 3.2.17 ([901cb05](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/901cb05fdedea46e93422c5cfcffa8db83855d63))
+
+# [0.16.0-alpha.1](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.15.4...0.16.0-alpha.1) (2021-12-28)
+
+### Bug Fixes
+
+- Fixed empty policies key on CloudGraph config file ([95f2c69](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/95f2c69fc3294f6db4143d7df57bce1699c4caee))
+- Fixed empty policies key on CloudGraph config file ([ec92905](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/ec92905b0ae070f5bd575f87e813f1b4472db631))
+- Fixed issue getting plugin version from lockfile ([b8fe334](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/b8fe33412d1b43c2658fd2fdb17535dfd0b87f86))
+- Removed unused code ([ea3aa94](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/ea3aa942a9cf7a7240c6721fab12d5ec69fb5e4d))
+- Solved type for flags attribute ([97bd99e](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/97bd99ec335789540b304785557d9a17c707c10d))
+- updated references from sdk ([e8c4f1b](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/e8c4f1b98ad01ebd86c9b1064b829550ffcbb028))
+- Uses missing cwd to fix installed packages issue ([6c5ffa7](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/6c5ffa728e354361ea19e13dab22d83cc3fa6cbc))
+- Uses missing cwd to fix installed packages issue ([e59e86d](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/e59e86d448dee53b59899072c1738d07e04b31a8))
+
+### Features
+
+- Implemented generic plugin system ([a538a86](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/a538a86041009c1e2f52554d1f7e57d7da0036a1))
+- Policy Packs Alpha version. ([2560f5b](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/2560f5b9cbdb61a2f6089dfdfc430319a5127071))
+- Policy Packs Alpha version. ([5abfcd2](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/5abfcd2534236792c4ab9038b6d31aeb90bd42a8))
+- Replaced Dgraph types from SDK ([a32bcf5](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/a32bcf5b8d70a0a31ccf984a62890ee5bccaa065))
+
+# [0.13.0-alpha.8](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.0-alpha.7...0.13.0-alpha.8) (2021-12-27)
+
+### Bug Fixes
+
+- Fixed issue getting plugin version from lockfile ([b8fe334](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/b8fe33412d1b43c2658fd2fdb17535dfd0b87f86))
+
+# [0.13.0-alpha.7](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.0-alpha.6...0.13.0-alpha.7) (2021-12-20)
+
+### Bug Fixes
+
+- Fixed empty policies key on CloudGraph config file ([ec92905](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/ec92905b0ae070f5bd575f87e813f1b4472db631))
+
+# [0.13.0-alpha.6](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.0-alpha.5...0.13.0-alpha.6) (2021-12-17)
+
+### Features
+
+- Policy Packs Alpha version. ([5abfcd2](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/5abfcd2534236792c4ab9038b6d31aeb90bd42a8))
+
+## [0.15.4](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.15.3...0.15.4) (2021-12-15)
+
+### Bug Fixes
+
+- Improved error message when npm is down ([c29dc2a](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/c29dc2a2a49ed5a6f8735c65e9124144a944a923))
+
+## [0.15.3](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.15.2...0.15.3) (2021-12-10)
+
+### Bug Fixes
+
+- **conflicts:** fixing merge conflict ([f0473c5](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/f0473c5880348856eee89f22b3fd3abdda0509c2))
+
+## [0.15.2](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.15.1...0.15.2) (2021-12-09)
+
+### Bug Fixes
+
+- **config:** update provider config obj to include flags and cg config for more flexibility ([12f76c6](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/12f76c68ac20d0a292c1233c879d89902a854999))
+
+## [0.15.1](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.15.0...0.15.1) (2021-12-08)
+
+### Bug Fixes
+- **manager:** add gcp choice, bypass version check in dev ([fb4b223](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/fb4b2238f65b10aa0341d4c7a3d3a5bc648c0c6e))
+
+# [0.15.0](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.14.7...0.15.0) (2021-12-07)
+
+### Features
+
+- add multiple strategies to generate entities mutations ([d7a4f28](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/d7a4f284cdc55c9ee09c28cb38b2f10cb137ab66))
+
+## [0.14.7](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.14.6...0.14.7) (2021-12-07)
+
+### Bug Fixes
+
+- Fixed unlink issue after install ([4d65859](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/4d65859c680e2ed5e27c3e49acb3658f568e8836))
+
+## [0.14.6](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.14.5...0.14.6) (2021-12-07)
+
+### Bug Fixes
+
+- **windows npm path:** added cross-env dev dependency ([cf92aff](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/cf92aff428ba69c132908a5262eebae089dbdb8d))
+
+## [0.14.5](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.14.4...0.14.5) (2021-12-06)
+
+### Bug Fixes
+
+- **windows npm path:** Fix bug with Npm manager using Windows OS ([7f97a50](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/7f97a5072c7ea2b052853f2293a1c026d6190715))
+
+## [0.14.4](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.14.3...0.14.4) (2021-12-02)
+
+### Bug Fixes
+
+- latest channel ([f2dc97b](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/f2dc97b9c6a05fcbbec32b5f8cfded88f4ba12fd))
+
+## [0.14.3](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.14.2...0.14.3) (2021-11-30)
+
+### Bug Fixes
+
+- Resolves JSON input error on not found package ([c0b99a3](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/c0b99a3612430cf6e18fdd78ff817bd20190106d))
+
+## [0.14.2](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.14.1...0.14.2) (2021-11-28)
+
+### Bug Fixes
+
+- **storage:** update axios calls to use infinite body and content length ([4fcb1af](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/4fcb1af56237b07fd4fde33434061d922733e3cf))
+- **storage:** update axios calls to use infinite body and content length ([c7e4895](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/c7e4895d0d5f0a3cd992a3cd09497bf9ea622ad9))
+- **storage:** use env variable so you can override axios props ([a4b0d79](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/a4b0d7926d9aabd9e8a6feafc96cc4a613e846e1))
+- **storage:** use env variable so you can override axios props ([3264449](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/3264449e014eda65468905017c07334d971d629f))
+
+## [0.14.1](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.14.0...0.14.1) (2021-11-19)
+
+### Bug Fixes
+
+- **init:** fix multi provider config file saving to not overwrite other providers ([c666935](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/c66693539a889bb6ce6538dac9f28248e20aaa3c))
+
+# [0.14.0](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.11...0.14.0) (2021-11-18)
+
+### Features
+
+- add azure to provider question list ([f667789](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/f667789b7c8e56ef564e4b3349cb538c1df0e286))
+
+## [0.13.11](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.10...0.13.11) (2021-11-16)
+
+### Bug Fixes
+
+- **manager:** update writeToLockFile to ensure it works if no lock file exists ([cacbf2e](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/cacbf2ec97dc663ff868190c5a554eacf7a83c8a))
+
+## [0.13.10](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.9...0.13.10) (2021-11-15)
+
+### Bug Fixes
+
+- **slack:** fix slack link ([34cf790](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/34cf790e156cc1d572396ff9547b64df24fb8ad2))
+- **slack:** fix slack link ([bdc196e](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/bdc196e759ccf40d3e98423beadb8d086ed1910c))
+
+## [0.13.9](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.8...0.13.9) (2021-11-11)
+
+### Bug Fixes
+
+- Imported schemasMap from provider package ([8fda732](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/8fda7324e262b87bf36b47a5897d3e4a331a03e7))
+
+## [0.13.8](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.7...0.13.8) (2021-11-05)
+
+### Bug Fixes
+
+- **package:** peg typescript version ([04a9df4](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/04a9df445838653e8d942e4e67149931c8ff9e44))
+
+## [0.13.7](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.6...0.13.7) (2021-11-05)
+
+### Bug Fixes
+
+- Fixed npm as a main dependency ([ac4d322](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/ac4d322721335f965cec9f547953a95425893f57))
+- Fixed npm as a main dependency ([d842222](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/d842222c8d548064da47176211c1f58c90e455d0))
+
+## [0.13.6](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.5...0.13.6) (2021-11-05)
+
+### Bug Fixes
+
+- Bring fix for npm manager to master branch ([476676e](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/476676e2fe20801c4d9acc6403d397717c95cabe))
+
+## [0.13.5](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.4...0.13.5) (2021-11-03)
+
+### Bug Fixes
+
+- **queryEngine:** detect if wanted port is in use and move to next available port ([35978aa](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/35978aa2f6247fcd328e91ce7473c81805e0b5ef))
+
+## [0.13.4](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.3...0.13.4) (2021-11-02)
+
+### Bug Fixes
+
+- Moved npm library to dev dependency only ([58ecbd2](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/58ecbd2adafd1b740d391e4821434cebf4971be4))
+
+## [0.13.3](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.2...0.13.3) (2021-11-02)
+
+### Bug Fixes
+
+- **provider:** remove aws provider dep ([3ea2238](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/3ea2238e737011e8517375fbc1adaeb04c720656))
+
+## [0.13.2](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.1...0.13.2) (2021-11-01)
+
+### Bug Fixes
+
+- **aws:** add aws as a dep until we fix plugin manager ([04e5bfc](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/04e5bfc9d2122e256fa7572330edd968e56b8c5d))
+- **aws:** add aws as a dep until we fix plugin manager ([0b2beb4](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/0b2beb45f4eaba8b76036028fbfa65fd9ad0b293))
+
+## [0.13.1](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.0...0.13.1) (2021-11-01)
+
+### Bug Fixes
+
+- Removed aws provider dependency ([94bb59d](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/94bb59d84e78cfd1356651a7448fa7bdacdf58ba))
+
+# [0.13.0](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.12.3...0.13.0) (2021-10-29)
+
+### Bug Fixes
+
+- **deps:** bump provider version ([3826f77](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/3826f77a7238ff2573486b805f9e4e1da1a7ba5d))
+- Dropped pluginType as param from lock file methods ([3328c8b](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/3328c8b60ce76c36d9584d7156e5ecef5c4211e1))
+- Restored install provider command ([c6a33b9](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/c6a33b9e63acff9840b6c6dbad127ffc90671761))
+- Restored install provider command ([49316d9](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/49316d99bf374364ca686f8179ed93b609dc478f))
+- solved alpha versions condition when getting plugin ([1effb43](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/1effb430b8b181638d08e329dc1f059c4144b214))
+- Update aws provider to 0.39.0 version ([656ba99](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/656ba99bec8440ae679003060b576dc3e32d8719))
+- Update aws provider to 0.39.0 version ([d076b63](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/d076b63342dda864afb1f77e7a2ba2af0cfb4aa7))
+- Updated npm binary reference ([fa16ffe](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/fa16ffe6640999ffe46852e94c46d88ed30a0e88))
+- Updated npm binary reference ([c64a6db](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/c64a6db874fb9df33519d34bc9c5bdcedd8e0e2a))
+
+### Features
+
+- Moved PluginManager methods to NpmManager ([f14502b](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/f14502b708e499f757eaa80264962f92d103df55))
+
+## [0.12.3](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.12.2...0.12.3) (2021-10-28)
+
+### Bug Fixes
+
+- **deps:** bump provider version ([d7dfc75](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/d7dfc75fd0aaf9a7fa069935af78cf5d4b44d208))
+
+## [0.12.2](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.12.1...0.12.2) (2021-10-27)
+
+### Bug Fixes
+
+- Update aws provider to 0.39.0 version ([42bbd94](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/42bbd9419f159aa9044141d3c8afb99803c1e14a))
+
+## [0.12.1](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.12.0...0.12.1) (2021-10-26)
### Bug Fixes
-* Restored install provider command ([c6a33b9](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/c6a33b9e63acff9840b6c6dbad127ffc90671761))
-* Update aws provider to 0.39.0 version ([d076b63](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/d076b63342dda864afb1f77e7a2ba2af0cfb4aa7))
-* Updated npm binary reference ([fa16ffe](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/fa16ffe6640999ffe46852e94c46d88ed30a0e88))
+- Restored install provider command ([c6a33b9](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/c6a33b9e63acff9840b6c6dbad127ffc90671761))
+- Update aws provider to 0.39.0 version ([d076b63](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/d076b63342dda864afb1f77e7a2ba2af0cfb4aa7))
+- Updated npm binary reference ([fa16ffe](https://gitlab.com/auto-cloud/cloudgraph/cli/commit/fa16ffe6640999ffe46852e94c46d88ed30a0e88))
# [0.13.0-alpha.3](https://gitlab.com/auto-cloud/cloudgraph/cli/compare/0.13.0-alpha.2...0.13.0-alpha.3) (2021-10-29)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f60128e..6c0a935 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,6 +4,8 @@
+- [Paid contributions](#paid-contributions)
+
- [Creating A new provider](#creating-a-new-provider)
- [Adding A new entity to an existing provider](#Adding-a-new-entity-to-an-existing-provider)
@@ -11,6 +13,7 @@
- [Adding new data to an existing entity](#Adding-new-data-to-an-existing-entity)
+
## Getting Started
To setup `CloudGraph` in development mode, first clone the CLI repo.
@@ -309,3 +312,4 @@ function format(rawData) => {
And that's it! The CLI will now pick up the new data point and push it to the DB.
If you have any ideas for how to make this contribution guide more effective or easier to work with please let us know, we would love to hear your feedback.
+
diff --git a/README.md b/README.md
index 43f5a83..9934c3d 100644
--- a/README.md
+++ b/README.md
@@ -1,33 +1,60 @@
-
-
+
+
-The **GraphQL** API for AWS - solve a host of complex security, compliance, and governance challenges **10x faster**. Built and maintained with love by the team at ❤️ [AutoCloud](https://www.autocloud.dev/) ❤️
-
+CloudGraph is the free open-source universal **GraphQL API and Cloud Security Posture Management (CSPM) tool for AWS, Azure, GCP, and K8s**. With CloudGraph you get:
+
+- Free and effortless _compliance checks_ (i.e. Azure CIS 1.3.1, GCP CIS 1.2, AWS CIS 1.2, AWS CIS 1.3, AWS CIS 1.4, AWS PCI 3.2.1, AWS NIST 800-53 Rev. 4)
+- _Type-Safe asset inventories_ for all of your resources in all of your cloud environments
+- Automatically generated documentation and query validation - know if your query is valid before you send it!
+- Full resource data including _relationships_ between resources so you can understand context
+- Historical snapshots of your data over time
+- A single endpoint to query all of your cloud data at once (i.e. get AWS + GCP data in the same query, or compare AWS stage with AWS prod)
+- Enhanced billing data (AWS only)
+- Enhanced CloudWatch data (AWS EC2 only)
+
+Cloud Graph lets you **Know your cloud** in 5 minutes. Built and maintained with love by the team at ❤️ [AutoCloud](https://www.autocloud.dev/) ❤️
-🌐 Website: https://www.cloudgraph.dev
-💻 Documentation: https://docs.cloudgraph.dev
+🌐 [Website](https://www.cloudgraph.dev)
+
+💻 [Documentation](https://docs.cloudgraph.dev)
+
+💰 [Get paid to build CloudGraph providers](https://github.com/cloudgraphdev/cli/blob/main/CONTRIBUTING.md)
[](https://oclif.io)
[](https://npmjs.org/package/@cloudgraph/cli)
+
[](https://npmjs.org/package/@cloudgraph/cli)
-[](https://github.com/cloudgraphdev/cli/blob/master/package.json)
+[](https://github.com/cloudgraphdev/cli/blob/main/package.json)
+
+
+
+
+
+
+Join the conversation
+
+[](https://cloudgraph-workspace.slack.com)
+[
+](https://twitter.com/share?ref_src=twsrc%5Etfw&text=Check%20out%20CloudGraph.%20The%20GraphQL%20api%20for%20AWS,%20Azure,%20GCP,%20and%20more!)
+
+* [Amazing companies using CloudGraph\*\*](#amazing-companies-using-cloudgraph)
* [Why CloudGraph](#why-cloudgraph)
* [How It Works](#how-it-works)
-* [Authentication](#authentication)
+* [Authentication and Permissions](#authentication-and-permissions)
* [Install](#install)
* [Quick Start](#quick-start)
* [Loading Previous Versions](#loading-previous-versions)
@@ -45,47 +72,66 @@ The **GraphQL** API for AWS - solve a host of complex security, compliance, and
+# Amazing companies using CloudGraph\*\*
+
+- [AWS](https://aws.amazon.com/)
+- [Microsoft](https://www.microsoft.com/)
+- [Oracle](https://www.oracle.com/index.html)
+- [IBM](https://www.ibm.com/us-en/)
+- [NASA](https://www.nasa.gov/)
+- [Grafana](https://grafana.com/)
+- [Pinterest](https://www.pinterest.com/)
+- [Zendesk](https://www.zendesk.com/)
+- [McKinsey](https://www.mckinsey.com/)
+- [Pulumi](https://www.pulumi.com/)
+- [Siemens](https://www.siemens.com/)
+- [MasterCard](https://www.mastercard.us/en-us.html)
+
+\*\* usage does not imply endorsement
+
# Why CloudGraph
-Whether you're a cloud architect with 15 years of experience or someone who is just getting started on their cloud journey, there is no denying that staying on top of security, compliance, governance, FinOps, operations...etc., is challenging, time-consuming work. Even answering basic questions like, "What all is running in the us-east-1 region?", "Are my RDS clusters properly secured and compliant?", or "How much is this EKS/AKS/GKE cluster going to cost me this month?" requires both time and expertise, or expensive 3rd party software.
+AWS, Azure, and GPC have done a wonderful job of building solutions that let engineers like us create systems to power our increasingly interconnected world. Over the last 15 years, products such as EC2, S3, RDS, and Lambda have fundamentally changed how we think about computing, storage, and databasing.
-**Not anymore**
+With the proliferation of Kubernetes and Serverless in the last 5 or so years, cloud services have become increasingly abstract on top of racks of physical servers. To end-users, everything on the cloud is just an API, so we don't necessarily need to know how Lambda Functions or EKS work under the hood to be able to use them for building applications. With a little documentation, API or console access, and a tutorial anyone can pretty much create anything they need.
-CloudGraph lets any cloud professional answer questions like, "What KMS keys do I have in us-west-2?", "How much am I paying for my environment?", and, "What resources in my production environment aren’t tagged correctly?" in the time it takes to put on the pants you should already be wearing for your next zoom meeting. Ask any question about your cloud environments, and get back answers instantly in a single place with a single standardized API, for all of your cloud providers. Here are some more examples:
+These abstractions have led to massive improvements in the overall convenience and breadth of CSP service offerings. What was once a painstaking, time-consuming, and error-prone process of provisioning new servers, databases, or filesystems can now be done in seconds with just the click of a button or deployment of IAC. Since everything is just an API abstraction, when a CAP is ready to introduce a new "product" they simply need to expose a new API - yes, I'm of course simplifying slightly :)
-
-
-
-
-
+Anyone familiar with the CSPs knows that service APIs are almost always split into modular namespaces that contain dozens, if not hundreds, of separate API methods for single resources. For example, the AWS EC2 service contains over 500 different API methods, with new ones added occasionally. Any company building substantial systems on a CSP is likely using many, many different services.
-
-
-
-
-
+While a masterpiece of datacenter architecture, this choice of hundreds of services and configuration options put the burden of knowledge on how to properly use these services squarely on us engineers. As a result, we find ourselves having to constantly stay up to date and learn about all the service offerings or new changes. This takes a significant amount of time and mental energy. As developers, it can be difficult, time-consuming, and frustrating to use the AWS CLI to make 5 different API calls to describe, as an example, an AWS ECS cluster, its services, task definitions, tasks, container definitions, etc. We often find ourselves lost in documentation and having to use half a dozen of APIs to get answers to questions like "What exactly is running in this VPC?"
-
-
-
-
-
+This means that AWS, Azure, and GCP can feel overwhelming quickly even to seasoned cloud architects. While the CSPs are fantastic at building the actual services that power our businesses, not a lot of headway has been into simplifying the day-to-day UX of querying these hundreds of services in a sane manner.
+New solutions like the Cloud Control API for AWS have attempted to create a standardized interface for querying many different types of AWS resources. Unfortunately, the Cloud Control API's usage is severely limited, and users still need to know how to correctly query their data. This means more time spent reading documentation and understanding how services work and are related to one another.
+
+
+
+While the modularity of the CSP APIs is a great logical organization system and does make sense, it's a burden on end-users in terms of the cognitive overhead and learning curve. Having to remember how hundreds of constantly changing services work and are connected leads to a caffeine addiction and time wasted playing detective.
+
+
+
+Wouldn't it be great if we as DevOps/Cloud engineers had a simpler way to get our data out of AWS, Azure, GCP and the others? One that reflected our need to easily query any data about any service in any account without having to spend hours on docs or stack overflow?
+
+
+
+It is for these reasons that we built CloudGraph, the GraphQL API for everything cloud. CloudGraph extracts, normalizes, processes, and enriches your cloud data allowing you to access deep insights across multiple providers effortlessly. Check out our blog post [The GraphQL API for everything](https://www.autocloud.dev/blog/the-graphql-api-for-all-clouds) to learn more.
+
-
-
+
+
@@ -97,32 +143,87 @@ Note that CloudGraph requires **READ ONLY** permissions to run and as such can *
-Under the hood, CloudGraph reaches out to your cloud provider(s), sucks up all of the configuration data, processes it, and stores a copy of this data for you in [Dgraph](https://dgraph.io/). It then exposes an endpoint at `http://localhost:8997` that allows you to write GraphQL Queries against your stored data. These queries not only allow you do to anything that you would do with say, the AWS SDK/CLI, but they also allow you to run much more powerful queries as well. CloudGraph ships with pre-packaged GraphQL query tools including [GraphQL Playground](https://github.com/graphql/graphql-playground) and [Altair](https://github.com/altair-viz/altair) but you can also feel free to use your own. It also includes a schema visualization tool called [Voyager](https://github.com/APIs-guru/graphql-voyager) so you can understand relationships between entities.
+Under the hood, CloudGraph reaches out to your cloud provider(s), sucks up all of the configuration data, processes it, and stores a copy of this data for you in [Dgraph](https://dgraph.io/). It then exposes an endpoint at `http://localhost:8997` that allows you to write GraphQL Queries against your stored data. These queries not only allow you do to anything that you would do with say, the AWS SDK/CLI, but they also allow you to run much more powerful queries as well. CloudGraph ships with pre-packaged GraphQL query tools including [GraphQL Playground](https://github.com/graphql/graphql-playground) and [Altair](https://github.com/altair-viz/altair) but you can also feel free to use your own. It also includes a schema visualization tool called [Voyager](https://github.com/APIs-guru/graphql-voyager) so you can understand relationships between entities.
-# Authentication
+# Authentication and Permissions
-CloudGraph currently supports AWS with Azure/GCP (and several others) coming soon. For more information on generating the necessary permission for each cloud provider please view our current provider repos:
+CloudGraph currently supports AWS, Azure, GCP, K8s, and Tencent (several others coming soon). CloudGraph needs read permissions in order to ingest your data. To keep things easy you can use the same permissions that we use internally when we run CloudGraph to power AutoCloud. Here are the auth guides and details for how to generate credentials for each provider (feel free to leave out AutoCloud specific configuration):
-#### [AWS Provider Repo](https://github.com/cloudgraphdev/cloudgraph-provider-aws)
-
-AWS TLDR; For AWS need you an IAM User with the AWS Managed "ReadOnlyAccess" policy attached. CloudGraph will check to see what AWS user you are using in your current terminal session and use those credentials.
+- [AWS Docs](https://docs.autocloud.dev/aws-account)
+- [Azure Docs](https://docs.autocloud.dev/azure-subscription)
+- [GCP Docs](https://docs.autocloud.dev/gcp-project)
+- [K8s Docs](https://github.com/cloudgraphdev/cloudgraph-provider-kubernetes)
+- [Tencent Docs](https://github.com/cloudgraphdev/cloudgraph-provider-tencent)
# Install
+
+
+**System Requirements**
+
+- Docker
+
+There are 2 ways to install the CloudGraph CLI
+
+### Homebrew (Recommended)
+
+You can install CloudGraph using homebrew with the following command:
+`brew install cloudgraphdev/tap/cg`
+
+### NPM
+
+- Requires Node 16+
+
Use this command to install and update CloudGraph to the latest version.
-
+```bash
+npm i -g @cloudgraph/cli
+```
+
+
+
+
+
+
+
+
+
+You can then add the providers you want (links to provider repos: [AWS](https://github.com/cloudgraphdev/cloudgraph-provider-aws), [Azure](https://github.com/cloudgraphdev/cloudgraph-provider-azure), [GCP](https://github.com/cloudgraphdev/cloudgraph-provider-gcp), [K8s](https://github.com/cloudgraphdev/cloudgraph-provider-k8s), [Tencent Docs](https://github.com/cloudgraphdev/cloudgraph-provider-tencent)):
```bash
-npm install -g @cloudgraph/cli
+cg init aws
+cg init azure
+cg init gcp
+cg init k8s
+cg init tencent
```
+You can also add as many as you want all at once
+
+```bash
+cg init aws azure gcp k8s tencent
+```
+
+And add in compliance policy packs to supplement your data with instant security insights:
+
+```bash
+cg policy add gcp-cis-1.2.0
+cg policy add azure-cis-1.3.1
+cg policy add aws-cis-1.2.0
+cg policy add aws-cis-1.3.0
+cg policy add aws-cis-1.2.0
+cg policy add aws-pci-dss-3.2.1
+cg policy add aws-nist-800-53-rev4
+```
+
+You can find a list of currently supported policy packs in the [Policy Packs repo](https://github.com/cloudgraphdev/cloudgraph-policy-packs)
+
@@ -142,8 +243,8 @@ cg init
1. This initializes CloudGraph's configuration. This command will ask you a series of questions about what providers you are using and how you would like CloudGraph configured.
-
-
+
+
@@ -162,15 +263,15 @@ cg launch
2. This command launches an instance of [Dgraph](https://dgraph.io/), the graphdb CloudGraph uses to store data under the hood. Note that there are 2 ways to launch an instance. **BOTH** of these require [Docker](https://www.docker.com/) to be installed and running. The preferred solution is to use our `cg launch` convenience command.
-
-
+
+
Note that if you do not want to use this command, for example, if you want to launch the Dgraph container in interactive mode, you can use the docker command below.
```bash
- docker run -it -p 8995:5080 -p 8996:6080 -p 8997:8080 -p 8998:9080 -p 8999:8000
+ docker run -it -p 8995:5080 -p 8996:6080 -p 8997:8080 -p 8998:9080 -p 8999:8000
--label cloudgraph-cli-dgraph-standalone -v ~/dgraph:/dgraph --name dgraph dgraph/standalone:v21.03.1
```
@@ -184,15 +285,15 @@ cg scan
-3. Scan for cloud infrastructure for all configured providers. This command will reach out and read all of the metadata on your cloud infrastructure. Note that it is **completely normal** to see warnings and errors while the `cg scan` command runs, these are usually caused by permissions issues. That said, if you encounter any problematic errors running CloudGraph you can prepend `CG_DEBUG=5` to the beginning of your command as in, `CG_DEBUG=5 cg scan`. This will print out the verbose logs with more information and save the output to `cg-debug.log`. Please share your logs with us either by opening an [issue on GitHub](https://github.com/cloudgraphdev/cli/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) or let us know in our [Slack Workspace](https://join.slack.com/t/cloudgraph-workspace/shared_invite/zt-vb8whl6u-3YH0F4mHXNyC6SOqZJvClQ).
+3. Scan for cloud infrastructure for all configured providers. This command will reach out and read all of the metadata on your cloud infrastructure. Note that it is **completely normal** to see warnings and errors while the `cg scan` command runs, these are usually caused by permissions issues. That said, if you encounter any problematic errors running CloudGraph you can prepend `CG_DEBUG=5` to the beginning of your command as in, `CG_DEBUG=5 cg scan`. This will print out the verbose logs with more information and save the output to `cg-debug.log`. Please share your logs with us either by opening an [issue on GitHub](https://github.com/cloudgraphdev/cli/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) or let us know in our [Slack Workspace](https://join.slack.com/t/cloudgraph-workspace/shared_invite/zt-ytjemoz7-yKWwElynDp1eHAAB55sbpg).
-
-
+
+
-That's it, you are all set to start querying! The query tool you selected during the `cg init` command will then be opened in your preferred browser to run queries, mutations, and visualizations on all of your cloud infrastructure!
+That's it, you are all set to start querying! The query tool you selected during the `cg init` command will then be opened in your preferred browser to run queries, mutations, and visualizations on all of your cloud infrastructure! Note that if you installed any policy packs, such as AWS CIS 1.2, policy pack insight data will be automatically added to your cloud data!
@@ -230,13 +331,13 @@ cg teardown --delete-image
-CloudGraph stores as many previous versions of your data as you configured in the `cg init` command. In order to load and query a previous version of your data simply run the `cg load` command and select the version of your data you wish to inspect like so:
+CloudGraph stores as many previous versions of your data as you configured in the `cg init` command. In order to load and query a previous version of your data simply run the `cg load` command and select the version of your data you wish to inspect like so:
-
-
+
+
@@ -246,9 +347,15 @@ CloudGraph stores as many previous versions of your data as you configured in th
-### AWS
+You can find the list of services currently supported for each provider in the following provider repos:
+
+[AWS Provider Repo](https://github.com/cloudgraphdev/cloudgraph-provider-aws)
+
+[Azure Provider Repo](https://github.com/cloudgraphdev/cloudgraph-provider-azure)
+
+[GCP Provider Repo](https://github.com/cloudgraphdev/cloudgraph-provider-gcp)
-For a list of currently supported AWS services please see the [AWS Provider Repo](https://github.com/cloudgraphdev/cloudgraph-provider-aws)
+[K8s Provider Repo](https://github.com/cloudgraphdev/cloudgraph-provider-k8s)
@@ -262,7 +369,9 @@ To use CloudGraph, you will need to be familiar with [GraphQL](https://graphql.o
-## Basic AWS Query Syntax Examples:
+## Basic Query Syntax Examples:
+
+_Note: this section will focus on AWS, but the same ideas apply other provider like Azure and GCP_
To explain how CloudGraph works consider the following query that you can run to get the `ID` and `ARN` of a single `EC2 instance`. Note that for the purposes of these examples we will just request the `IDs` and `ARNs` of AWS resources to keep things terse, but you can query whatever attributes you want:
@@ -270,12 +379,12 @@ To explain how CloudGraph works consider the following query that you can run to
```graphql
query {
- getawsEc2(
- arn: "arn:aws:ec2:us-east-1:123445678997:instance/i-12345567889012234"
- ) {
- id
- arn
- }
+ getawsEc2(
+ arn: "arn:aws:ec2:us-east-1:123445678997:instance/i-12345567889012234"
+ ) {
+ id
+ arn
+ }
}
```
@@ -301,27 +410,27 @@ This query will return a `JSON` payload that looks like this. All of the followi
-Get the `ID` and `ARN` of each `EC2` in all the AWS accounts you have scanned:
+Get the `ID` and `ARN` of each `EC2` in **all** the AWS accounts you have scanned:
```graphql
query {
- queryawsEc2 {
- id
- arn
- }
+ queryawsEc2 {
+ id
+ arn
+ }
}
```
-Get the `ID` and `ARN` of all `EC2` instances in one of your AWS accounts by filtering the accountId:
+Get the `ID` and `ARN` of all `EC2` instances in **one** of your AWS accounts by filtering the accountId:
```graphql
query {
- queryawsEc2(filter: { accountId: { eq: "123456" } }) {
- id
- arn
- }
+ queryawsEc2(filter: { accountId: { eq: "123456" } }) {
+ id
+ arn
+ }
}
```
@@ -331,10 +440,10 @@ Get the `ID` and `ARN` of each `EC2` in `"us-east-1"` using a regex to search th
```graphql
query {
- queryawsEc2(filter: { arn: { regexp: "/.*us-east-1.*/" } }) {
- id
- arn
- }
+ queryawsEc2(filter: { arn: { regexp: "/.*us-east-1.*/" } }) {
+ id
+ arn
+ }
}
```
@@ -344,10 +453,10 @@ Do the same thing but checking to see that the `region` is equal to `"us-east-1"
```graphql
query {
- queryawsEc2(filter: { region: { eq: "us-east-1" } }) {
- id
- arn
- }
+ queryawsEc2(filter: { region: { eq: "us-east-1" } }) {
+ id
+ arn
+ }
}
```
@@ -357,10 +466,10 @@ Do the same thing but checking to see that the `region` contains `"us-east-1"` i
```graphql
query {
- queryawsEc2(filter: { region: { in: "us-east-1" } }) {
- id
- arn
- }
+ queryawsEc2(filter: { region: { in: "us-east-1" } }) {
+ id
+ arn
+ }
}
```
@@ -370,12 +479,12 @@ Get the `ID` and `ARN` of each `M5` series `EC2 instance` in `"us-east-1"`
```graphql
query {
- queryawsEc2(
- filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
- ) {
- id
- arn
- }
+ queryawsEc2(
+ filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
+ ) {
+ id
+ arn
+ }
}
```
@@ -385,15 +494,15 @@ Do the same thing but skip the first found result (i.e. `offset: 1`) and then on
```graphql
query {
- queryawsEc2(
- filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
- order: { asc: availabilityZone }
- first: 2
- offset: 1
- ) {
- id
- arn
- }
+ queryawsEc2(
+ filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
+ order: { asc: availabilityZone }
+ first: 2
+ offset: 1
+ ) {
+ id
+ arn
+ }
}
```
@@ -403,20 +512,20 @@ Do the same thing but also include the `EBS Volume` that is the boot disk for ea
```graphql
query {
- queryawsEc2(
- filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
- order: { asc: availabilityZone }
- first: 2
- offset: 1
- ) {
- id
- arn
- ebs(filter: { isBootDisk: true }, first: 1) {
- id
- arn
- isBootDisk
- }
- }
+ queryawsEc2(
+ filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
+ order: { asc: availabilityZone }
+ first: 2
+ offset: 1
+ ) {
+ id
+ arn
+ ebs(filter: { isBootDisk: true }, first: 1) {
+ id
+ arn
+ isBootDisk
+ }
+ }
}
```
@@ -426,32 +535,32 @@ Do the same thing, but also include the `SGs` and `ALBs` for each `EC2`. For the
```graphql
query {
- queryawsEc2(
- filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
- order: { asc: availabilityZone }
- first: 2
- offset: 1
- ) {
- id
- arn
- ebs(filter: { isBootDisk: true }, first: 1) {
- id
- arn
- isBootDisk
- }
- securityGroups {
- id
- arn
- }
- alb {
- id
- arn
- ec2Instance {
- id
- arn
- }
- }
- }
+ queryawsEc2(
+ filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
+ order: { asc: availabilityZone }
+ first: 2
+ offset: 1
+ ) {
+ id
+ arn
+ ebs(filter: { isBootDisk: true }, first: 1) {
+ id
+ arn
+ isBootDisk
+ }
+ securityGroups {
+ id
+ arn
+ }
+ alb {
+ id
+ arn
+ ec2Instance {
+ id
+ arn
+ }
+ }
+ }
}
```
@@ -499,18 +608,118 @@ query {
## AWS security, compliance, and governance examples:
+CloudGraph Policy Packs guarantee compliance across existing infrastructure for a given cloud provider. Packs are based on sets of rules/benchmarks provided by security organizations like the Center for Internet Security with the objective of keeping your infrastructure up-to-date with industry security standards. Once you have added a policy pack using the `cg policy add` command (i.e. `cg policy add aws-cis-1.2.0`) each time you run a scan CloudGraph will _automatically_ execute your configured policies. Those results will be stored at Dgraph and linked to your existing resources, making it easy to query your compliance results alongside your resources.
+
+For more information on currently available policy packs please visit our [Policy Packs repo](https://github.com/cloudgraphdev/cloudgraph-policy-packs)
+
+
+
+Use the CloudGraph Policy Pack for AWS CIS 1.2 to query all of your CIS findings for all of your AWS Accounts:
+
+```graphql
+query {
+ queryawsCISFindings {
+ id
+ resourceId
+ result
+ rule {
+ id
+ description
+ severity
+ }
+ }
+}
+```
+
-Find all the unencrypted `EBS Volumes`:
+If you want to query several different compliance findings for a given provider like AWS at once, you can request them like this:
```graphql
query {
- queryawsEbs(filter: { encrypted: false }) {
- id
- arn
- availabilityZone
- encrypted
- }
+ queryawsFindings {
+ CISFindings {
+ id
+ resourceId
+ result
+ rule {
+ id
+ description
+ severity
+ }
+ }
+ AutoCloudFindings {
+ id
+ resourceId
+ result
+ rule {
+ id
+ description
+ severity
+ }
+ }
+ }
+}
+```
+
+
+
+For each CIS rule, get the resources that the rule is associated with, in this case we are quering IAM user's data to see which pass and fail:
+
+```graphql
+query {
+ queryawsCISFindings {
+ id
+ resourceId
+ result
+ rule {
+ id
+ description
+ severity
+ }
+ iamUser {
+ id
+ arn
+ name
+ }
+ }
+}
+```
+
+
+
+If you wanted to understand the CIS rules that apply to a particular IAM User you could use the following query:
+
+```graphql
+query {
+ getawsIamUser(id: "123456789") {
+ name
+ CISFindings {
+ id
+ resourceId
+ result
+ rule {
+ id
+ description
+ severity
+ }
+ }
+ }
+}
+```
+
+
+
+Even if you don't have any policy packs installed, you can still write powerful security queries like this to find all the unencrypted `EBS Volumes`:
+
+```graphql
+query {
+ queryawsEbs(filter: { encrypted: false }) {
+ id
+ arn
+ availabilityZone
+ encrypted
+ }
}
```
@@ -548,16 +757,16 @@ Find all the `KMS` keys in `"us-east-1"`:
```graphql
query {
- queryawsKms(filter: { arn: { regexp: "/.*us-east-1.*/" } }) {
- id
- arn
- description
- keyRotationEnabled
- tags {
- key
- value
- }
- }
+ queryawsKms(filter: { arn: { regexp: "/.*us-east-1.*/" } }) {
+ id
+ arn
+ description
+ keyRotationEnabled
+ tags {
+ key
+ value
+ }
+ }
}
```
@@ -567,12 +776,12 @@ Find all the burstable `T` series instances:
```graphql
query {
- queryawsEc2(filter: { instanceType: { regexp: "/^t.*/" } }) {
- id
- arn
- availabilityZone
- instanceType
- }
+ queryawsEc2(filter: { instanceType: { regexp: "/^t.*/" } }) {
+ id
+ arn
+ availabilityZone
+ instanceType
+ }
}
```
@@ -582,12 +791,12 @@ Find the default `VPCs`:
```graphql
query {
- queryawsVpc(filter: { defaultVpc: true }) {
- id
- arn
- defaultVpc
- state
- }
+ queryawsVpc(filter: { defaultVpc: true }) {
+ id
+ arn
+ defaultVpc
+ state
+ }
}
```
@@ -597,16 +806,16 @@ Find the public `ALBs`:
```graphql
query {
- queryawsAlb(filter: { scheme: { eq: "internet-facing" } }) {
- id
- arn
- dnsName
- createdAt
- tags {
- key
- value
- }
- }
+ queryawsAlb(filter: { scheme: { eq: "internet-facing" } }) {
+ id
+ arn
+ dnsName
+ createdAt
+ tags {
+ key
+ value
+ }
+ }
}
```
@@ -616,22 +825,22 @@ Find all of the `EC2s`, `Lambdas`, and `VPCs` that have a `Tag` value of `"Produ
```graphql
query {
- queryawsTag(filter: { value: { eq: "Production" } }) {
- key
- value
- ec2Instance {
- id
- arn
- }
- lambda {
- id
- arn
- }
- vpc {
- id
- arn
- }
- }
+ queryawsTag(filter: { value: { eq: "Production" } }) {
+ key
+ value
+ ec2Instance {
+ id
+ arn
+ }
+ lambda {
+ id
+ arn
+ }
+ vpc {
+ id
+ arn
+ }
+ }
}
```
@@ -641,24 +850,24 @@ Do the same thing but look for both a `key` and a `value`:
```graphql
query {
- queryawsTag(
- filter: { key: { eq: "Environment" }, value: { eq: "Production" } }
- ) {
- key
- value
- ec2Instance {
- id
- arn
- }
- lambda {
- id
- arn
- }
- vpc {
- id
- arn
- }
- }
+ queryawsTag(
+ filter: { key: { eq: "Environment" }, value: { eq: "Production" } }
+ ) {
+ key
+ value
+ ec2Instance {
+ id
+ arn
+ }
+ lambda {
+ id
+ arn
+ }
+ vpc {
+ id
+ arn
+ }
+ }
}
```
@@ -668,22 +877,22 @@ Do the same thing using `getawsTag` instead of `queryawsTag`. Note that when sea
```graphql
query {
- getawsTag(id: "Environment:Production") {
- key
- value
- ec2Instance {
- id
- arn
- }
- lambda {
- id
- arn
- }
- vpc {
- id
- arn
- }
- }
+ getawsTag(id: "Environment:Production") {
+ key
+ value
+ ec2Instance {
+ id
+ arn
+ }
+ lambda {
+ id
+ arn
+ }
+ vpc {
+ id
+ arn
+ }
+ }
}
```
@@ -693,7 +902,7 @@ query {
-Note that in order to successfully ingest FinOps related data you must have the Cost Explorer API enabled in your AWS Account. [You can view how to do that here](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/ce-access.html)
+Note that billing data is currently only available for AWS. In order to successfully ingest FinOps related data you must have the Cost Explorer API enabled in your AWS Account. [You can view how to do that here](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/ce-access.html)
@@ -923,6 +1132,79 @@ query {
+## AWS CloudWatch example:
+
+CloudGraph ingests your CloudWatch Metric data and stores it along with select AWS services. This feature is currently in beta and will work for EC2 only:
+
+```graphql
+query {
+ queryawsEc2 {
+ arn
+ cloudWatchMetricData {
+ lastWeek {
+ cpuUtilizationAverage
+ networkInAverage
+ networkOutAverage
+ networkPacketsInAverage
+ networkPacketsOutAverage
+ statusCheckFailedSum
+ statusCheckFailedInstanceSum
+ statusCheckFailedSystemSum
+ diskReadOpsAverage
+ diskWriteOpsAverage
+ diskReadBytesAverage
+ diskWriteBytesAverage
+ }
+
+ lastMonth {
+ cpuUtilizationAverage
+ networkInAverage
+ networkOutAverage
+ networkPacketsInAverage
+ networkPacketsOutAverage
+ statusCheckFailedSum
+ statusCheckFailedInstanceSum
+ statusCheckFailedSystemSum
+ diskReadOpsAverage
+ diskWriteOpsAverage
+ diskReadBytesAverage
+ diskWriteBytesAverage
+ }
+ last6Hours {
+ cpuUtilizationAverage
+ networkInAverage
+ networkOutAverage
+ networkPacketsInAverage
+ networkPacketsOutAverage
+ statusCheckFailedSum
+ statusCheckFailedInstanceSum
+ statusCheckFailedSystemSum
+ diskReadOpsAverage
+ diskWriteOpsAverage
+ diskReadBytesAverage
+ diskWriteBytesAverage
+ }
+ last24Hours {
+ cpuUtilizationAverage
+ networkInAverage
+ networkOutAverage
+ networkPacketsInAverage
+ networkPacketsOutAverage
+ statusCheckFailedSum
+ statusCheckFailedInstanceSum
+ statusCheckFailedSystemSum
+ diskReadOpsAverage
+ diskWriteOpsAverage
+ diskReadBytesAverage
+ diskWriteBytesAverage
+ }
+ }
+ }
+}
+```
+
+
+
## Thinking in terms of a graph:
@@ -958,14 +1240,24 @@ Today, the biggest limitation with CloudGraph and our query abilities is we don'
```graphql
query {
- queryawsEc2(filter: { ebs: { isBootDisk: true } }) {
- id
- arn
- ebs {
- id
- arn
- }
- }
+ # This won't work just yet...
+ queryawsEc2(filter: { ebs: { isBootDisk: true } }) {
+ id
+ arn
+ ebs {
+ id
+ arn
+ }
+ }
+ # So you have to do this instead :(
+ queryawsEc2 {
+ id
+ arn
+ ebs(filter: { isBootDisk: true }) {
+ id
+ arn
+ }
+ }
}
```
@@ -990,8 +1282,8 @@ GraphQL playground has a fluid and engaging UX that is great for querying a Grap
-
-
+
+
@@ -1004,8 +1296,8 @@ Altair is another great GraphQL query tool that packs a ton of [features](https:
-
-
+
+
@@ -1018,8 +1310,8 @@ GraphQL Voyager is an awesome way to explore the schema(s) for your CG providers
-
-
+
+
@@ -1031,13 +1323,13 @@ GraphQL Voyager is an awesome way to explore the schema(s) for your CG providers
-Comments, questions, or feedback? Please [Join Our Slack Workspace](https://join.slack.com/t/cloudgraph-workspace/shared_invite/zt-vb8whl6u-3YH0F4mHXNyC6SOqZJvClQ) we would love to hear from you.
+Comments, questions, or feedback? Please [Join Our Slack Workspace](https://join.slack.com/t/cloudgraph-workspace/shared_invite/zt-ytjemoz7-yKWwElynDp1eHAAB55sbpg) we would love to hear from you.
# Contribution Guidelines
-If you're interested in contributing to CloudGraph please check out our [Contribution Guidelines](https://github.com/cloudgraphdev/cli/blob/master/CONTRIBUTING.md).
+If you're interested in contributing to CloudGraph please check out our [Contribution Guidelines](https://github.com/cloudgraphdev/cli/blob/main/CONTRIBUTING.md).
@@ -1055,13 +1347,13 @@ Interested in a fully managed SaaS/self hosted version of CloudGraph that has bu
-
+
# Debugging
-If you encounter any errors running CloudGraph you can prepend `CG_DEBUG=5` to the beginning of your command as in, `CG_DEBUG=5 cg scan`. This will print out the verbose logs with more information that you can then use to either open an [issue on GitHub](https://github.com/cloudgraphdev/cli/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) or let us know in our [Slack Workspace](https://join.slack.com/t/cloudgraph-workspace/shared_invite/zt-vb8whl6u-3YH0F4mHXNyC6SOqZJvClQ).
+If you encounter any errors running CloudGraph you can prepend `CG_DEBUG=5` to the beginning of your command as in, `CG_DEBUG=5 cg scan`. This will print out the verbose logs with more information that you can then use to either open an [issue on GitHub](https://github.com/cloudgraphdev/cli/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) or let us know in our [Slack Workspace](https://join.slack.com/t/cloudgraph-workspace/shared_invite/zt-ytjemoz7-yKWwElynDp1eHAAB55sbpg).
@@ -1086,32 +1378,42 @@ There are some common errors you may see when running CloudGraph that are usuall
* [`cg init [PROVIDER]`](#cg-init-provider)
* [`cg launch [PROVIDER]`](#cg-launch-provider)
* [`cg load [PROVIDER]`](#cg-load-provider)
+* [`cg policy [PROVIDER]`](#cg-policy-provider)
+* [`cg policy add [PROVIDER]`](#cg-policy-add-provider)
+* [`cg policy install [PROVIDER]`](#cg-policy-install-provider)
+* [`cg policy list [PROVIDER]`](#cg-policy-list-provider)
+* [`cg policy remove [PROVIDER]`](#cg-policy-remove-provider)
+* [`cg policy update [PROVIDER]`](#cg-policy-update-provider)
* [`cg provider [PROVIDER]`](#cg-provider-provider)
-* [`cg provider:add [PROVIDER]`](#cg-provideradd-provider)
-* [`cg provider:install [PROVIDER]`](#cg-providerinstall-provider)
-* [`cg provider:list [PROVIDER]`](#cg-providerlist-provider)
-* [`cg provider:remove [PROVIDER]`](#cg-providerremove-provider)
-* [`cg provider:update [PROVIDER]`](#cg-providerupdate-provider)
+* [`cg provider add [PROVIDER]`](#cg-provider-add-provider)
+* [`cg provider install [PROVIDER]`](#cg-provider-install-provider)
+* [`cg provider list [PROVIDER]`](#cg-provider-list-provider)
+* [`cg provider remove [PROVIDER]`](#cg-provider-remove-provider)
+* [`cg provider update [PROVIDER]`](#cg-provider-update-provider)
* [`cg scan [PROVIDER]`](#cg-scan-provider)
* [`cg serve [PROVIDER]`](#cg-serve-provider)
* [`cg teardown [PROVIDER]`](#cg-teardown-provider)
+* [`cg update [PROVIDER]`](#cg-update-provider)
## `cg help [COMMAND]`
-display help for cg
+Display help for cg.
```
USAGE
- $ cg help [COMMAND]
+ $ cg help [COMMAND] [-n]
ARGUMENTS
- COMMAND command to show help for
+ COMMAND Command to show help for.
-OPTIONS
- --all see all commands in CLI
+FLAGS
+ -n, --nested-commands Include all nested commands in the output.
+
+DESCRIPTION
+ Display help for cg.
```
-_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.2.3/src/commands/help.ts)_
+_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.12/src/commands/help.ts)_
## `cg init [PROVIDER]`
@@ -1119,27 +1421,36 @@ Set initial configuration for providers
```
USAGE
- $ cg init [PROVIDER]
-
-OPTIONS
- -d, --dgraph=dgraph Set where dgraph is running (default localhost:8997)
- -l, --version-limit=version-limit Limit the amount of version folders stored on the filesystem (default 10)
- -p, --port=port Set port to serve query engine
- -q, --query-engine=playground|altair Query engine to launch
+ $ cg init [PROVIDER] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ]
+ [-q playground|altair] [-l ] [--use-roles] [-P ] [-r]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
-r, --resources
- -s, --storage=dgraph Select a storage engine to use. Currently only supports Dgraph
- --dev Turn on developer mode
- --directory=directory Set the folder where CloudGraph will store data. (default cg)
- --no-serve Set to not serve a query engine
- --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Set initial configuration for providers
EXAMPLES
$ cg init
+
$ cg init aws [Initialize AWS provider]
+
$ cg init aws -r [Specify resources to crawl]
```
-_See code: [src/commands/init.ts](https://github.com/cloudgraphdev/cli/blob/v0.13.9/src/commands/init.ts)_
+_See code: [src/commands/init.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/init.ts)_
## `cg launch [PROVIDER]`
@@ -1147,24 +1458,31 @@ Launch an instance of Dgraph to store data
```
USAGE
- $ cg launch [PROVIDER]
-
-OPTIONS
- -d, --dgraph=dgraph Set where dgraph is running (default localhost:8997)
- -l, --version-limit=version-limit Limit the amount of version folders stored on the filesystem (default 10)
- -p, --port=port Set port to serve query engine
- -q, --query-engine=playground|altair Query engine to launch
- -s, --storage=dgraph Select a storage engine to use. Currently only supports Dgraph
- --dev Turn on developer mode
- --directory=directory Set the folder where CloudGraph will store data. (default cg)
- --no-serve Set to not serve a query engine
- --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
-
-EXAMPLE
+ $ cg launch [PROVIDER] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ]
+ [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Launch an instance of Dgraph to store data
+
+EXAMPLES
$ cg launch
```
-_See code: [src/commands/launch.ts](https://github.com/cloudgraphdev/cli/blob/v0.13.9/src/commands/launch.ts)_
+_See code: [src/commands/launch.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/launch.ts)_
## `cg load [PROVIDER]`
@@ -1172,25 +1490,246 @@ Load a specific version of your CloudGraph data
```
USAGE
- $ cg load [PROVIDER]
-
-OPTIONS
- -d, --dgraph=dgraph Set where dgraph is running (default localhost:8997)
- -l, --version-limit=version-limit Limit the amount of version folders stored on the filesystem (default 10)
- -p, --port=port Set port to serve query engine
- -q, --query-engine=playground|altair Query engine to launch
- -s, --storage=dgraph Select a storage engine to use. Currently only supports Dgraph
- --dev Turn on developer mode
- --directory=directory Set the folder where CloudGraph will store data. (default cg)
- --no-serve Set to not serve a query engine
- --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+ $ cg load [PROVIDER] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ]
+ [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Load a specific version of your CloudGraph data
EXAMPLES
$ cg load [Load data for all providers configured]
+
$ cg load aws [Load data for AWS]
```
-_See code: [src/commands/load.ts](https://github.com/cloudgraphdev/cli/blob/v0.13.9/src/commands/load.ts)_
+_See code: [src/commands/load.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/load.ts)_
+
+## `cg policy [PROVIDER]`
+
+Commands to manage policy pack modules, run $ cg policy for more info.
+
+```
+USAGE
+ $ cg policy [PROVIDER] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ]
+ [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Commands to manage policy pack modules, run $ cg policy for more info.
+```
+
+_See code: [src/commands/policy/index.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/policy/index.ts)_
+
+## `cg policy add [PROVIDER]`
+
+Add new policy packs
+
+```
+USAGE
+ $ cg policy add [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p
+ ] [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-save Set to not alter lock file, just delete plugin
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Add new policy packs
+
+ALIASES
+ $ cg add policy
+
+EXAMPLES
+ $ cg policy add aws-cis-1.2.0
+
+ $ cg policy add aws-cis-1.2.0@0.12.0
+```
+
+## `cg policy install [PROVIDER]`
+
+Install policy packs based on the lock file
+
+```
+USAGE
+ $ cg policy install [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p
+ ] [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-save Set to not alter lock file, just delete plugin
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Install policy packs based on the lock file
+
+ALIASES
+ $ cg install policy
+
+EXAMPLES
+ $ cg policy install
+```
+
+## `cg policy list [PROVIDER]`
+
+List currently installed policy packs and versions
+
+```
+USAGE
+ $ cg policy list [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p
+ ] [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-save Set to not alter lock file, just delete plugin
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ List currently installed policy packs and versions
+
+ALIASES
+ $ cg ls policy
+ $ cg list policy
+
+EXAMPLES
+ $ cg policy list
+
+ $ cg policy list aws
+```
+
+## `cg policy remove [PROVIDER]`
+
+Remove currently installed policy pack
+
+```
+USAGE
+ $ cg policy remove [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p
+ ] [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-save Set to not alter lock file, just delete plugin
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Remove currently installed policy pack
+
+ALIASES
+ $ cg remove policy
+ $ cg policy remove
+ $ cg policy rm
+ $ cg del policy
+ $ cg rm policy
+
+EXAMPLES
+ $ cg policy remove
+
+ $ cg policy remove aws-cis-1.2.0
+
+ $ cg policy remove aws-cis-1.2.0 --no-save
+```
+
+## `cg policy update [PROVIDER]`
+
+Update currently installed policy packs
+
+```
+USAGE
+ $ cg policy update [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p
+ ] [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-save Set to not alter lock file, just delete plugin
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Update currently installed policy packs
+
+EXAMPLES
+ $ cg policy update
+
+ $ cg policy update aws-cis-1.2.0
+
+ $ cg policy update aws-cis-1.2.0@0.12.0
+```
## `cg provider [PROVIDER]`
@@ -1198,174 +1737,212 @@ Commands to manage provider modules, run $ cg provider for more info.
```
USAGE
- $ cg provider [PROVIDER]
-
-OPTIONS
- -d, --dgraph=dgraph Set where dgraph is running (default localhost:8997)
- -l, --version-limit=version-limit Limit the amount of version folders stored on the filesystem (default 10)
- -p, --port=port Set port to serve query engine
- -q, --query-engine=playground|altair Query engine to launch
- -s, --storage=dgraph Select a storage engine to use. Currently only supports Dgraph
- --dev Turn on developer mode
- --directory=directory Set the folder where CloudGraph will store data. (default cg)
- --no-serve Set to not serve a query engine
- --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+ $ cg provider [PROVIDER] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ]
+ [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Commands to manage provider modules, run $ cg provider for more info.
```
-_See code: [src/commands/provider/index.ts](https://github.com/cloudgraphdev/cli/blob/v0.13.9/src/commands/provider/index.ts)_
+_See code: [src/commands/provider/index.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/provider/index.ts)_
-## `cg provider:add [PROVIDER]`
+## `cg provider add [PROVIDER]`
Add new providers
```
USAGE
- $ cg provider add [PROVIDER]
-
-OPTIONS
- -d, --dgraph=dgraph Set where dgraph is running (default localhost:8997)
- -l, --version-limit=version-limit Limit the amount of version folders stored on the filesystem (default 10)
- -p, --port=port Set port to serve query engine
- -q, --query-engine=playground|altair Query engine to launch
- -s, --storage=dgraph Select a storage engine to use. Currently only supports Dgraph
- --dev Turn on developer mode
- --directory=directory Set the folder where CloudGraph will store data. (default cg)
- --no-serve Set to not serve a query engine
- --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+ $ cg provider add [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p
+ ] [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-save Set to not alter lock file, just delete plugin
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Add new providers
ALIASES
- $ cg add
+ $ cg add provider
EXAMPLES
$ cg provider add aws
+
$ cg provider add aws@0.12.0
```
-_See code: [src/commands/provider/add.ts](https://github.com/cloudgraphdev/cli/blob/v0.13.9/src/commands/provider/add.ts)_
-
-## `cg provider:install [PROVIDER]`
+## `cg provider install [PROVIDER]`
Install providers based on the lock file
```
USAGE
- $ cg provider install [PROVIDER]
-
-OPTIONS
- -d, --dgraph=dgraph Set where dgraph is running (default localhost:8997)
- -l, --version-limit=version-limit Limit the amount of version folders stored on the filesystem (default 10)
- -p, --port=port Set port to serve query engine
- -q, --query-engine=playground|altair Query engine to launch
- -s, --storage=dgraph Select a storage engine to use. Currently only supports Dgraph
- --dev Turn on developer mode
- --directory=directory Set the folder where CloudGraph will store data. (default cg)
- --no-serve Set to not serve a query engine
- --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+ $ cg provider install [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p
+ ] [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-save Set to not alter lock file, just delete plugin
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Install providers based on the lock file
ALIASES
- $ cg install
+ $ cg install provider
-EXAMPLE
+EXAMPLES
$ cg provider install
```
-_See code: [src/commands/provider/install.ts](https://github.com/cloudgraphdev/cli/blob/v0.13.9/src/commands/provider/install.ts)_
-
-## `cg provider:list [PROVIDER]`
+## `cg provider list [PROVIDER]`
List currently installed providers and versions
```
USAGE
- $ cg provider list [PROVIDER]
-
-OPTIONS
- -d, --dgraph=dgraph Set where dgraph is running (default localhost:8997)
- -l, --version-limit=version-limit Limit the amount of version folders stored on the filesystem (default 10)
- -p, --port=port Set port to serve query engine
- -q, --query-engine=playground|altair Query engine to launch
- -s, --storage=dgraph Select a storage engine to use. Currently only supports Dgraph
- --dev Turn on developer mode
- --directory=directory Set the folder where CloudGraph will store data. (default cg)
- --no-serve Set to not serve a query engine
- --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+ $ cg provider list [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p
+ ] [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-save Set to not alter lock file, just delete plugin
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ List currently installed providers and versions
ALIASES
- $ cg provider ls
- $ cg list
- $ cg ls
+ $ cg ls provider
+ $ cg list provider
EXAMPLES
$ cg provider list
+
$ cg provider list aws
```
-_See code: [src/commands/provider/list.ts](https://github.com/cloudgraphdev/cli/blob/v0.13.9/src/commands/provider/list.ts)_
-
-## `cg provider:remove [PROVIDER]`
+## `cg provider remove [PROVIDER]`
Remove currently installed provider
```
USAGE
- $ cg provider remove [PROVIDER]
-
-OPTIONS
- -d, --dgraph=dgraph Set where dgraph is running (default localhost:8997)
- -l, --version-limit=version-limit Limit the amount of version folders stored on the filesystem (default 10)
- -p, --port=port Set port to serve query engine
- -q, --query-engine=playground|altair Query engine to launch
- -s, --storage=dgraph Select a storage engine to use. Currently only supports Dgraph
- --dev Turn on developer mode
- --directory=directory Set the folder where CloudGraph will store data. (default cg)
- --no-save Set to not alter lock file, just delete plugin
- --no-serve Set to not serve a query engine
- --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+ $ cg provider remove [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p
+ ] [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-save Set to not alter lock file, just delete plugin
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Remove currently installed provider
ALIASES
- $ cg remove
- $ cg rm
- $ cg del
+ $ cg remove provider
+ $ cg provider remove
$ cg provider rm
- $ cg provider del
+ $ cg del provider
+ $ cg rm provider
EXAMPLES
- $ cg provider delete
- $ cg provider delete aws
- $ cg provider delete aws --no-save
-```
+ $ cg provider remove
-_See code: [src/commands/provider/remove.ts](https://github.com/cloudgraphdev/cli/blob/v0.13.9/src/commands/provider/remove.ts)_
+ $ cg provider remove aws
-## `cg provider:update [PROVIDER]`
+ $ cg provider remove aws --no-save
+```
+
+## `cg provider update [PROVIDER]`
Update currently installed providers
```
USAGE
- $ cg provider update [PROVIDER]
-
-OPTIONS
- -d, --dgraph=dgraph Set where dgraph is running (default localhost:8997)
- -l, --version-limit=version-limit Limit the amount of version folders stored on the filesystem (default 10)
- -p, --port=port Set port to serve query engine
- -q, --query-engine=playground|altair Query engine to launch
- -s, --storage=dgraph Select a storage engine to use. Currently only supports Dgraph
- --dev Turn on developer mode
- --directory=directory Set the folder where CloudGraph will store data. (default cg)
- --no-serve Set to not serve a query engine
- --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
-
-ALIASES
- $ cg update
+ $ cg provider update [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p
+ ] [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-save Set to not alter lock file, just delete plugin
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Update currently installed providers
EXAMPLES
$ cg provider update
+
$ cg provider update aws
- $cg provider update aws@0.12.0
-```
-_See code: [src/commands/provider/update.ts](https://github.com/cloudgraphdev/cli/blob/v0.13.9/src/commands/provider/update.ts)_
+ $ cg provider update aws@0.12.0
+```
## `cg scan [PROVIDER]`
@@ -1373,27 +1950,37 @@ Scan one or multiple providers data to be queried through Dgraph
```
USAGE
- $ cg scan [PROVIDER]
-
-OPTIONS
- -d, --dgraph=dgraph Set where dgraph is running (default localhost:8997)
- -l, --version-limit=version-limit Limit the amount of version folders stored on the filesystem (default 10)
- -p, --port=port Set port to serve query engine
- -q, --query-engine=playground|altair Query engine to launch
- -s, --storage=dgraph Select a storage engine to use. Currently only supports Dgraph
- --dev Turn on developer mode
- --directory=directory Set the folder where CloudGraph will store data. (default cg)
- --no-serve Set to not serve a query engine
- --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+ $ cg scan [PROVIDER] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ]
+ [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Scan one or multiple providers data to be queried through Dgraph
EXAMPLES
$ cg scan
+
$ cg scan aws
+
$ cg scan aws --dgraph http://localhost:1000 [Save data in dgraph running on port 1000]
+
$ cg scan aws --no-serve [Do not start the query engine]
```
-_See code: [src/commands/scan.ts](https://github.com/cloudgraphdev/cli/blob/v0.13.9/src/commands/scan.ts)_
+_See code: [src/commands/scan.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/scan.ts)_
## `cg serve [PROVIDER]`
@@ -1401,24 +1988,31 @@ Serve a GraphQL query tool to query your CloudGraph data.
```
USAGE
- $ cg serve [PROVIDER]
-
-OPTIONS
- -d, --dgraph=dgraph Set where dgraph is running (default localhost:8997)
- -l, --version-limit=version-limit Limit the amount of version folders stored on the filesystem (default 10)
- -p, --port=port Set port to serve query engine
- -q, --query-engine=playground|altair Query engine to launch
- -s, --storage=dgraph Select a storage engine to use. Currently only supports Dgraph
- --dev Turn on developer mode
- --directory=directory Set the folder where CloudGraph will store data. (default cg)
- --no-serve Set to not serve a query engine
- --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
-
-EXAMPLE
+ $ cg serve [PROVIDER] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p ]
+ [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Serve a GraphQL query tool to query your CloudGraph data.
+
+EXAMPLES
$ cg serve
```
-_See code: [src/commands/serve.ts](https://github.com/cloudgraphdev/cli/blob/v0.13.9/src/commands/serve.ts)_
+_See code: [src/commands/serve.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/serve.ts)_
## `cg teardown [PROVIDER]`
@@ -1426,15 +2020,55 @@ Stops the Dgraph Docker container.
```
USAGE
- $ cg teardown [PROVIDER]
+ $ cg teardown [PROVIDER] [--delete-image]
-OPTIONS
+FLAGS
--delete-image Remove dgraph docker image after stopping it
+DESCRIPTION
+ Stops the Dgraph Docker container.
+
EXAMPLES
$ cg teardown
+
$ cg teardown --delete-image
```
-_See code: [src/commands/teardown.ts](https://github.com/cloudgraphdev/cli/blob/v0.13.9/src/commands/teardown.ts)_
+_See code: [src/commands/teardown.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/teardown.ts)_
+
+## `cg update [PROVIDER]`
+
+Upgrade currently installed plugins.
+
+```
+USAGE
+ $ cg update [PROVIDER] [--no-save] [--dev] [-d ] [-s dgraph] [--directory ] [--no-serve] [-p
+ ] [-q playground|altair] [-l ] [--use-roles] [-P ]
+
+FLAGS
+ -P, --policies= Policy Packs to execute during scan
+ -d, --dgraph= Set where dgraph is running (default localhost:8997)
+ -l, --version-limit= Limit the amount of version folders stored on the filesystem (default 10)
+ -p, --port= Set port to serve query engine
+ -q, --query-engine= Query engine to launch
+
+ -s, --storage= Select a storage engine to use. Currently only supports Dgraph
+
+ --dev Turn on developer mode
+ --directory= Set the folder where CloudGraph will store data. (default cg)
+ --no-save Set to not alter lock file, just delete plugin
+ --no-serve Set to not serve a query engine
+ --use-roles Set to true to use roleARNs instead of profiles for AWS credentials
+
+DESCRIPTION
+ Upgrade currently installed plugins.
+
+ALIASES
+ $ cg update
+
+EXAMPLES
+ $ cg update
+```
+
+_See code: [src/commands/update.ts](https://github.com/cloudgraphdev/cli/blob/v0.25.1/src/commands/update.ts)_
diff --git a/bin/dev b/bin/dev
new file mode 100755
index 0000000..97a1da2
--- /dev/null
+++ b/bin/dev
@@ -0,0 +1,21 @@
+#!/usr/bin/env node
+
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+const oclif = require('@oclif/core')
+
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+const path = require('path')
+
+const project = path.join(__dirname, '..', 'tsconfig.json')
+
+// In dev mode -> use ts-node and dev plugins
+process.env.NODE_ENV = 'development'
+
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+require('ts-node').register({project})
+
+// In dev mode, always show stack traces
+oclif.settings.debug = true;
+
+// Start the CLI
+oclif.run().then(oclif.flush).catch(oclif.Errors.handle)
diff --git a/bin/dev.cmd b/bin/dev.cmd
new file mode 100644
index 0000000..8ae2b12
--- /dev/null
+++ b/bin/dev.cmd
@@ -0,0 +1,3 @@
+@echo off
+
+node "%~dp0\dev" %*
diff --git a/bin/run b/bin/run
index 30b14e1..5c285b5 100755
--- a/bin/run
+++ b/bin/run
@@ -1,5 +1,5 @@
#!/usr/bin/env node
-require('@oclif/command').run()
-.then(require('@oclif/command/flush'))
-.catch(require('@oclif/errors/handle'))
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+require('@oclif/core').run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle'))
+
diff --git a/docs/images/autoCloud.png b/docs/images/autoCloud.png
index 1ef736a..c8f58c2 100644
Binary files a/docs/images/autoCloud.png and b/docs/images/autoCloud.png differ
diff --git a/docs/images/exampleQueries.gif b/docs/images/exampleQueries.gif
new file mode 100644
index 0000000..a256805
Binary files /dev/null and b/docs/images/exampleQueries.gif differ
diff --git a/docs/images/exampleQuery1.jpg b/docs/images/exampleQuery1.jpg
deleted file mode 100644
index 9f1b2c8..0000000
Binary files a/docs/images/exampleQuery1.jpg and /dev/null differ
diff --git a/docs/images/exampleQuery2.jpg b/docs/images/exampleQuery2.jpg
deleted file mode 100644
index 6587555..0000000
Binary files a/docs/images/exampleQuery2.jpg and /dev/null differ
diff --git a/docs/images/exampleQuery3.jpg b/docs/images/exampleQuery3.jpg
deleted file mode 100644
index a3cddf2..0000000
Binary files a/docs/images/exampleQuery3.jpg and /dev/null differ
diff --git a/docs/images/exampleQuery4.jpg b/docs/images/exampleQuery4.jpg
deleted file mode 100644
index 08e00f2..0000000
Binary files a/docs/images/exampleQuery4.jpg and /dev/null differ
diff --git a/docs/images/init.gif b/docs/images/init.gif
new file mode 100644
index 0000000..d4fccbd
Binary files /dev/null and b/docs/images/init.gif differ
diff --git a/docs/images/init.png b/docs/images/init.png
deleted file mode 100644
index 9d34c49..0000000
Binary files a/docs/images/init.png and /dev/null differ
diff --git a/docs/images/install.gif b/docs/images/install.gif
new file mode 100644
index 0000000..36b5b60
Binary files /dev/null and b/docs/images/install.gif differ
diff --git a/docs/images/launch.gif b/docs/images/launch.gif
new file mode 100644
index 0000000..74464e0
Binary files /dev/null and b/docs/images/launch.gif differ
diff --git a/docs/images/launch.png b/docs/images/launch.png
deleted file mode 100644
index 0fcc19d..0000000
Binary files a/docs/images/launch.png and /dev/null differ
diff --git a/docs/images/load.png b/docs/images/load.png
index 8769c7b..2d8df62 100644
Binary files a/docs/images/load.png and b/docs/images/load.png differ
diff --git a/docs/images/scan.gif b/docs/images/scan.gif
new file mode 100644
index 0000000..3836a24
Binary files /dev/null and b/docs/images/scan.gif differ
diff --git a/docs/images/scan.png b/docs/images/scan.png
deleted file mode 100644
index d268b9c..0000000
Binary files a/docs/images/scan.png and /dev/null differ
diff --git a/examples/aws/filter_by_account_query_example.graphql b/examples/aws/filter_by_account_query_example.graphql
deleted file mode 100644
index 5ef2e5c..0000000
--- a/examples/aws/filter_by_account_query_example.graphql
+++ /dev/null
@@ -1,6 +0,0 @@
-query {
- queryawsEc2(filter: { accountId: { eq: "123456" } }) {
- id
- arn
- }
-}
\ No newline at end of file
diff --git a/examples/aws/find_burstable_instances.graphql b/examples/aws/find_burstable_instances.graphql
deleted file mode 100644
index 309cf40..0000000
--- a/examples/aws/find_burstable_instances.graphql
+++ /dev/null
@@ -1,8 +0,0 @@
-query {
- queryawsEc2(filter: { instanceType: { regexp: "/^t.*/" } } ) {
- id
- arn
- availabilityZone
- instanceType
- }
-}
diff --git a/examples/aws/find_default_vpcs.graphql b/examples/aws/find_default_vpcs.graphql
deleted file mode 100644
index 826124a..0000000
--- a/examples/aws/find_default_vpcs.graphql
+++ /dev/null
@@ -1,8 +0,0 @@
-query {
- queryawsVpc( filter: { defaultVpc: true } ) {
- id
- arn
- defaultVpc
- state
- }
-}
diff --git a/examples/aws/find_kms_keys_in_us-east-1.graphql b/examples/aws/find_kms_keys_in_us-east-1.graphql
deleted file mode 100644
index 8b040d6..0000000
--- a/examples/aws/find_kms_keys_in_us-east-1.graphql
+++ /dev/null
@@ -1,12 +0,0 @@
-query {
- queryawsKms(filter: {arn: { regexp: "/.*us-east-1.*/" } }) {
- id
- arn
- description
- keyRotationEnabled
- tags {
- key
- value
- }
- }
-}
diff --git a/examples/aws/find_production_resources.graphql b/examples/aws/find_production_resources.graphql
deleted file mode 100644
index 426190d..0000000
--- a/examples/aws/find_production_resources.graphql
+++ /dev/null
@@ -1,58 +0,0 @@
-query {
- queryawsTag(filter: { value: { eq: "Production" } }) {
- key
- value
- ec2Instance {
- id
- arn
- }
- lambda {
- id
- arn
- }
- vpc {
- id
- arn
- }
- }
-}
-
-query {
- queryawsTag(
- filter: { key: { eq: "Environment" }, value: { eq: "Production" } }
- ) {
- key
- value
- ec2Instance {
- id
- arn
- }
- lambda {
- id
- arn
- }
- vpc {
- id
- arn
- }
- }
-}
-
-query {
- getawsTag(id: "Environment:Production") {
- key
- value
- ec2Instance {
- id
- arn
- }
- lambda {
- id
- arn
- }
- vpc {
- id
- arn
- }
- }
-}
\ No newline at end of file
diff --git a/examples/aws/find_public_albs.graphql b/examples/aws/find_public_albs.graphql
deleted file mode 100644
index 99d1e4f..0000000
--- a/examples/aws/find_public_albs.graphql
+++ /dev/null
@@ -1,12 +0,0 @@
-query {
- queryawsAlb (filter: { scheme: { eq: "internet-facing" } } ) {
- id
- arn
- dnsName
- createdAt
- tags {
- key
- value
- }
- }
-}
diff --git a/examples/aws/find_public_s3_buckets.graphql b/examples/aws/find_public_s3_buckets.graphql
deleted file mode 100644
index d1042d0..0000000
--- a/examples/aws/find_public_s3_buckets.graphql
+++ /dev/null
@@ -1,15 +0,0 @@
-query {
- queryawsS3(filter: { access: { eq: "Public" } }) {
- id
- arn
- access
- }
-}
-
-query {
- queryawsS3(filter: { not: { access: { eq: "Private" } } }) {
- id
- arn
- access
- }
-}
diff --git a/examples/aws/find_unencrypted_ebs_volumes.graphql b/examples/aws/find_unencrypted_ebs_volumes.graphql
deleted file mode 100644
index cd7ea50..0000000
--- a/examples/aws/find_unencrypted_ebs_volumes.graphql
+++ /dev/null
@@ -1,8 +0,0 @@
-query {
- queryawsEbs(filter: { encrypted: false }) {
- id,
- arn,
- availabilityZone,
- encrypted
- }
-}
diff --git a/examples/aws/get_aws_ec2_instance.graphql b/examples/aws/get_aws_ec2_instance.graphql
deleted file mode 100644
index 3289b94..0000000
--- a/examples/aws/get_aws_ec2_instance.graphql
+++ /dev/null
@@ -1,8 +0,0 @@
-query {
- getawsEc2(
- arn: "arn:aws:ec2:us-east-1:123445678997:instance/i-12345567889012234"
- ) {
- id
- arn
- }
-}
\ No newline at end of file
diff --git a/examples/aws/get_aws_ec2_instances.graphql b/examples/aws/get_aws_ec2_instances.graphql
deleted file mode 100644
index 03eff9c..0000000
--- a/examples/aws/get_aws_ec2_instances.graphql
+++ /dev/null
@@ -1,6 +0,0 @@
-query {
- queryawsEc2 {
- id
- arn
- }
-}
\ No newline at end of file
diff --git a/examples/aws/get_aws_ec2_instances_in_us_east_1.graphql b/examples/aws/get_aws_ec2_instances_in_us_east_1.graphql
deleted file mode 100644
index 53a73ec..0000000
--- a/examples/aws/get_aws_ec2_instances_in_us_east_1.graphql
+++ /dev/null
@@ -1,20 +0,0 @@
-query {
- queryawsEc2(filter: { arn: { regexp: "/.*us-east-1.*/" } }) {
- id
- arn
- }
-}
-
-query {
- queryawsEc2(filter: { region: { eq: "us-east-1" } }) {
- id
- arn
- }
-}
-
-query {
- queryawsEc2(filter: { region: { in: "us-east-1" } }) {
- id
- arn
- }
-}
\ No newline at end of file
diff --git a/examples/aws/get_aws_ec2_m5_instances_in_us_east_1.graphql b/examples/aws/get_aws_ec2_m5_instances_in_us_east_1.graphql
deleted file mode 100644
index 18a695a..0000000
--- a/examples/aws/get_aws_ec2_m5_instances_in_us_east_1.graphql
+++ /dev/null
@@ -1,66 +0,0 @@
-query {
- queryawsEc2(
- filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
- ) {
- id
- arn
- }
-}
-
-query {
- queryawsEc2(
- filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
- order: { asc: availabilityZone }
- first: 2
- offset: 1
- ) {
- id
- arn
- }
-}
-
-query {
- queryawsEc2(
- filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
- order: { asc: availabilityZone }
- first: 2
- offset: 1
- ) {
- id
- arn
- ebs(filter: { isBootDisk: true }, first: 1) {
- id
- arn
- isBootDisk
- }
- }
-}
-
-query {
- queryawsEc2(
- filter: { region: { eq: "us-east-1" }, instanceType: { regexp: "/^m5a*/" } }
- order: { asc: availabilityZone }
- first: 2
- offset: 1
- ) {
- id
- arn
- ebs(filter: { isBootDisk: true }, first: 1) {
- id
- arn
- isBootDisk
- }
- securityGroups {
- id
- arn
- }
- alb {
- id
- arn
- ec2Instance {
- id
- arn
- }
- }
- }
-}
\ No newline at end of file
diff --git a/examples/aws/get_fin_ops_data.graphql b/examples/aws/get_fin_ops_data.graphql
deleted file mode 100644
index 1989b94..0000000
--- a/examples/aws/get_fin_ops_data.graphql
+++ /dev/null
@@ -1,60 +0,0 @@
-query {
- queryawsBilling {
- totalCostLast30Days {
- cost
- currency
- formattedCost
- }
- totalCostMonthToDate {
- cost
- currency
- formattedCost
- }
- monthToDate {
- name
- cost
- currency
- formattedCost
- }
- last30Days {
- name
- cost
- currency
- formattedCost
- }
- monthToDateDailyAverage {
- name
- cost
- currency
- formattedCost
- }
- last30DaysDailyAverage {
- name
- cost
- currency
- formattedCost
- }
- }
-}
-
-query {
- queryawsEc2 {
- arn
- dailyCost {
- cost
- currency
- formattedCost
- }
- }
-}
-
-query {
- queryawsNatGateway {
- arn
- dailyCost {
- cost
- currency
- formattedCost
- }
- }
-}
\ No newline at end of file
diff --git a/examples/aws/multiple_queries_example.graphql b/examples/aws/multiple_queries_example.graphql
deleted file mode 100644
index 97f77ce..0000000
--- a/examples/aws/multiple_queries_example.graphql
+++ /dev/null
@@ -1,33 +0,0 @@
-query {
- queryawsVpc {
- id
- arn
- alb {
- id
- arn
- ec2Instance {
- id
- arn
- ebs(filter: { isBootDisk: true }) {
- id
- arn
- }
- }
- }
- lambda {
- id
- arn
- kms {
- id
- arn
- }
- }
- }
- queryawsS3(filter: { region: { eq: "us-east-1" } }) {
- id
- arn
- }
- getawsSqs(arn: "arn:aws:sqs:us-east-1:8499274828484:autocloud.fifo") {
- approximateNumberOfMessages
- }
-}
diff --git a/examples/examples.txt b/examples/examples.txt
new file mode 100644
index 0000000..1034412
--- /dev/null
+++ b/examples/examples.txt
@@ -0,0 +1 @@
+Visit https://docs.cloudgraph.dev/ for examples and documentation
\ No newline at end of file
diff --git a/package.json b/package.json
index a581cad..7345a33 100644
--- a/package.json
+++ b/package.json
@@ -1,12 +1,11 @@
{
"name": "@cloudgraph/cli",
"description": "Scan your cloud infrastructure data and query it with GraphQL",
- "version": "0.13.9",
+ "version": "0.25.1",
"author": "AutoCloud",
"license": "MPL-2.0",
"publishConfig": {
"registry": "https://registry.npmjs.org/",
- "tag": "latest",
"access": "public"
},
"main": "lib/index.js",
@@ -16,13 +15,12 @@
},
"bugs": "https://github.com/cloudgraphdev/cli/issues",
"dependencies": {
- "@cloudgraph/sdk": "0.4.0",
+ "@cloudgraph/sdk": "^0.22.0",
"@graphql-tools/load-files": "^6.3.2",
"@graphql-tools/merge": "^8.2.0",
- "@oclif/command": "^1",
- "@oclif/config": "^1",
- "@oclif/plugin-help": "^3",
- "@tiagonapoli/oclif-plugin-spaced-commands": "^1.0.1",
+ "@oclif/core": "1.6.1",
+ "@oclif/plugin-help": "^5.1.12",
+ "@types/lodash": "^4.14.175",
"altair-express-middleware": "^4.0.8",
"axios": "^0.21.1",
"boxen": "^5.0.1",
@@ -35,32 +33,40 @@
"glob": "^7.1.7",
"graphql": "^15.6.1",
"graphql-playground-middleware-express": "^1.7.22",
+ "graphql-tools": "^8.2.0",
"inquirer": "^8.1.1",
- "live-plugin-manager": "0.15.1",
+ "jsonpath": "^1.1.1",
+ "lodash": "^4.17.21",
+ "npm": "^8.1.2",
+ "oclif": "2.6.0",
"open": "^8.2.1",
- "tslib": "^1",
- "npm": "^8.1.2"
+ "semver": "^7.3.5",
+ "tslib": "^1"
},
"devDependencies": {
"@autocloud/eslint-config": "^0.1.0",
- "@oclif/dev-cli": "^1",
- "@oclif/test": "^1.2.8",
- "@semantic-release/changelog": "^5.0.1",
- "@semantic-release/git": "^9.0.0",
- "@semantic-release/gitlab": "^6.2.2",
- "@semantic-release/npm": "^7.1.3",
+ "@oclif/test": "^2.1.0",
+ "@semantic-release/changelog": "^6.0.1",
+ "@semantic-release/git": "^10.0.1",
+ "@semantic-release/github": "^8.0.1",
+ "@semantic-release/npm": "^9.0.1",
"@types/chai": "^4",
"@types/cli-table": "^0.3.0",
"@types/detect-port": "^1.3.1",
"@types/express": "^4.17.13",
"@types/inquirer": "^7.3.2",
"@types/jest": "^27.0.1",
+ "@types/jsonpath": "^0.2.0",
"@types/node": "^14",
"@types/npm": "^7.19.0",
"@types/pino": "^6.3.8",
+ "@types/semver": "^7.3.9",
"@typescript-eslint/eslint-plugin": "^4.28.5",
"@typescript-eslint/parser": "^4.28.5",
+ "aws-sdk": "^2.1060.0",
"chai": "^4.3.4",
+ "cpx": "^1.5.0",
+ "cross-env": "^7.0.3",
"eslint-config-airbnb-base": "14.2.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.22.1",
@@ -70,13 +76,15 @@
"jest": "^27.1.0",
"jest-diff": "^27.1.0",
"lint-staged": "^11.1.1",
- "semantic-release": "^17.4.4",
+ "mkdirp": "^1.0.4",
+ "rimraf": "^3.0.2",
+ "semantic-release": "^19.0.2",
"ts-jest": "^27.0.5",
"ts-node": "^10.2.1",
"typescript": "4.3.5"
},
"engines": {
- "node": ">=14.0.0"
+ "node": ">=16.0.0"
},
"files": [
"/bin",
@@ -93,35 +101,48 @@
"bin": "cg",
"dirname": "cloudgraph",
"plugins": [
- "@oclif/plugin-help",
- "@tiagonapoli/oclif-plugin-spaced-commands"
- ]
+ "@oclif/plugin-help"
+ ],
+ "topicSeparator": " ",
+ "additionalHelpFlags": [
+ "-h"
+ ],
+ "additionalVersionFlags": [
+ "-v"
+ ],
+ "update": {
+ "s3": {
+ "bucket": "cloudgraph-production-cli-assets"
+ },
+ "node": {
+ "version": "16.0.0"
+ }
+ }
},
"repository": "github:cloudgraphdev/cli",
"scripts": {
- "build": "yarn prepack",
+ "build": "yarn prepack && oclif pack tarballs -t linux-x64,linux-arm,darwin-x64,darwin-arm64 && yarn postpack",
"launch": "./bin/run launch",
"postpack": "rm -f oclif.manifest.json",
"posttest": "eslint . --ext .ts --config .eslintrc.json",
- "prepack": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme",
- "run:init": "NODE_ENV=development ./bin/run init",
- "run:init:aws": "NODE_ENV=development ./bin/run init aws",
- "run:load": "NODE_ENV=development ./bin/run load",
- "run:load:aws": "NODE_ENV=development ./bin/run load aws",
- "run:scan": "NODE_ENV=development ./bin/run scan",
- "run:scan:aws": "NODE_ENV=development ./bin/run scan aws",
- "run:launch": "NODE_ENV=development ./bin/run launch",
- "run:teardown": "NODE_ENV=development ./bin/run teardown",
- "run:provider:install": "NODE_ENV=test ./bin/run provider install",
- "run:provider:add": "NODE_ENV=test ./bin/run provider add",
- "run:provider:remove": "NODE_ENV=test ./bin/run provider remove",
- "run:provider:list": "NODE_ENV=test ./bin/run provider list",
- "run:provider:update": "NODE_ENV=test ./bin/run provider update",
- "test": "CG_DEBUG=-1 NODE_ENV=test jest --coverage=true --detectOpenHandles --runInBand --forceExit",
- "test:debug": "CG_DEBUG=5 NODE_ENV=test jest --coverage=false --detectOpenHandles --runInBand --forceExit",
- "version": "oclif-dev readme && git add README.md",
+ "prepack": "rm -rf lib && npx tsc -b --force && oclif manifest && oclif readme && yarn cpx 'src/scripts/*' lib/scripts",
+ "run:init": "cross-env NODE_ENV=development ./bin/dev init",
+ "run:init:aws": "cross-env NODE_ENV=development ./bin/dev init aws",
+ "run:load": "cross-env NODE_ENV=development ./bin/dev load",
+ "run:load:aws": "cross-env NODE_ENV=development ./bin/dev load aws",
+ "run:scan": "cross-env NODE_ENV=development ./bin/dev scan",
+ "run:scan:aws": "cross-env NODE_ENV=development ./bin/dev scan aws",
+ "run:launch": "cross-env NODE_ENV=development ./bin/dev launch",
+ "run:teardown": "cross-env NODE_ENV=development ./bin/dev teardown",
+ "run:update": "cross-env NODE_ENV=test ./bin/dev update",
+ "run:provider": "cross-env NODE_ENV=test ./bin/dev provider",
+ "run:policy": "cross-env NODE_ENV=test ./bin/dev policy",
+ "test": "cross-env CG_DEBUG=-1 NODE_ENV=test jest --coverage=true --detectOpenHandles --runInBand --forceExit",
+ "test:debug": "cross-env CG_DEBUG=5 NODE_ENV=test jest --coverage=false --detectOpenHandles --runInBand --forceExit",
+ "version": "oclif readme && git add README.md",
"lint": "eslint --config .eslintrc.json --ext .js,.ts ./",
- "lint:fix": "eslint --fix --config .eslintrc.json --ext .js,.ts ./"
+ "lint:fix": "eslint --fix --config .eslintrc.json --ext .js,.ts ./",
+ "homebrew": "node release/scripts/homebrew.js"
},
"husky": {
"hooks": {
diff --git a/release/scripts/homebrew.js b/release/scripts/homebrew.js
new file mode 100644
index 0000000..420e4e1
--- /dev/null
+++ b/release/scripts/homebrew.js
@@ -0,0 +1,229 @@
+#!/usr/bin/env node
+
+const fs = require('fs')
+const execa = require('execa')
+const https = require('https')
+const path = require('path')
+const rm = require('rimraf')
+const mkdirp = require('mkdirp')
+const { promisify } = require('util')
+const { pipeline } = require('stream')
+const crypto = require('crypto')
+const AWS = require('aws-sdk')
+
+const NODE_JS_BASE = 'https://nodejs.org/download/release'
+const CLI_DIR = path.join(__dirname, '..', '..')
+const DIST_DIR = path.join(CLI_DIR, 'dist')
+const PJSON = require(path.join(CLI_DIR, 'package.json'))
+const NODE_VERSION = PJSON.oclif.update.node.version
+const SHORT_VERSION = PJSON.version
+async function getText(url) {
+ return new Promise((resolve, reject) => {
+ https
+ .get(url, res => {
+ let buffer = []
+
+ res.on('data', buf => {
+ buffer.push(buf)
+ })
+
+ res.on('close', () => {
+ resolve(Buffer.concat(buffer).toString('utf-8'))
+ })
+ })
+ .on('error', reject)
+ })
+}
+
+async function getDownloadInfoForNodeVersion(version) {
+ // https://nodejs.org/download/release/v12.21.0/SHASUMS256.txt
+ const url = `${NODE_JS_BASE}/v${version}/SHASUMS256.txt`
+ const shasums = await getText(url)
+ const shasumLine = shasums.split('\n').find(line => {
+ return line.includes(`node-v${version}-darwin-x64.tar.xz`)
+ })
+
+ if (!shasumLine) {
+ throw new Error(`could not find matching shasum for ${version}`)
+ }
+
+ const [shasum, filename] = shasumLine.trim().split(/\s+/)
+ return {
+ url: `${NODE_JS_BASE}/v${version}/${filename}`,
+ sha256: shasum,
+ }
+}
+
+async function calculateSHA256(fileName) {
+ const hash = crypto.createHash('sha256')
+ hash.setEncoding('hex')
+ await promisify(pipeline)(fs.createReadStream(fileName), hash)
+ return hash.read()
+}
+
+async function uploadToS3(file) {
+ console.log(`Uploading ${file} to S3`)
+ await new Promise((resolve, reject) => {
+ const pathToFile = path.join(DIST_DIR, file)
+ const fileStream = fs.createReadStream(pathToFile)
+ fileStream.on('error', err => {
+ if (err) {
+ reject(err)
+ }
+ })
+ fileStream.on('open', () => {
+ const credentials = new AWS.SharedIniFileCredentials({
+ profile: 'cloudgraph-iac',
+ callback: err => {
+ if (err) {
+ console.log('No credentials found for profile cloudgraph-iac')
+ console.log(err)
+ }
+ },
+ })
+ sts = new AWS.STS()
+ const { roleArn } = credentials
+ const options = {
+ RoleSessionName: 'CloudGraph-IAC',
+ RoleArn: roleArn,
+ }
+ console.log(options)
+ sts.assumeRole(options, (err, data) => {
+ if (err) {
+ console.log(`No valid credentials found for roleARN: ${roleArn}`)
+ console.log(err)
+ reject(err)
+ } else {
+ // successful response
+ console.log('successfully got access keys from role')
+ const {
+ AccessKeyId: accessKeyId,
+ SecretAccessKey: secretAccessKey,
+ SessionToken: sessionToken,
+ } = data.Credentials
+ const creds = {
+ accessKeyId,
+ secretAccessKey,
+ sessionToken,
+ }
+ const S3 = new AWS.S3({ credentials: creds })
+ S3.putObject(
+ {
+ Bucket: PJSON.oclif.update.s3.bucket,
+ Key: `cg-v${SHORT_VERSION}/${file}`,
+ Body: fileStream,
+ ServerSideEncryption: 'AES256',
+ ACL: 'bucket-owner-full-control',
+ },
+ err => {
+ if (err) {
+ reject(err)
+ }
+ }
+ )
+ resolve()
+ }
+ })
+ })
+ })
+}
+
+function getFilesByOS(os) {
+ const files = fs.readdirSync(DIST_DIR)
+ return files.filter(file => file.includes(os) && !file.includes('.xz'))
+}
+
+const ROOT = path.join(__dirname, '..')
+const TEMPLATES = path.join(ROOT, 'templates')
+
+const CLI_ASSETS_URL =
+ process.env.CLI_ASSETS_URL || 'https://cli-assets.cloudgraph.dev'
+
+async function updateCgFormula(brewDir) {
+ const templatePath = path.join(TEMPLATES, 'cg.rb')
+ const template = fs.readFileSync(templatePath).toString('utf-8')
+ const files = getFilesByOS('darwin-x64')
+ const zipFile = files.find(file => file.includes('tar.gz'))
+ const pathToFile = path.join(DIST_DIR, zipFile)
+ const sha256 = await calculateSHA256(pathToFile)
+ const url = `${CLI_ASSETS_URL}/cg-v${SHORT_VERSION}/${zipFile}`
+
+ const templateReplaced = template
+ .replace('__VERSION__', SHORT_VERSION)
+ .replace('__CLI_DOWNLOAD_URL__', url)
+ .replace('__TARBALL_HASH__', sha256)
+ .replace('__NODE_VERSION__', NODE_VERSION)
+
+ fs.writeFileSync(path.join(brewDir, 'cg.rb'), templateReplaced)
+ if (process.env.WRITE_TO_S3 === undefined) {
+ files.forEach(async file => {
+ await uploadToS3(file)
+ })
+ }
+}
+
+async function updateCgNodeFormula(brewDir) {
+ const formulaPath = path.join(brewDir, 'cg-node.rb')
+
+ console.log(`updating CloudGraph-node Formula in ${formulaPath}`)
+ console.log(`getting SHA and URL for Node.js version ${NODE_VERSION}`)
+
+ const { url, sha256 } = await getDownloadInfoForNodeVersion(NODE_VERSION)
+
+ console.log(`done getting SHA for Node.js version ${NODE_VERSION}: ${sha256}`)
+ console.log(`done getting URL for Node.js version ${NODE_VERSION}: ${url}`)
+
+ const templatePath = path.join(TEMPLATES, 'cg-node.rb')
+ const template = fs.readFileSync(templatePath).toString('utf-8')
+
+ const templateReplaced = template
+ .replace('__NODE_BIN_URL__', url)
+ .replace('__NODE_SHA256__', sha256)
+ .replace('__NODE_VERSION__', NODE_VERSION)
+
+ fs.writeFileSync(formulaPath, templateReplaced)
+ console.log(`done updating cg-node Formula in ${formulaPath}`)
+}
+
+async function updateHomebrew() {
+ const tmp = path.join(__dirname, 'tmp')
+ const homebrewDir = path.join(tmp, 'homebrew-tap')
+ mkdirp.sync(tmp)
+ rm.sync(homebrewDir)
+
+ console.log(
+ `cloning https://github.com/cloudgraphdev/homebrew-tap to ${homebrewDir}`
+ )
+ await execa('git', [
+ 'clone',
+ 'git@github.com:cloudgraphdev/homebrew-tap.git',
+ homebrewDir,
+ ])
+ console.log(`done cloning cloudgraphdev/homebrew-tap to ${homebrewDir}`)
+
+ console.log('updating local git...')
+ await updateCgNodeFormula(homebrewDir)
+ await updateCgFormula(homebrewDir).catch((err) => { throw new Error(err) })
+
+ // run in git in cloned cloudgraph/homebrew-tap git directory
+ const git = async (args, opts = {}) => {
+ await execa('git', ['-C', homebrewDir, ...args], opts)
+ }
+ try {
+ await git(['add', '.'])
+ await git(['config', '--local', 'core.pager', 'cat'])
+ await git(['diff', '--cached'], { stdio: 'inherit' })
+ await git(['commit', '-m', `CloudGraph v${SHORT_VERSION}`])
+ if (process.env.SKIP_GIT_PUSH === undefined) {
+ await git(['push', 'origin', 'main'])
+ }
+ } catch (e) {
+ console.log('Error attempting to update git repo')
+ console.log(e)
+ }
+}
+
+updateHomebrew().catch(err => {
+ console.error(`error running scripts/release/homebrew.js`, err)
+ process.exit(1)
+})
diff --git a/release/templates/cg-node.rb b/release/templates/cg-node.rb
new file mode 100644
index 0000000..7cca298
--- /dev/null
+++ b/release/templates/cg-node.rb
@@ -0,0 +1,17 @@
+class CgNode < Formula
+ desc "node.js dependency for CloudGraph"
+ homepage "https://cloudgraph.dev"
+ url "__NODE_BIN_URL__"
+ version "__NODE_VERSION__"
+ sha256 "__NODE_SHA256__"
+ keg_only "cg-node is only used by CloudGraph CLI (cloudgraphdev/tap/cli), which explicitly requires from Cellar"
+
+ def install
+ bin.install buildpath/"bin/node"
+ end
+
+ def test
+ output = system bin/"node", "version"
+ assert output.strip == "v#{version}"
+ end
+end
\ No newline at end of file
diff --git a/release/templates/cg.rb b/release/templates/cg.rb
new file mode 100644
index 0000000..e596894
--- /dev/null
+++ b/release/templates/cg.rb
@@ -0,0 +1,40 @@
+# This file is automatically generated by https://github.com/heroku/cli/blob/master/scripts/release/homebrew.js
+# Do not update this file directly;
+# Please update the template instead:
+# https://github.com/heroku/cli/blob/master/scripts/release/homebrew/templates/heroku.rb
+class Cg < Formula
+ desc "Query your cloud and SaaS data with GraphQL"
+ homepage "https://cloudgraph.dev"
+ version "__VERSION__"
+ url "__CLI_DOWNLOAD_URL__"
+ sha256 "__TARBALL_HASH__"
+
+ def install
+ inreplace "bin/cg", /^CLIENT_HOME=/, "export CG_OCLIF_CLIENT_HOME=#{lib/"client"}\nCLIENT_HOME="
+ libexec.install Dir["**"]
+ bin.install_symlink libexec/"bin/cg"
+
+ # bash_completion.install libexec/"node_modules/@heroku-cli/plugin-autocomplete/autocomplete/brew/bash" => "heroku"
+ # zsh_completion.install libexec/"node_modules/@heroku-cli/plugin-autocomplete/autocomplete/brew/zsh/_heroku"
+ end
+
+ # def caveats; <<~EOS
+ # To use the Heroku CLI's autocomplete --
+ # Via homebrew's shell completion:
+ # 1) Follow homebrew's install instructions https://docs.brew.sh/Shell-Completion
+ # NOTE: For zsh, as the instructions mention, be sure compinit is autoloaded
+ # and called, either explicitly or via a framework like oh-my-zsh.
+ # 2) Then run
+ # $ heroku autocomplete --refresh-cache
+ # OR
+ # Use our standalone setup:
+ # 1) Run and follow the install steps:
+ # $ heroku autocomplete
+ # EOS
+ # end
+ # end 3
+
+ test do
+ system bin/"cg", "version"
+ end
+end
diff --git a/src/commands/base.ts b/src/commands/base.ts
index 463fc26..7157554 100644
--- a/src/commands/base.ts
+++ b/src/commands/base.ts
@@ -1,6 +1,11 @@
-import Command from '@oclif/command'
-import { Input } from '@oclif/parser'
-import CloudGraph, { Logger } from '@cloudgraph/sdk'
+import { Command, Interfaces } from '@oclif/core'
+import CloudGraph, {
+ Logger,
+ StorageEngine,
+ StorageEngineConnectionConfig,
+ PluginType,
+ SchemaMap,
+} from '@cloudgraph/sdk'
import { cosmiconfigSync } from 'cosmiconfig'
import chalk from 'chalk'
import fs from 'fs'
@@ -10,7 +15,6 @@ import gt from 'semver/functions/gt'
import Manager from '../manager'
import EngineMap from '../storage'
import QueryEngine from '../server'
-import { StorageEngine, StorageEngineConnectionConfig } from '../storage/types'
import {
getDefaultEndpoint,
getDefaultStorageEngineConnectionConfig,
@@ -22,8 +26,7 @@ import {
} from '../utils'
import flagsDefinition from '../utils/flags'
import openBrowser from '../utils/open'
-import { PluginType } from '../utils/constants'
-import { CloudGraphConfig, SchemaMap } from '../types'
+import { CloudGraphConfig } from '../types'
export default abstract class BaseCommand extends Command {
constructor(argv: any, config: any) {
@@ -65,8 +68,8 @@ export default abstract class BaseCommand extends Command {
// Initialize the logger and storage engine
const {
flags: { storage = 'dgraph', directory },
- } = this.parse(
- this.constructor as Input<{
+ } = await this.parse(
+ this.constructor as Interfaces.Input<{
dev: boolean
storage: string
directory: string
@@ -75,20 +78,23 @@ export default abstract class BaseCommand extends Command {
this.storageEngine = new EngineMap[storage]({
type: storage,
- ...this.getConnectionSettings(),
+ ...(await this.getConnectionSettings()),
logger: this.logger,
})
const config = this.getCGConfig('cloudGraph')
if (!config) {
printWelcomeMessage()
}
- const manager = this.getPluginManager(PluginType.Provider)
+ const manager = await this.getPluginManager(PluginType.Provider)
const cliLatestVersion = await manager.queryRemoteVersion('@cloudgraph/cli')
if (gt(cliLatestVersion, this.config.version)) {
printBoxMessage(`Update for ${chalk.italic.green(
'@cloudgraph/cli'
)} is available: ${this.config.version} -> ${cliLatestVersion}. \n
-Run ${chalk.italic.green('npm i -g @cloudgraph/cli')} to install`)
+you can update based on how you installed CG \n
+NPM: ${chalk.italic.green('npm i -g @cloudgraph/cli')} \n
+homebrew: 1. ${chalk.italic.green('brew update')} \n
+ 2. ${chalk.italic.green('brew upgrade cloudgraphdev/tap/cg')}`)
}
const configDir = this.getCGConfigKey('directory') ?? 'cg'
this.versionDirectory = directory ?? configDir
@@ -103,26 +109,30 @@ Run ${chalk.italic.green('npm i -g @cloudgraph/cli')} to install`)
return undefined
}
- getStorageEngine(): StorageEngine {
+ async getStorageEngine(): Promise {
if (this.storageEngine) {
return this.storageEngine
}
const {
flags: { storage = 'dgraph' },
- } = this.parse(this.constructor as Input<{ dev: boolean; storage: string }>)
+ } = await this.parse(
+ this.constructor as Interfaces.Input<{ dev: boolean; storage: string }>
+ )
const engine = new EngineMap[storage]({
type: storage,
- ...this.getConnectionSettings(),
+ ...(await this.getConnectionSettings()),
logger: this.logger,
})
this.storageEngine = engine
return engine
}
- getQueryEngine(): string {
+ async getQueryEngine(): Promise