chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"description": "Golden signature test cases - DO NOT MODIFY unless algorithm changes",
|
||||
"algorithm": "HMAC-SHA256",
|
||||
"format": "v1,base64(HMAC-SHA256(id.timestamp.payload, secret))",
|
||||
"testCases": [
|
||||
{
|
||||
"name": "simple payload",
|
||||
"id": "msg_test_001",
|
||||
"timestamp": "1700000000",
|
||||
"payload": "{\"test\":\"data\"}",
|
||||
"secret": "test-secret",
|
||||
"expectedSignature": "v1,4Fay6rvxXDEbH+4oA1fYP2BR/Bwzn3/7ONj40iJQagY="
|
||||
},
|
||||
{
|
||||
"name": "unicode payload",
|
||||
"id": "msg_test_002",
|
||||
"timestamp": "1700000001",
|
||||
"payload": "{\"message\":\"Hello World\"}",
|
||||
"secret": "unicode-secret-key",
|
||||
"expectedSignature": "v1,ICmAFUlesRqIFA44bU6Wlce5GszoHjG+w7nurcu5EWc="
|
||||
},
|
||||
{
|
||||
"name": "complex nested payload",
|
||||
"id": "msg_test_003",
|
||||
"timestamp": "1700000002",
|
||||
"payload": "{\"nested\":{\"array\":[1,2,3],\"object\":{\"key\":\"value\"}}}",
|
||||
"secret": "complex-secret",
|
||||
"expectedSignature": "v1,Vx/pw0yOiRRoxdfifaZ3zBKt4B3KkRKFVr6gLQNJs9Q="
|
||||
},
|
||||
{
|
||||
"name": "empty data object",
|
||||
"id": "msg_test_004",
|
||||
"timestamp": "1700000003",
|
||||
"payload": "{\"data\":{}}",
|
||||
"secret": "empty-data-secret",
|
||||
"expectedSignature": "v1,IbLtu+G65OH8Gw7ZFqy38ru+Jrg96yWfueYMMdaFYs0="
|
||||
},
|
||||
{
|
||||
"name": "special characters in secret",
|
||||
"id": "msg_test_005",
|
||||
"timestamp": "1700000004",
|
||||
"payload": "{\"test\":true}",
|
||||
"secret": "secret!@#$%^&*()",
|
||||
"expectedSignature": "v1,kUvMXJ0rouLoROxY70WIzV+zLQGpSRuCXv8evLTPjXg="
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"description": "V1 GitHub push webhook - legacy format sanitized",
|
||||
"capturedAt": "2026-01-29T10:30:00Z",
|
||||
"headers": {
|
||||
"webhook-id": "msg_fixture_v1_001",
|
||||
"webhook-timestamp": "1738150200",
|
||||
"webhook-signature": "v1,A/VFbvOJ8JAzXZweWvc+IHaBie19NVKUpQKbeobt5xo="
|
||||
},
|
||||
"payload": "{\"trigger_name\":\"GITHUB_PUSH_EVENT\",\"connection_id\":\"conn_fixture_001\",\"trigger_id\":\"trigger_fixture_001\",\"payload\":{\"ref\":\"refs/heads/main\",\"commits\":[{\"id\":\"def456\",\"message\":\"Legacy commit\"}]},\"log_id\":\"log_fixture_003\"}",
|
||||
"testSecret": "test-webhook-secret-for-fixtures",
|
||||
"expectedResult": {
|
||||
"version": "V1",
|
||||
"triggerSlug": "GITHUB_PUSH_EVENT",
|
||||
"triggerId": "trigger_fixture_001"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"description": "V2 GitHub push webhook - sanitized real-world structure",
|
||||
"capturedAt": "2026-01-29T10:30:00Z",
|
||||
"headers": {
|
||||
"webhook-id": "msg_fixture_v2_001",
|
||||
"webhook-timestamp": "1738150200",
|
||||
"webhook-signature": "v1,a/mTZohEnMvzupLGWsiDLhTctk+hgx3Q2r1ACjybkhk="
|
||||
},
|
||||
"payload": "{\"type\":\"github_push_event\",\"timestamp\":\"2026-01-29T10:30:00Z\",\"log_id\":\"log_fixture_002\",\"data\":{\"connection_id\":\"conn_uuid_fixture_002\",\"connection_nano_id\":\"ca_fixture_002\",\"trigger_nano_id\":\"ti_fixture_002\",\"trigger_id\":\"trigger_uuid_fixture_002\",\"user_id\":\"user_fixture_002\",\"ref\":\"refs/heads/main\",\"repository\":{\"name\":\"test-repo\"}}}",
|
||||
"testSecret": "test-webhook-secret-for-fixtures",
|
||||
"expectedResult": {
|
||||
"version": "V2",
|
||||
"triggerSlug": "GITHUB_PUSH_EVENT",
|
||||
"userId": "user_fixture_002"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"description": "V3 GitHub push webhook - sanitized real-world structure",
|
||||
"capturedAt": "2026-01-29T10:30:00Z",
|
||||
"headers": {
|
||||
"webhook-id": "msg_fixture_v3_001",
|
||||
"webhook-timestamp": "1738150200",
|
||||
"webhook-signature": "v1,GqTsMaDtroeNNR7rDDzEGVTtHfFtIDknXhmkCXss7cA="
|
||||
},
|
||||
"payload": "{\"id\":\"evt_fixture_v3_001\",\"timestamp\":\"2026-01-29T10:30:00Z\",\"type\":\"composio.trigger.message\",\"metadata\":{\"log_id\":\"log_fixture_001\",\"trigger_slug\":\"GITHUB_PUSH_EVENT\",\"trigger_id\":\"ti_fixture_001\",\"connected_account_id\":\"ca_fixture_001\",\"auth_config_id\":\"ac_fixture_001\",\"user_id\":\"user_fixture_001\"},\"data\":{\"ref\":\"refs/heads/main\",\"repository\":{\"name\":\"test-repo\",\"full_name\":\"user/test-repo\"},\"pusher\":{\"name\":\"test-user\"},\"commits\":[{\"id\":\"abc123\",\"message\":\"Test commit\"}]}}",
|
||||
"testSecret": "test-webhook-secret-for-fixtures",
|
||||
"expectedResult": {
|
||||
"version": "V3",
|
||||
"triggerSlug": "GITHUB_PUSH_EVENT",
|
||||
"userId": "user_fixture_001",
|
||||
"connectedAccountId": "ca_fixture_001"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user