[Detector] rippling detector for phrase api tokens#4348
Conversation
|
This PR introduces a new detector for Phrase Access Tokens. Detection Strategy:
Verification: Response Handling: Testing: |
|
I can't see |
4ace578 to
cb69a01
Compare
kashifkhan0771
left a comment
There was a problem hiding this comment.
LGTM!
Good Work on pattern test cases ❤️
Just one small non-blocking suggestion
| var tokens []string | ||
| matches := keyPat.FindAllStringSubmatch(dataStr, -1) | ||
|
|
||
| for _, match := range matches { | ||
| token := match[1] | ||
|
|
||
| if !slices.Contains(tokens, token) { | ||
| tokens = append(tokens, token) | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
| var tokens []string | |
| matches := keyPat.FindAllStringSubmatch(dataStr, -1) | |
| for _, match := range matches { | |
| token := match[1] | |
| if !slices.Contains(tokens, token) { | |
| tokens = append(tokens, token) | |
| } | |
| } | |
| var tokens = make(map[string]struct{}) | |
| for _, match := range keyPat.FindAllStringSubmatch(dataStr, -1) { | |
| tokens[match[1]] = struct{}{} | |
| } |
) * add detector for phase OAuth Access Token * update test cases for phrase AccessTokens * update integration tests for phrase access token * resolve comments * add detector scanner in engine * resolve comments * update test cases * addressed comment about the deduplication of tokens --------- Co-authored-by: Amaan Ullah <aman.ullah.jalal@trufflesec.com> Co-authored-by: Kashif Khan <70996046+kashifkhan0771@users.noreply.github.com> Co-authored-by: Shahzad Haider <76992801+shahzadhaider1@users.noreply.github.com> Co-authored-by: Shahzad Haider <shahzadhaider.se@gmail.com>
Description:
This PR adds a Detector for phase OAuth API token.
Checklist:
make test-community)?make lintthis requires golangci-lint)?