Commit c96d211
authored
Route security findings to dedicated Slack channel (#122)
## Summary
- Routes Security Hub and GuardDuty findings to new
`#platform-security-alerts` Slack channel (webhook stored in SSM as
SecureString)
- Adds `Workflow.Status = NEW` filter to EventBridge rule so suppressed
findings no longer trigger Lambda invocations on re-import
- Deduplicates GuardDuty root credential usage alerts (one per hour
instead of one per API call)
- 50 known/accepted findings suppressed directly in Security Hub (S3
public access for website buckets, Elastic Beanstalk legacy apps,
default VPC security groups, SSM public sharing) — active count reduced
from 80 to 29
## Changes
- `handler.py` — read new `SECURITY_WEBHOOK_PARAM`, route security
findings to it, hourly dedup for root credential GuardDuty findings
- `lambdas/main.tf` — add `SECURITY_WEBHOOK_PARAM` env var to
`slack-alert` and `securityhub-summary` Lambdas
- `monitoring/main.tf` — add `Workflow.Status = ["NEW"]` to Security Hub
EventBridge rule pattern
- `CLAUDE.md` — document new SSM parameter and updated alert routing
## Test plan
- [ ] Verify `terraform plan` shows only expected changes (Lambda env
vars + EventBridge rule pattern)
- [ ] After apply, confirm Security Hub findings post to
`#platform-security-alerts`
- [ ] Confirm IAM/resource/login events still post to
`#javabin-infra-alerts`
- [ ] Confirm suppressed findings do not trigger new alerts on next
Security Hub re-evaluation cycle1 parent 2e46def commit c96d211
4 files changed
Lines changed: 52 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
233 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
237 | 239 | | |
238 | | - | |
| 240 | + | |
239 | 241 | | |
240 | 242 | | |
241 | 243 | | |
| |||
252 | 254 | | |
253 | 255 | | |
254 | 256 | | |
| 257 | + | |
255 | 258 | | |
256 | 259 | | |
257 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
932 | 933 | | |
933 | 934 | | |
934 | 935 | | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
935 | 946 | | |
936 | 947 | | |
937 | 948 | | |
| |||
1293 | 1304 | | |
1294 | 1305 | | |
1295 | 1306 | | |
1296 | | - | |
| 1307 | + | |
1297 | 1308 | | |
1298 | 1309 | | |
1299 | 1310 | | |
| |||
1310 | 1321 | | |
1311 | 1322 | | |
1312 | 1323 | | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
1313 | 1333 | | |
1314 | 1334 | | |
1315 | 1335 | | |
1316 | 1336 | | |
1317 | 1337 | | |
1318 | 1338 | | |
1319 | 1339 | | |
1320 | | - | |
| 1340 | + | |
1321 | 1341 | | |
1322 | 1342 | | |
1323 | 1343 | | |
1324 | 1344 | | |
1325 | 1345 | | |
1326 | 1346 | | |
1327 | 1347 | | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
1328 | 1353 | | |
1329 | 1354 | | |
1330 | 1355 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
773 | 773 | | |
774 | 774 | | |
775 | 775 | | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
783 | 784 | | |
784 | 785 | | |
785 | 786 | | |
| |||
1349 | 1350 | | |
1350 | 1351 | | |
1351 | 1352 | | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
1359 | 1361 | | |
1360 | 1362 | | |
1361 | 1363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
467 | 470 | | |
468 | 471 | | |
469 | 472 | | |
| |||
0 commit comments