Skip to content

Commit 76ff05a

Browse files
feat(routeTable): add routeTable service
2 parents f32ffec + 1cd7716 commit 76ff05a

38 files changed

Lines changed: 1133 additions & 4 deletions
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve CloudGraph
4+
title: ''
5+
labels: bug
6+
assignees: tyler-dunkel
7+
8+
---
9+
10+
Thank you for filling out a bug report, we really appreciate any help in improving the CloudGraph CLI and providers!
11+
12+
**Describe the bug**
13+
A clear and concise description of what the bug is.
14+
15+
**To Reproduce**
16+
Steps to reproduce the behavior:
17+
1. Run command '...' NOTE: please run the command in DEBUG mode for additional debugging info [e.g. `CG_DEBUG=5 cg scan aws`]
18+
2. Run GraphQL query '....'
19+
4. See error
20+
21+
Please include the `cg-debug.log` file if applicable
22+
23+
**Expected behavior**
24+
A clear and concise description of what you expected to happen.
25+
26+
**Environment (please complete the following information):**
27+
- CLI version [e.g. `0.11.7`]
28+
- Provider versions [e.g. `aws@0.30.0`, `azure@0.15.1`]
29+
- Context [e.g. Local machine, EC2 Instance, Other]
30+
31+
**Screenshots**
32+
If applicable, add screenshots to help explain your problem.
33+
34+
**Additional context**
35+
Add any other context about the problem here.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature request
3+
about: Suggest a feature you would like to see CloudGraph implement
4+
title: ''
5+
labels: enhancement
6+
assignees: tyler-dunkel
7+
8+
---
9+
10+
Thank you for taking the time to suggest a way the CloudGraph tool could imrpove!
11+
12+
If this is for a larger feature request, please use our [Slack channel](https://cloudgraph-workspace.slack.com) so we can discuss and avoid duplicate work (we may already be working on it!)
13+
.
14+
**Is your feature request related to a problem? Please describe.**
15+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
16+
17+
**Describe the solution you'd like**
18+
A clear and concise description of what you want to happen.
19+
20+
**Describe alternatives you've considered**
21+
A clear and concise description of any alternative solutions or features you've considered.
22+
23+
**How would this be useful to you**
24+
Tell us what this feature would help you achieve in your workflow
25+
26+
**Additional context**
27+
Add any other context or screenshots about the feature request here.

.github/SECURITY.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Security Policy
2+
3+
1. [Reporting security problems to CloudGraph](#reporting)
4+
2. [Security Point of Contact](#contact)
5+
3. [Incident Response Process](#process)
6+
7+
<a name="reporting"></a>
8+
## Reporting security problems to CloudGraph
9+
10+
**DO NOT CREATE AN ISSUE** to report a security problem. Instead, please
11+
send an email to security@autocloud.dev
12+
13+
<a name="contact"></a>
14+
## Security Point of Contact
15+
16+
The security point of contact is Tyler Dunkel. Tyler responds to security
17+
incident reports as fast as possible, within one business day at the latest.
18+
19+
In case Tyler does not respond within a reasonable time, the secondary point
20+
of contact is [Tyson Kunovsky](https://github.com/orgs/cloudgraphdev/people/kunovsky).
21+
22+
If neither Tyler nor Tyson responds then please contact support@github.com
23+
who can disable any access for the CloudGraph CLI tool until the security incident is resolved.
24+
25+
<a name="process"></a>
26+
## Incident Response Process
27+
28+
In case an incident is discovered or reported, CloudGraph will follow the following
29+
process to contain, respond and remediate:
30+
31+
### 1. Containment
32+
33+
The first step is to find out the root cause, nature and scope of the incident.
34+
35+
- Is still ongoing? If yes, first priority is to stop it.
36+
- Is the incident outside of my influence? If yes, first priority is to contain it.
37+
- Find out knows about the incident and who is affected.
38+
- Find out what data was potentially exposed.
39+
40+
One way to immediately remove all access for CloudGraph is to uninstall CloudGraph globally and/or locally using
41+
`npm uninstall -g @cloudgraph/cli` && `npm uninstall @cloudgraph/cli`
42+
43+
### 2. Response
44+
45+
After the initial assessment and containment to out best abilities, CloudGraph will
46+
document all actions taken in a response plan.
47+
48+
CloudGraph will create an RCA (Root Cause Analysis) document in the [CloudGraph documentation site](https://docs.cloudgraph.dev/overview) that describes what happened and what was done to resolve it.
49+
50+
### 3. Remediation
51+
52+
Once the incident is confirmed to be resolved, CloudGraph will summarize the lessons
53+
learned from the incident and create a list of actions CloudGraph will take to prevent
54+
it from happening again.
55+
56+
### Keep permissions to a minimum
57+
58+
The CloudGraph CLI tool uses the least amount of access to limit the impact of possible
59+
security incidents, see [README - How It Works](https://github.com/cloudgraphdev/cli#how-it-works).
60+
61+
### Secure accounts with access
62+
63+
The [CloudGraph GitHub Organization](https://github.com/cloudgraphdev) requires 2FA authorization
64+
for all members.
65+
66+
### Critical Updates And Security Notices
67+
68+
We learn about critical software updates and security threats from these sources
69+
70+
1. GitHub Security Alerts
71+
2. [Snyk open source vulnerability dectection](https://snyk.io/product/open-source-security-management/)
72+
3. GitHub: https://githubstatus.com/ & [@githubstatus](https://twitter.com/githubstatus)

.github/pull_request_template.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Issue tracker links
2+
3+
_Add links to any relevant tasks/stories/bugs/pagerduty/etc_
4+
5+
*Example - dummy TODO project*
6+
7+
[TODO-123](https://autoclouddev.atlassian.net/browse/TODO-123)
8+
9+
## Changes/solution
10+
11+
_How does this change address the problem?_
12+
13+
## Testing
14+
15+
_Describe how the testing was done, plus evidence, if not covered by automated tests_
16+
17+
## Notes and considerations
18+
19+
_Add any additional notes and/or considerations_
20+
21+
## Dependencies
22+
23+
_Add dependencies on any other PRs, if applicable

.github/workflows/notify.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: notify
3+
4+
on:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
notify:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: 16
16+
- run: |
17+
GIT_COMMIT_TILE=$(git log -1 --pretty=format:"%s")
18+
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
19+
env:
20+
REPO_NAME: ${{ github.event.repository.name }}
21+
GIT_AUTHOR_NAME: "AutoCloud Deploy Bot"
22+
SLACK_WEBHOOK: ${{secrets.slack_api_endpoint}}
23+
ORGANIZATION_NAME: ${{secrets.organization_name}}

.github/workflows/pr-validator.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: pr-validator
3+
4+
on:
5+
pull_request:
6+
types: [synchronize, opened, reopened, edited]
7+
branches:
8+
- main
9+
- beta
10+
11+
jobs:
12+
pr-validation:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- run: |
17+
if [ "$TARGET_BRANCH" == "main" ] && [ "$SOURCE_BRANCH" == "beta" ]; then
18+
echo "Merge from $SOURCE_BRANCH to $TARGET_BRANCH is valid"
19+
exit 0
20+
elif [ "$TARGET_BRANCH" == "beta" ] && [ "$SOURCE_BRANCH" == "alpha" ]; then
21+
echo "Merge from $SOURCE_BRANCH to $TARGET_BRANCH is valid"
22+
exit 0
23+
else
24+
echo "You cannot merge from $SOURCE_BRANCH to $TARGET_BRANCH"
25+
exit 1
26+
fi
27+
env:
28+
SOURCE_BRANCH: ${{ github.head_ref }}
29+
TARGET_BRANCH: ${{ github.base_ref }}

.github/workflows/publish.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: publish
3+
4+
on:
5+
push:
6+
branches:
7+
- alpha
8+
- beta
9+
- main
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
persist-credentials: false
19+
token: ${{secrets.gh_token}}
20+
- uses: actions/setup-node@v3
21+
with:
22+
node-version: 16
23+
registry-url: "https://registry.npmjs.org"
24+
25+
- name: Get cache directory
26+
id: yarn-cache-dir
27+
run: |
28+
echo "::set-output name=dir::$(yarn cache dir)"
29+
30+
- name: Restoring cache
31+
uses: actions/cache@v3
32+
id: yarn-cache # use this to check for `cache-hit` ==> if: steps.yarn-cache.outputs.cache-hit != 'true'
33+
with:
34+
path: ${{ steps.yarn-cache-dir.outputs.dir }}
35+
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
36+
restore-keys: |
37+
${{ runner.os }}-yarn-
38+
39+
- name: Install Packages
40+
# NOTE: The --ignore-scripts flag is required to prevent leakage of NPM_TOKEN value
41+
# See https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#use-private-packages
42+
run: yarn install --frozen-lockfile --prefer-offline --ignore-scripts
43+
44+
- name: Build
45+
run: yarn prepack
46+
47+
# - name: Test
48+
# run: yarn lint
49+
50+
- name: Publish
51+
run: npx semantic-release
52+
env:
53+
NODE_ENV: "cicd"
54+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
55+
GITHUB_TOKEN: ${{secrets.gh_token}}
56+
GIT_AUTHOR_NAME: "autocloud-deploy-bot"
57+
GIT_AUTHOR_EMAIL: "no-reply@autocloud.dev"
58+
GIT_COMMITTER_NAME: "autocloud-deploy-bot"
59+
GIT_COMMITTER_EMAIL: "no-reply@autocloud.dev"

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 1.0.0-alpha.1 (2022-05-16)
2+
3+
4+
### Bug Fixes
5+
6+
* **rebase:** fastforward alpha to main ([2a42aed](https://github.com/cloudgraphdev/cloudgraph-provider-tencent/commit/2a42aedd5a0488d49406b56d6b2eccffbb750aba))
7+
* **services:** fix ccn service connection file ([ed87d28](https://github.com/cloudgraphdev/cloudgraph-provider-tencent/commit/ed87d280abef5619cc76357fcef54f3efa8706b3))
8+
* initial release ([c8ee8f1](https://github.com/cloudgraphdev/cloudgraph-provider-tencent/commit/c8ee8f1ae4efd7357aa40453aa2960d1c63791f9))
9+
* initial release ([911a0e7](https://github.com/cloudgraphdev/cloudgraph-provider-tencent/commit/911a0e7c580cc5d838c4a9adbeb677440e07d8ba))
10+
11+
12+
### Features
13+
14+
* **boilerplate:** add boilerplate, vpc, subnet and tags ([a4b1da7](https://github.com/cloudgraphdev/cloudgraph-provider-tencent/commit/a4b1da78373b39deb24b0c02605c2cce0cac72a6))
15+
* **ccn:** add ccn and ccn attachment ([f4ba707](https://github.com/cloudgraphdev/cloudgraph-provider-tencent/commit/f4ba70780e0d133094e209c8995b80027bd98bcf))
16+
* **ccn:** update README ([0403c4f](https://github.com/cloudgraphdev/cloudgraph-provider-tencent/commit/0403c4fca7ea97270c499b17434e3c05b148ce72))
17+
* **securityGroup:** add security group service ([1f20850](https://github.com/cloudgraphdev/cloudgraph-provider-tencent/commit/1f20850176f0e9f3c48e3f0d8fe86ac533370e7d))
18+
* **securityGroupRule:** add securityGroupRule service ([a6e7144](https://github.com/cloudgraphdev/cloudgraph-provider-tencent/commit/a6e714495bb6669d338aa42fae43603eccc2bde0))
19+
* **vpnGateway:** add tencent vpnGateway ([362bf7f](https://github.com/cloudgraphdev/cloudgraph-provider-tencent/commit/362bf7f37f9a858edabc233f655e19a62a5a7ca5))

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,10 @@ CloudGraph Tencent Provider will ask you what regions you would like to crawl an
5757
| Service | Relations |
5858
| ------------------- | ------------------- |
5959
| routeTable | vpc, subnet |
60+
| securityGroup | |
61+
| securityGroupRule | |
62+
| ccn | ccnAttachment |
63+
| ccnAttachment | ccn |
6064
| subnet | vpc, routeTable |
61-
| vpc | subnet, routeTable |
65+
| vpc | subnet, vpnGateway, routeTable |
66+
| vpnGateway | vpc |

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cloudgraph/cg-provider-tencent",
3-
"version": "0.0.0",
3+
"version": "1.0.0-alpha.1",
44
"description": "CloudGraph provider plugin for Tencent Cloud used to fetch Tencent Cloud data.",
55
"publishConfig": {
66
"registry": "https://registry.npmjs.org/",
@@ -18,10 +18,10 @@
1818
"version": ">0.2"
1919
},
2020
"scripts": {
21-
"build": "yarn prepublish",
21+
"build": "yarn prepack",
2222
"generate-types": "graphql-codegen --config codegen.yml",
2323
"prepare": "npx husky install && shx rm -rf .git/hooks && shx ln -s ../.husky .git/hooks",
24-
"prepublish": "rm -rf dist && yarn generate-types && tsc && yarn cpx 'src/**/*.graphql' dist",
24+
"prepack": "rm -rf dist && yarn generate-types && tsc && yarn cpx 'src/**/*.graphql' dist",
2525
"test": "NODE_ENV=test jest ./tests",
2626
"lint": "eslint --config .eslintrc.json --ext .js,.ts ./",
2727
"lint:fix": "eslint --fix --config .eslintrc.json --ext .js,.ts ./",

0 commit comments

Comments
 (0)