CloudGraph is the free open-source universal GraphQL API and Cloud Security Posture Management (CSPM) tool for AWS, Azure, GCP, and K8s.
Installation :
System Requirements : Docker
Homebrew :
brew install cloudgraphdev/tap/cg
NPM :
npm i -g @cloudgraph/cli
Adding providers :
cg init aws
cg init azure
cg init gcp
cg init k8s
cg init tencent
Run :
cg init
cg launch
Docker must be running else use these commands :
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
cg scan
Next playground will open.
Stop Instance
cg teardown
To remove the container after stopping it, run :
cg teardown --delete-image
*Loading Previous Versions*
cg load
Basic Query Syntax Examples:
query {
getawsEc2(
arn: "arn:aws:ec2:us-east-1:123445678997:instance/i-12345567889012234"
) {
id
arn
}
}
This will return
{
"data": {
"getawsEc2": {
"id": "i-12345567889012234",
"arn": "arn:aws:ec2:us-east-1:123445678997:instance/i-12345567889012234"
}
},
"extensions": {
"touched_uids": 4
}
}
Top comments (0)