Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More explicit error message when Field Suggestion is (partially) disabled #73

Merged
merged 100 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
c4c363c
feat: fork for pypi
iCarossio Feb 9, 2023
1d3a7cb
fix: handle json decode errors
Feb 9, 2023
3466333
fix: error not defined
Feb 9, 2023
87f9ddf
feat: jmiroosh feature
QuentinN42 Feb 9, 2023
9f27142
Merge pull request #3 from Escape-Technologies/feat/jamboro-duplicate…
QuentinN42 Feb 9, 2023
31651c2
feat: duplicate query regex
QuentinN42 Feb 9, 2023
200f43b
fix: dockerhub token
Feb 9, 2023
2e97088
feat: proxy
QuentinN42 Feb 13, 2023
dedf6e9
feat: ignore error
QuentinN42 Feb 13, 2023
038c0f4
feat: add max retry param
QuentinN42 Feb 13, 2023
296d2d7
Merge pull request #5 from Escape-Technologies/feat/proxy
QuentinN42 Feb 14, 2023
e5474a4
fix: input object heuristics
iCarossio Feb 14, 2023
0d2365b
fix: typing context
iCarossio Feb 14, 2023
6918b0c
fix: input object for argmuments
nohehf Feb 14, 2023
02c6ea5
fix: double regex
iCarossio Feb 14, 2023
7e9b65f
Merge pull request #7 from Escape-Technologies/fix/double_regexes
iCarossio Feb 14, 2023
649eb83
fix: new field regex
iCarossio Feb 14, 2023
daad6b4
Merge branch 'main' of github.com:Escape-Technologies/clairvoyance in…
iCarossio Feb 14, 2023
6734c72
fix: did you mean
iCarossio Feb 14, 2023
472d8b1
fix: did you mean
iCarossio Feb 14, 2023
16ff371
fix: tests
iCarossio Feb 14, 2023
f6d2a0a
fix: tests
iCarossio Feb 14, 2023
db700a2
fix: typename regex
iCarossio Feb 14, 2023
3b66667
feat: skip regex
iCarossio Feb 14, 2023
2ba11b5
feat: fix regex
iCarossio Feb 14, 2023
80668bf
fix: was not provided regex
iCarossio Feb 14, 2023
594a34f
feat: dot in field
iCarossio Feb 14, 2023
7b45479
Merge pull request #8 from Escape-Technologies/fix/double_regexes
iCarossio Feb 14, 2023
f5fa684
feat: add backoff
QuentinN42 Feb 14, 2023
e53d931
Merge pull request #9 from Escape-Technologies/feat/bed
QuentinN42 Feb 14, 2023
87d6d94
feat: multiple did you mean
iCarossio Feb 14, 2023
7cc9a5d
fix: better regexps
iCarossio Feb 14, 2023
8b3f0fe
feat: move to triple quotes
iCarossio Feb 14, 2023
827b16d
feat: move to triple quotes
iCarossio Feb 14, 2023
d29ee85
feat: move to triple quotes
iCarossio Feb 14, 2023
e3debd8
feat: move to triple quotes
iCarossio Feb 14, 2023
7433fec
feat: profiles
QuentinN42 Feb 14, 2023
15b21cd
feat: field regexes above
iCarossio Feb 14, 2023
5f3cfa7
feat: triple quote
iCarossio Feb 14, 2023
4abd3a1
feat: compile arg regexes
iCarossio Feb 14, 2023
4e9851f
feat: compile typeref regexes
iCarossio Feb 14, 2023
4f00dd2
Merge branch 'main' of github.com:Escape-Technologies/clairvoyance in…
iCarossio Feb 14, 2023
4adeb28
--wip-- [skip ci]
iCarossio Feb 14, 2023
40eb539
--wip-- [skip ci]
iCarossio Feb 14, 2023
ba82658
fix: final regexes
iCarossio Feb 14, 2023
36a0217
fix: remove print
iCarossio Feb 14, 2023
abac515
docs: add help message to the doc
QuentinN42 Feb 14, 2023
91dda68
feat: V2.3
QuentinN42 Feb 14, 2023
ac00768
feat: @jamboro fixes issue 11
QuentinN42 Feb 14, 2023
68e6901
feat: retro compat
QuentinN42 Feb 14, 2023
cc5a811
feat: update python
QuentinN42 Feb 14, 2023
e1c7140
feat: lookup in stderr
QuentinN42 Feb 14, 2023
6d29060
Merge pull request #4 from Escape-Technologies/feat/wordlist-conforms…
QuentinN42 Feb 14, 2023
f842156
feat: ignore aiohttp warns
QuentinN42 Feb 14, 2023
a3e4525
chore: v2.3.1
QuentinN42 Feb 14, 2023
3929cad
Merge branch 'main' of github.com:Escape-Technologies/clairvoyance in…
iCarossio Feb 14, 2023
5f2c58c
fix: better did you mean for type field
iCarossio Feb 14, 2023
166b6fd
feat: did you mean skip field regex
iCarossio Feb 14, 2023
36989c9
fix: clairvoyance
iCarossio Feb 14, 2023
a434478
fix: inline fragments regexps
iCarossio Feb 14, 2023
76ee5eb
fix: inline fragments regexps
iCarossio Feb 14, 2023
c365e99
feat: skip ever useless error message
iCarossio Feb 15, 2023
9256728
fix: print context
iCarossio Feb 15, 2023
3705fe9
fix: input object Input
iCarossio Feb 15, 2023
3fe9831
fix: naming
iCarossio Feb 15, 2023
05d2dca
Merge pull request #11 from Escape-Technologies/feat/general-skip
iCarossio Feb 15, 2023
71afe22
feat: v2.4.0
QuentinN42 Feb 15, 2023
ef36d15
fix: unknown-message-log-error
nohehf Feb 15, 2023
ee43bf5
Merge pull request #13 from Escape-Technologies/fix/unknown-message-l…
iCarossio Feb 15, 2023
c9fb391
fix: input flagh
nohehf Feb 15, 2023
a56bae9
Merge pull request #14 from Escape-Technologies/fix/input-flag
nohehf Feb 15, 2023
0e503f4
fix: reccursive schemas loops
nohehf Feb 15, 2023
635dca5
chore: remove unused import
nohehf Feb 15, 2023
d7e7e63
Merge pull request #15 from Escape-Technologies/fix/reccursive-schema…
QuentinN42 Feb 16, 2023
f0270b8
chore: v2.4.1
QuentinN42 Feb 16, 2023
b5e8c71
feat: disable ssl verification
nohehf Feb 20, 2023
b4905e3
chore: update readme
nohehf Feb 20, 2023
94806df
Merge pull request #18 from Escape-Technologies/feat/disable-ssl-veri…
nohehf Feb 20, 2023
df6b6d2
fix: don't crash when no field suggestion
iCarossio Feb 21, 2023
cdf0076
docs: update readme
QuentinN42 Feb 22, 2023
200f686
feat: some rich progress bars
QuentinN42 Feb 22, 2023
099fba1
fix: use pathlib to work with any OS
QuentinN42 Feb 22, 2023
79ccf99
fix: updated an uniform tasks
QuentinN42 Feb 22, 2023
0c4902e
fix: optional progress
QuentinN42 Feb 22, 2023
56e3e12
Merge pull request #22 from Escape-Technologies/feat/tqdm
QuentinN42 Feb 27, 2023
4801d49
Merge pull request #23 from Escape-Technologies/feat/pathlib
QuentinN42 Feb 27, 2023
c2d86eb
feat: v2.5.0
QuentinN42 Feb 27, 2023
f98770f
refactor: allow over python 3.11
Mar 2, 2023
4e989bf
chore: typo
QuentinN42 Mar 15, 2023
2c6cc7e
Revert "fix: dockerhub token"
QuentinN42 Mar 15, 2023
c4f539d
feat: update debugger config
QuentinN42 Mar 15, 2023
fe18556
feat: revert one line
QuentinN42 Mar 15, 2023
81cfb79
fix: call super in the __init__
QuentinN42 Mar 15, 2023
c8ba3b3
fix: drop warluses
QuentinN42 Mar 15, 2023
26dc819
docs: move comments
QuentinN42 Mar 15, 2023
ac1018d
feat: fix typing
QuentinN42 Mar 15, 2023
924e286
feat: restore main project name
QuentinN42 Mar 15, 2023
56c8b22
fix: Closing angle bracket
QuentinN42 Mar 17, 2023
85f54a1
Merge branch 'main' of github.com:nikitastupin/clairvoyance into niki…
iCarossio Jun 30, 2023
8b101f0
feat: clairvoyance failing when no field suggestion
iCarossio Jun 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ LOG_LEVEL=`INFO` # A string level for logging.

