Skip to content

Commit

Permalink
add jaal
Browse files Browse the repository at this point in the history
  • Loading branch information
dolevf committed Aug 25, 2022
1 parent 6ded1aa commit de32e21
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ graphw00f currently attempts to discover the following GraphQL engines:
* Agoo - Ruby
* Mercurius - JavaScript
* morpheus-graphql - Haskell
* jaal - Golang

# GraphQL Threat Matrix
The graphw00f project uses the [GraphQL Threat Matrix Project](https://github.com/nicholasaleks/graphql-threat-matrix/) as its technology security matrix database. When graphw00f successfully fingerprints a GraphQL endpoint, it will print out the threat matrix document. This document helps security engineers to identify how mature the technology is, what security features it offers, and whether it contains any CVEs.
Expand Down
6 changes: 6 additions & 0 deletions graphw00f/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ def get_engines():
'url':'https://github.com/morpheusgraphql/morpheus-graphql',
'ref':'https://github.com/nicholasaleks/graphql-threat-matrix/blob/master/implementations/morpheus-graphql',
'technology':['Haskell']
},
'jaal':{
'name':'jaal',
'url':'https://github.com/appointy/jaal',
'ref':'https://github.com/nicholasaleks/graphql-threat-matrix/blob/master/implementations/jaal',
'technology':['Golang']
}
}

Expand Down
11 changes: 11 additions & 0 deletions graphw00f/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def execute(self, url):
self.url = url
if self.engine_lighthouse():
return 'lighthouse'
elif self.engine_jaal():
return 'jaal'
elif self.engine_morpheus():
return 'morpheus-graphql'
elif self.engine_mercurius():
Expand Down Expand Up @@ -623,3 +625,12 @@ def engine_morpheus(self):

return False

def engine_jaal(self):
query = '''{}'''
response = self.graph_query(self.url, payload=query, operation='{}')

if error_contains(response, 'must have a single query') or error_contains(response, 'offset'):
return True

return False

2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '1.1.5'
VERSION = '1.1.6'

0 comments on commit de32e21

Please sign in to comment.