mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2026-06-15 13:24:37 +00:00
* implemented planetscale anlayzer * linked detector with analyzer for planetscale. override input form for TUI. refactor some variable name for clarrification. * clean up scopes for planetscale. * add database and other scopes * add remaining scopes and refactoring * updated the analyzer type value in expected output of notion test. * updated the expected output for analyzers updated the go-pretty library in planetscale. added extra information from results to be ignore like AnalysisInfo, ExtraData etc. * updated expected output of test.
203 lines
6.7 KiB
JSON
203 lines
6.7 KiB
JSON
{
|
|
"organization_scopes": [
|
|
{
|
|
"name": "read_organization",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s",
|
|
"method": "GET",
|
|
"valid_status_code": [200],
|
|
"invalid_status_code": [403]
|
|
}
|
|
},
|
|
{
|
|
"name": "read_invoices",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/invoices",
|
|
"method": "GET",
|
|
"valid_status_code": [200],
|
|
"invalid_status_code": [403]
|
|
}
|
|
},
|
|
{
|
|
"name": "read_databases",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases",
|
|
"method": "GET",
|
|
"valid_status_code": [200],
|
|
"invalid_status_code": [403]
|
|
}
|
|
},
|
|
{
|
|
"name": "read_audit_logs",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/audit-log",
|
|
"method": "GET",
|
|
"valid_status_code": [200],
|
|
"invalid_status_code": [403]
|
|
}
|
|
},
|
|
{
|
|
"name": "create_databases",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases",
|
|
"method": "POST",
|
|
"valid_status_code": [422],
|
|
"invalid_status_code": [403]
|
|
}
|
|
},
|
|
{
|
|
"name": "read_oauth_applications",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/oauth-applications",
|
|
"method": "GET",
|
|
"valid_status_code": [200],
|
|
"invalid_status_code": [403]
|
|
}
|
|
}
|
|
],
|
|
"oauth_application_scopes": [
|
|
{
|
|
"name": "write_oauth_tokens",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/oauth-applications/%s/token",
|
|
"method": "POST",
|
|
"valid_status_code": [422],
|
|
"invalid_status_code": [403]
|
|
}
|
|
},
|
|
{
|
|
"name": "read_oauth_tokens",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/oauth-applications/%s/tokens",
|
|
"method": "GET",
|
|
"valid_status_code": [200],
|
|
"invalid_status_code": [403]
|
|
}
|
|
}
|
|
],
|
|
"database_scopes": [
|
|
{
|
|
"name": "read_database",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases/%s",
|
|
"method": "GET",
|
|
"valid_status_code": [200],
|
|
"invalid_status_code": [403]
|
|
}
|
|
},
|
|
{
|
|
"name": "write_database",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases/%s",
|
|
"method": "PATCH",
|
|
"valid_status_code": [400],
|
|
"invalid_status_code": [403],
|
|
"payload": {
|
|
"default_branch": "`nowaythisbranchcanexist"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "read_branch",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases/%s/branches",
|
|
"method": "GET",
|
|
"valid_status_code": [200],
|
|
"invalid_status_code": [403]
|
|
}
|
|
},
|
|
{
|
|
"name": "create_branch",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases/%s/branches",
|
|
"method": "POST",
|
|
"valid_status_code": [422],
|
|
"invalid_status_code": [403]
|
|
}
|
|
},
|
|
{
|
|
"name": "read_deploy_request",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases/%s/deploy-requests",
|
|
"method": "GET",
|
|
"valid_status_code": [200],
|
|
"invalid_status_code": [403]
|
|
}
|
|
},
|
|
{
|
|
"name": "create_deploy_request",
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases/%s/deploy-requests",
|
|
"method": "POST",
|
|
"valid_status_code": [422],
|
|
"invalid_status_code": [403]
|
|
}
|
|
}
|
|
],
|
|
"branch_scopes": [
|
|
{
|
|
"name": "connect_branch",
|
|
"production": false,
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases/%s/branches/%s/passwords",
|
|
"method": "POST",
|
|
"valid_status_code": [422],
|
|
"invalid_status_code": [403],
|
|
"payload": {
|
|
"role": "`nowaythisrolecanexist"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "connect_production_branch",
|
|
"production": true,
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases/%s/branches/%s/passwords",
|
|
"method": "POST",
|
|
"valid_status_code": [422],
|
|
"invalid_status_code": [403],
|
|
"payload": {
|
|
"role": "`nowaythisrolecanexist"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "read_backups",
|
|
"production": true,
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases/%s/branches/%s/backups",
|
|
"method": "GET",
|
|
"valid_status_code": [200],
|
|
"invalid_status_code": [403]
|
|
}
|
|
}
|
|
],
|
|
"backup_scopes": [
|
|
{
|
|
"name": "restore_backup",
|
|
"production": false,
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases/%s/branches",
|
|
"method": "POST",
|
|
"valid_status_code": [422],
|
|
"invalid_status_code": [403],
|
|
"payload": {
|
|
"backup_id": "%s"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "restore_production_branch_backup",
|
|
"production": true,
|
|
"test": {
|
|
"endpoint": "https://api.planetscale.com/v1/organizations/%s/databases/%s/branches",
|
|
"method": "POST",
|
|
"valid_status_code": [422],
|
|
"invalid_status_code": [403],
|
|
"payload": {
|
|
"backup_id": "%s"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
} |