proagents 1.6.16 → 1.6.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +169 -0
- package/COMMANDS.md +595 -0
- package/README.md +22 -64
- package/bin/proagents.js +0 -2
- package/lib/commands/init.js +4 -174
- package/package.json +2 -7
- package/.proagents/ai-models/README.md +0 -141
- package/.proagents/ai-models/cost-management.md +0 -362
- package/.proagents/ai-models/fallbacks.md +0 -342
- package/.proagents/ai-models/model-config.md +0 -318
- package/.proagents/ai-models/task-routing.md +0 -503
- package/.proagents/ai-training/README.md +0 -155
- package/.proagents/ai-training/continuous-learning.md +0 -413
- package/.proagents/ai-training/domain-knowledge.md +0 -378
- package/.proagents/ai-training/pattern-learning.md +0 -455
- package/.proagents/ai-training/training-data.md +0 -337
- package/.proagents/ai-training/user-preferences.md +0 -346
- package/.proagents/approval-workflows/README.md +0 -146
- package/.proagents/approval-workflows/approval-config.md +0 -332
- package/.proagents/approval-workflows/approval-stages.md +0 -503
- package/.proagents/approval-workflows/emergency-bypass.md +0 -351
- package/.proagents/approval-workflows/examples.md +0 -859
- package/.proagents/approval-workflows/notifications.md +0 -320
- package/.proagents/compliance/README.md +0 -206
- package/.proagents/compliance/access-control.md +0 -310
- package/.proagents/compliance/audit-logging.md +0 -444
- package/.proagents/compliance/compliance-frameworks.md +0 -429
- package/.proagents/compliance/reports.md +0 -491
- package/.proagents/compliance/retention-policies.md +0 -454
- package/.proagents/config-versioning/README.md +0 -120
- package/.proagents/config-versioning/changelog.md +0 -300
- package/.proagents/config-versioning/rollback.md +0 -283
- package/.proagents/config-versioning/versioning.md +0 -330
- package/.proagents/contract-testing/README.md +0 -223
- package/.proagents/contract-testing/contract-testing.md +0 -614
- package/.proagents/contract-testing/pact-integration.md +0 -507
- package/.proagents/contract-testing/schema-validation.md +0 -565
- package/.proagents/dependency-management/README.md +0 -140
- package/.proagents/dependency-management/automation.md +0 -363
- package/.proagents/dependency-management/compatibility.md +0 -319
- package/.proagents/dependency-management/security-scanning.md +0 -413
- package/.proagents/dependency-management/update-policies.md +0 -374
- package/.proagents/disaster-recovery/README.md +0 -247
- package/.proagents/disaster-recovery/automation.md +0 -366
- package/.proagents/disaster-recovery/backup-recovery.md +0 -571
- package/.proagents/disaster-recovery/incident-response.md +0 -565
- package/.proagents/disaster-recovery/rollback-procedures.md +0 -499
- package/.proagents/disaster-recovery/runbooks.md +0 -603
- package/.proagents/disaster-recovery/scenarios.md +0 -892
- package/.proagents/disaster-recovery/testing.md +0 -438
- package/.proagents/environments/README.md +0 -244
- package/.proagents/environments/configuration.md +0 -437
- package/.proagents/environments/promotion.md +0 -434
- package/.proagents/environments/setup.md +0 -420
- package/.proagents/examples/README.md +0 -55
- package/.proagents/examples/backend-nodejs/README.md +0 -188
- package/.proagents/examples/backend-nodejs/complete-conversation.md +0 -601
- package/.proagents/examples/backend-nodejs/proagents.config.yaml +0 -415
- package/.proagents/examples/backend-nodejs/workflow-example.md +0 -909
- package/.proagents/examples/fullstack-nextjs/README.md +0 -155
- package/.proagents/examples/fullstack-nextjs/complete-conversation.md +0 -604
- package/.proagents/examples/fullstack-nextjs/proagents.config.yaml +0 -287
- package/.proagents/examples/fullstack-nextjs/workflow-example.md +0 -553
- package/.proagents/examples/mobile-react-native/README.md +0 -171
- package/.proagents/examples/mobile-react-native/complete-conversation.md +0 -825
- package/.proagents/examples/mobile-react-native/proagents.config.yaml +0 -330
- package/.proagents/examples/mobile-react-native/workflow-example.md +0 -723
- package/.proagents/examples/web-frontend-react/README.md +0 -125
- package/.proagents/examples/web-frontend-react/complete-conversation.md +0 -556
- package/.proagents/examples/web-frontend-react/proagents.config.yaml +0 -183
- package/.proagents/examples/web-frontend-react/workflow-example.md +0 -603
- package/.proagents/existing-projects/README.md +0 -65
- package/.proagents/existing-projects/challenges.md +0 -861
- package/.proagents/existing-projects/coexistence-mode.md +0 -483
- package/.proagents/existing-projects/compatibility-assessment.md +0 -541
- package/.proagents/existing-projects/gradual-adoption.md +0 -515
- package/.proagents/existing-projects/migration-strategies.md +0 -788
- package/.proagents/existing-projects/pattern-reconciliation.md +0 -489
- package/.proagents/existing-projects/team-onboarding.md +0 -617
- package/.proagents/existing-projects/technical-debt-handling.md +0 -644
- package/.proagents/feature-flags/README.md +0 -263
- package/.proagents/feature-flags/ab-testing.md +0 -413
- package/.proagents/feature-flags/configuration.md +0 -420
- package/.proagents/feature-flags/kill-switches.md +0 -444
- package/.proagents/feature-flags/rollout-strategies.md +0 -392
- package/.proagents/history.log +0 -12
- package/.proagents/i18n/README.md +0 -133
- package/.proagents/i18n/extraction.md +0 -433
- package/.proagents/i18n/tms-integration.md +0 -332
- package/.proagents/i18n/translation-workflow.md +0 -413
- package/.proagents/i18n/validation.md +0 -355
- package/.proagents/logging/README.md +0 -276
- package/.proagents/logging/aggregation.md +0 -475
- package/.proagents/logging/log-levels.md +0 -376
- package/.proagents/logging/sensitive-data.md +0 -423
- package/.proagents/logging/structured-logging.md +0 -406
- package/.proagents/metrics/README.md +0 -69
- package/.proagents/metrics/code-quality-kpis.md +0 -461
- package/.proagents/metrics/deployment-metrics.md +0 -517
- package/.proagents/metrics/developer-productivity.md +0 -368
- package/.proagents/metrics/learning-effectiveness.md +0 -478
- package/.proagents/migrations/README.md +0 -77
- package/.proagents/migrations/from-claude-projects.md +0 -313
- package/.proagents/migrations/from-cursor-rules.md +0 -345
- package/.proagents/migrations/from-custom-workflows.md +0 -410
- package/.proagents/monitoring/README.md +0 -308
- package/.proagents/monitoring/alerting.md +0 -449
- package/.proagents/monitoring/dashboards.md +0 -454
- package/.proagents/monitoring/health-checks.md +0 -436
- package/.proagents/monitoring/metrics.md +0 -434
- package/.proagents/multi-project/README.md +0 -170
- package/.proagents/multi-project/coordinated-deploy.md +0 -510
- package/.proagents/multi-project/cross-project-deps.md +0 -395
- package/.proagents/multi-project/unified-changelog.md +0 -477
- package/.proagents/multi-project/walkthroughs/monorepo-setup.md +0 -787
- package/.proagents/multi-project/workspace-config.md +0 -408
- package/.proagents/notifications/README.md +0 -151
- package/.proagents/notifications/channels.md +0 -457
- package/.proagents/notifications/preferences.md +0 -415
- package/.proagents/notifications/routing.md +0 -449
- package/.proagents/notifications/scheduling.md +0 -425
- package/.proagents/notifications/templates.md +0 -446
- package/.proagents/offline-mode/README.md +0 -145
- package/.proagents/offline-mode/caching.md +0 -344
- package/.proagents/offline-mode/offline-operations.md +0 -312
- package/.proagents/offline-mode/queue-specifications.md +0 -679
- package/.proagents/offline-mode/sync.md +0 -475
- package/.proagents/parallel-features/README.md +0 -85
- package/.proagents/parallel-features/conflict-detection.md +0 -226
- package/.proagents/parallel-features/dependency-management.md +0 -392
- package/.proagents/parallel-features/merge-coordination.md +0 -506
- package/.proagents/parallel-features/tracking-system.md +0 -416
- package/.proagents/performance/README.md +0 -59
- package/.proagents/performance/bundle-analysis.md +0 -375
- package/.proagents/performance/load-testing.md +0 -563
- package/.proagents/performance/runtime-metrics.md +0 -489
- package/.proagents/performance/web-vitals.md +0 -425
- package/.proagents/plugins/README.md +0 -139
- package/.proagents/plugins/creating-plugins.md +0 -504
- package/.proagents/plugins/plugin-api.md +0 -467
- package/.proagents/plugins/plugin-registry.md +0 -276
- package/.proagents/reporting/README.md +0 -158
- package/.proagents/reporting/dashboards.md +0 -366
- package/.proagents/reporting/exports.md +0 -524
- package/.proagents/reporting/quality-metrics.md +0 -385
- package/.proagents/reporting/templates/README.md +0 -56
- package/.proagents/reporting/templates/dashboard-config.json +0 -187
- package/.proagents/reporting/templates/metrics-queries.md +0 -427
- package/.proagents/reporting/templates/react-dashboard.tsx +0 -544
- package/.proagents/reporting/templates/widgets.md +0 -451
- package/.proagents/reporting/velocity-metrics.md +0 -340
- package/.proagents/reverse-engineering/README.md +0 -151
- package/.proagents/reverse-engineering/architecture-extraction.md +0 -325
- package/.proagents/reverse-engineering/code-analysis.md +0 -377
- package/.proagents/reverse-engineering/dependency-mapping.md +0 -567
- package/.proagents/reverse-engineering/diagram-generation.md +0 -586
- package/.proagents/reverse-engineering/documentation-generation.md +0 -468
- package/.proagents/reverse-engineering/pattern-detection.md +0 -569
- package/.proagents/reverse-engineering/quality-assessment.md +0 -733
- package/.proagents/secrets/README.md +0 -278
- package/.proagents/secrets/access-control.md +0 -443
- package/.proagents/secrets/rotation.md +0 -403
- package/.proagents/secrets/scanning.md +0 -487
- package/.proagents/secrets/storage.md +0 -394
- package/.proagents/webhooks/README.md +0 -126
- package/.proagents/webhooks/endpoints.md +0 -298
- package/.proagents/webhooks/events.md +0 -316
- package/.proagents/webhooks/payloads.md +0 -325
- package/.proagents/webhooks/reliability.md +0 -363
- package/.proagents/webhooks/security.md +0 -380
|
@@ -1,380 +0,0 @@
|
|
|
1
|
-
# Webhook Security
|
|
2
|
-
|
|
3
|
-
Authentication, verification, and security best practices.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Signature Verification
|
|
8
|
-
|
|
9
|
-
### HMAC Signatures
|
|
10
|
-
|
|
11
|
-
ProAgents signs webhook payloads using HMAC-SHA256:
|
|
12
|
-
|
|
13
|
-
```yaml
|
|
14
|
-
webhooks:
|
|
15
|
-
endpoints:
|
|
16
|
-
- name: "secure-webhook"
|
|
17
|
-
url: "https://api.example.com/webhooks"
|
|
18
|
-
signature:
|
|
19
|
-
enabled: true
|
|
20
|
-
algorithm: "sha256"
|
|
21
|
-
secret_env: "WEBHOOK_SECRET"
|
|
22
|
-
header: "X-ProAgents-Signature"
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
### Signature Header Format
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
X-ProAgents-Signature: sha256=a1b2c3d4e5f6...
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Verification Examples
|
|
32
|
-
|
|
33
|
-
**Node.js:**
|
|
34
|
-
```javascript
|
|
35
|
-
const crypto = require('crypto');
|
|
36
|
-
|
|
37
|
-
function verifyWebhook(payload, signature, secret) {
|
|
38
|
-
const expectedSignature = 'sha256=' +
|
|
39
|
-
crypto.createHmac('sha256', secret)
|
|
40
|
-
.update(payload, 'utf8')
|
|
41
|
-
.digest('hex');
|
|
42
|
-
|
|
43
|
-
return crypto.timingSafeEqual(
|
|
44
|
-
Buffer.from(signature),
|
|
45
|
-
Buffer.from(expectedSignature)
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Express middleware
|
|
50
|
-
app.post('/webhook', express.raw({type: 'application/json'}), (req, res) => {
|
|
51
|
-
const signature = req.headers['x-proagents-signature'];
|
|
52
|
-
const payload = req.body.toString();
|
|
53
|
-
|
|
54
|
-
if (!verifyWebhook(payload, signature, process.env.WEBHOOK_SECRET)) {
|
|
55
|
-
return res.status(401).send('Invalid signature');
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Process webhook
|
|
59
|
-
const event = JSON.parse(payload);
|
|
60
|
-
// ...
|
|
61
|
-
});
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
**Python:**
|
|
65
|
-
```python
|
|
66
|
-
import hmac
|
|
67
|
-
import hashlib
|
|
68
|
-
|
|
69
|
-
def verify_webhook(payload: bytes, signature: str, secret: str) -> bool:
|
|
70
|
-
expected = 'sha256=' + hmac.new(
|
|
71
|
-
secret.encode(),
|
|
72
|
-
payload,
|
|
73
|
-
hashlib.sha256
|
|
74
|
-
).hexdigest()
|
|
75
|
-
|
|
76
|
-
return hmac.compare_digest(signature, expected)
|
|
77
|
-
|
|
78
|
-
# Flask example
|
|
79
|
-
@app.route('/webhook', methods=['POST'])
|
|
80
|
-
def webhook():
|
|
81
|
-
signature = request.headers.get('X-ProAgents-Signature')
|
|
82
|
-
payload = request.get_data()
|
|
83
|
-
|
|
84
|
-
if not verify_webhook(payload, signature, os.environ['WEBHOOK_SECRET']):
|
|
85
|
-
abort(401)
|
|
86
|
-
|
|
87
|
-
event = request.get_json()
|
|
88
|
-
# Process webhook
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
**Go:**
|
|
92
|
-
```go
|
|
93
|
-
import (
|
|
94
|
-
"crypto/hmac"
|
|
95
|
-
"crypto/sha256"
|
|
96
|
-
"encoding/hex"
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
func verifyWebhook(payload []byte, signature, secret string) bool {
|
|
100
|
-
mac := hmac.New(sha256.New, []byte(secret))
|
|
101
|
-
mac.Write(payload)
|
|
102
|
-
expected := "sha256=" + hex.EncodeToString(mac.Sum(nil))
|
|
103
|
-
|
|
104
|
-
return hmac.Equal([]byte(signature), []byte(expected))
|
|
105
|
-
}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
## Timestamp Validation
|
|
111
|
-
|
|
112
|
-
### Prevent Replay Attacks
|
|
113
|
-
|
|
114
|
-
```yaml
|
|
115
|
-
webhooks:
|
|
116
|
-
endpoints:
|
|
117
|
-
- name: "replay-protected"
|
|
118
|
-
url: "https://api.example.com/webhooks"
|
|
119
|
-
security:
|
|
120
|
-
include_timestamp: true
|
|
121
|
-
timestamp_header: "X-ProAgents-Timestamp"
|
|
122
|
-
max_age: 300 # 5 minutes
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
**Validation Example:**
|
|
126
|
-
```javascript
|
|
127
|
-
function validateTimestamp(timestampHeader, maxAgeSeconds = 300) {
|
|
128
|
-
const timestamp = parseInt(timestampHeader, 10);
|
|
129
|
-
const now = Math.floor(Date.now() / 1000);
|
|
130
|
-
const age = now - timestamp;
|
|
131
|
-
|
|
132
|
-
if (age > maxAgeSeconds) {
|
|
133
|
-
throw new Error('Webhook timestamp too old');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
if (age < -60) {
|
|
137
|
-
throw new Error('Webhook timestamp in future');
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return true;
|
|
141
|
-
}
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Signed Timestamp
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
X-ProAgents-Signature: sha256=<signature>
|
|
148
|
-
X-ProAgents-Timestamp: 1705329000
|
|
149
|
-
|
|
150
|
-
Signature computed over: timestamp.payload
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
## IP Allowlisting
|
|
156
|
-
|
|
157
|
-
### Configure Allowed IPs
|
|
158
|
-
|
|
159
|
-
```yaml
|
|
160
|
-
webhooks:
|
|
161
|
-
security:
|
|
162
|
-
ip_allowlist:
|
|
163
|
-
enabled: true
|
|
164
|
-
# ProAgents IP ranges (example)
|
|
165
|
-
ranges:
|
|
166
|
-
- "192.168.1.0/24"
|
|
167
|
-
- "10.0.0.0/8"
|
|
168
|
-
|
|
169
|
-
# Or fetch from endpoint
|
|
170
|
-
dynamic_list:
|
|
171
|
-
url: "https://proagents.dev/api/webhook-ips"
|
|
172
|
-
refresh: "1h"
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
### Firewall Configuration
|
|
176
|
-
|
|
177
|
-
```bash
|
|
178
|
-
# Example iptables rules
|
|
179
|
-
iptables -A INPUT -p tcp --dport 443 -s 192.168.1.0/24 -j ACCEPT
|
|
180
|
-
iptables -A INPUT -p tcp --dport 443 -j DROP
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## TLS Requirements
|
|
186
|
-
|
|
187
|
-
### Enforce HTTPS
|
|
188
|
-
|
|
189
|
-
```yaml
|
|
190
|
-
webhooks:
|
|
191
|
-
security:
|
|
192
|
-
tls:
|
|
193
|
-
required: true
|
|
194
|
-
min_version: "1.2"
|
|
195
|
-
verify_certificate: true
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### Certificate Pinning
|
|
199
|
-
|
|
200
|
-
```yaml
|
|
201
|
-
webhooks:
|
|
202
|
-
endpoints:
|
|
203
|
-
- name: "pinned-webhook"
|
|
204
|
-
url: "https://api.example.com/webhooks"
|
|
205
|
-
tls:
|
|
206
|
-
pin_certificates: true
|
|
207
|
-
pins:
|
|
208
|
-
- "sha256/BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB="
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
---
|
|
212
|
-
|
|
213
|
-
## Authentication Methods
|
|
214
|
-
|
|
215
|
-
### Bearer Token
|
|
216
|
-
|
|
217
|
-
```yaml
|
|
218
|
-
webhooks:
|
|
219
|
-
endpoints:
|
|
220
|
-
- name: "bearer-auth"
|
|
221
|
-
url: "https://api.example.com/webhooks"
|
|
222
|
-
auth:
|
|
223
|
-
type: "bearer"
|
|
224
|
-
token_env: "WEBHOOK_TOKEN"
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
**Request:**
|
|
228
|
-
```
|
|
229
|
-
POST /webhooks HTTP/1.1
|
|
230
|
-
Authorization: Bearer <token>
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
### API Key
|
|
234
|
-
|
|
235
|
-
```yaml
|
|
236
|
-
webhooks:
|
|
237
|
-
endpoints:
|
|
238
|
-
- name: "api-key-auth"
|
|
239
|
-
url: "https://api.example.com/webhooks"
|
|
240
|
-
auth:
|
|
241
|
-
type: "api_key"
|
|
242
|
-
key_env: "WEBHOOK_API_KEY"
|
|
243
|
-
header: "X-API-Key"
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
### Mutual TLS (mTLS)
|
|
247
|
-
|
|
248
|
-
```yaml
|
|
249
|
-
webhooks:
|
|
250
|
-
endpoints:
|
|
251
|
-
- name: "mtls-webhook"
|
|
252
|
-
url: "https://api.example.com/webhooks"
|
|
253
|
-
auth:
|
|
254
|
-
type: "mtls"
|
|
255
|
-
client_cert: "/path/to/client.crt"
|
|
256
|
-
client_key: "/path/to/client.key"
|
|
257
|
-
ca_cert: "/path/to/ca.crt"
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
## Secret Management
|
|
263
|
-
|
|
264
|
-
### Environment Variables
|
|
265
|
-
|
|
266
|
-
```yaml
|
|
267
|
-
webhooks:
|
|
268
|
-
endpoints:
|
|
269
|
-
- name: "secure-webhook"
|
|
270
|
-
url: "${WEBHOOK_URL}"
|
|
271
|
-
auth:
|
|
272
|
-
type: "bearer"
|
|
273
|
-
token_env: "WEBHOOK_TOKEN"
|
|
274
|
-
signature:
|
|
275
|
-
secret_env: "WEBHOOK_SECRET"
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
### Secret Rotation
|
|
279
|
-
|
|
280
|
-
```yaml
|
|
281
|
-
webhooks:
|
|
282
|
-
secrets:
|
|
283
|
-
rotation:
|
|
284
|
-
enabled: true
|
|
285
|
-
interval: "30d"
|
|
286
|
-
overlap_period: "24h"
|
|
287
|
-
|
|
288
|
-
# Support multiple secrets during rotation
|
|
289
|
-
active_secrets:
|
|
290
|
-
- env: "WEBHOOK_SECRET"
|
|
291
|
-
- env: "WEBHOOK_SECRET_OLD"
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
**Rotation Process:**
|
|
295
|
-
```
|
|
296
|
-
1. Generate new secret
|
|
297
|
-
2. Add new secret to config (WEBHOOK_SECRET_NEW)
|
|
298
|
-
3. Update receiving endpoint to accept both
|
|
299
|
-
4. Make new secret primary (WEBHOOK_SECRET)
|
|
300
|
-
5. Wait overlap period
|
|
301
|
-
6. Remove old secret
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
---
|
|
305
|
-
|
|
306
|
-
## Audit Logging
|
|
307
|
-
|
|
308
|
-
### Security Events
|
|
309
|
-
|
|
310
|
-
```yaml
|
|
311
|
-
webhooks:
|
|
312
|
-
security:
|
|
313
|
-
audit:
|
|
314
|
-
enabled: true
|
|
315
|
-
log_level: "info"
|
|
316
|
-
|
|
317
|
-
events:
|
|
318
|
-
- "signature_verification_failed"
|
|
319
|
-
- "authentication_failed"
|
|
320
|
-
- "ip_blocked"
|
|
321
|
-
- "timestamp_expired"
|
|
322
|
-
- "delivery_success"
|
|
323
|
-
- "delivery_failed"
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
### Audit Log Format
|
|
327
|
-
|
|
328
|
-
```json
|
|
329
|
-
{
|
|
330
|
-
"timestamp": "2024-01-15T14:30:00Z",
|
|
331
|
-
"event": "signature_verification_failed",
|
|
332
|
-
"webhook_id": "evt_abc123",
|
|
333
|
-
"endpoint": "secure-webhook",
|
|
334
|
-
"url": "https://api.example.com/webhooks",
|
|
335
|
-
"ip_address": "192.168.1.100",
|
|
336
|
-
"reason": "Invalid HMAC signature",
|
|
337
|
-
"request_id": "req_xyz789"
|
|
338
|
-
}
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
---
|
|
342
|
-
|
|
343
|
-
## Security Checklist
|
|
344
|
-
|
|
345
|
-
### Sending Webhooks
|
|
346
|
-
|
|
347
|
-
- [ ] Use HTTPS only
|
|
348
|
-
- [ ] Sign all payloads with HMAC
|
|
349
|
-
- [ ] Include timestamps
|
|
350
|
-
- [ ] Use strong secrets (32+ bytes)
|
|
351
|
-
- [ ] Rotate secrets regularly
|
|
352
|
-
- [ ] Log all deliveries
|
|
353
|
-
|
|
354
|
-
### Receiving Webhooks
|
|
355
|
-
|
|
356
|
-
- [ ] Verify signatures before processing
|
|
357
|
-
- [ ] Validate timestamps
|
|
358
|
-
- [ ] Use IP allowlisting if possible
|
|
359
|
-
- [ ] Process webhooks idempotently
|
|
360
|
-
- [ ] Respond quickly, process async
|
|
361
|
-
- [ ] Log all received webhooks
|
|
362
|
-
- [ ] Handle failures gracefully
|
|
363
|
-
|
|
364
|
-
---
|
|
365
|
-
|
|
366
|
-
## Commands
|
|
367
|
-
|
|
368
|
-
```bash
|
|
369
|
-
# Generate webhook secret
|
|
370
|
-
proagents webhooks secret generate
|
|
371
|
-
|
|
372
|
-
# Rotate secrets
|
|
373
|
-
proagents webhooks secret rotate
|
|
374
|
-
|
|
375
|
-
# Test signature verification
|
|
376
|
-
proagents webhooks verify --signature <sig> --payload <file>
|
|
377
|
-
|
|
378
|
-
# View security audit log
|
|
379
|
-
proagents webhooks audit --last 24h
|
|
380
|
-
```
|