mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-15 01:17:34 +00:00
9b2cef55c0
* implement analyzer interface for gitlab * generated permissions, added unit test for gitlab analyzer * revert deletion of scopes.go * appending domain in resource names * [chore] moved expected output of test in json file to neat the code. * updated the test for gitlab analyzer to make more unique FullyQualifiedName, Ids are added for resources. * remove unnecessary metadata field and fix github -> gitlab * extract user id from access token json, make user as resource * link analyzer with gitlab v2 detector * fixed code breaking changes due to analyzer protobuf removal. --------- Co-authored-by: Abdul Basit <abasit@folio3.com>
1 line
No EOL
996 B
JSON
1 line
No EOL
996 B
JSON
{"AnalyzerType":5,"Bindings":[{"Resource":{"Name":"gitlab.com/user/22466472","FullyQualifiedName":"gitlab.com/user/22466472","Type":"user","Metadata":{"token_created_at":"2024-08-15T06:33:00.337Z","token_expires_at":"2025-08-15","token_id":10470457,"token_name":"test-project-token","token_revoked":false},"Parent":null},"Permission":{"Value":"read_api","Parent":null}},{"Resource":{"Name":"gitlab.com/user/22466472","FullyQualifiedName":"gitlab.com/user/22466472","Type":"user","Metadata":{"token_created_at":"2024-08-15T06:33:00.337Z","token_expires_at":"2025-08-15","token_id":10470457,"token_name":"test-project-token","token_revoked":false},"Parent":null},"Permission":{"Value":"read_repository","Parent":null}},{"Resource":{"Name":"truffletester / trufflehog","FullyQualifiedName":"gitlab.com/project/60871295","Type":"project","Metadata":null,"Parent":null},"Permission":{"Value":"Developer","Parent":null}}],"UnboundedResources":null,"Metadata":{"enterprise":true,"version":"17.6.0-pre"}} |