> Due to time constraints @nikitastupin won't be able to answer all the issues for some time but he'll do his best to review & merge PRs

In case of question or issue with clairvoyance please refer to [wiki](https://github.com/nikitastupin/clairvoyance/wiki) or [issues](https://github.com/nikitastupin/clairvoyance/issues). If this doesn't solve your problem feel free to open a [new issue](https://github.com/nikitastupin/clairvoyance/issues/new).
In case of questions or issues with Clairvoyance please refer to [wiki](https://github.com/nikitastupin/clairvoyance/wiki) or [issues](https://github.com/nikitastupin/clairvoyance/issues). If this doesn't solve your problem feel free to open a [new issue](https://github.com/nikitastupin/clairvoyance/issues/new).

## Contributing

Expand Down
15 changes: 11 additions & 4 deletions clairvoyance/oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ async def __probation(document: str) -> Optional[graphql.TypeRef]:

if not typeref and context != FuzzingContext.ARGUMENT:
try:
raise Exception(f'Unable to get TypeRef for {documents} in context {context}')
raise Exception(f"""Unable to get TypeRef for {documents} in context {context}.
It is very likely that Field Suggestion is not fully enabled on this endpoint.""")
except Exception as e:
raise Exception(e) from e

Expand Down Expand Up @@ -467,8 +468,9 @@ async def probe_typename(input_document: str) -> str:

response = await client().post(document=document)
if 'errors' not in response:
log().debug(f'Unable to get typename from {document}')
sys.exit(1)
log().warning(f"""Unable to get typename from {document}.
Field Suggestion might not be enabled on this endpoint. Using default "Query""")
return 'Query'

errors = response['errors']

Expand All @@ -482,7 +484,9 @@ async def probe_typename(input_document: str) -> str:
break

if not match:
log().debug(f'Unkwon error in `probe_typename`: "{errors}" does not match any known regexes.')
log().debug(f"""Unkwon error in `probe_typename`: "{errors}" does not match any known regexes.
Field Suggestion might not be enabled on this endpoint. Using default "Query""")
return 'Query'

return (match.group('typename').replace('[', '').replace(']', '').replace('!', ''))

Expand Down Expand Up @@ -555,6 +559,9 @@ async def clairvoyance(
input_document: str,
input_schema: Dict[str, Any] = None,
) -> str:

log().debug(f'input_document = {input_document}')

if not input_schema:
root_typenames = await fetch_root_typenames()
schema = graphql.Schema(
Expand Down