# HKB-SecurityOps

Investigate and respond to findings. SecurityAudit plus finding workflow; log reads; no log deletion or unlock.

- **Session:** 4 hours. **Accounts:** [Security](/architecture/security/), [Log Archive](/architecture/log-archive/).
- **AWS managed policies:** `SecurityAudit`.
- **Inline policy:** 22 actions across 5 services (access-analyzer, guardduty, kms, s3, securityhub).
- **Source:** `bootstrap/hkb-bootstrap-identity.yaml`, resource `SecurityOpsSet`.

## Policy

```yaml
ManagedPolicies:
  - arn:aws:iam::aws:policy/SecurityAudit
InlinePolicy:
  Version: "2012-10-17"
  Statement:
    - Sid: FindingWorkflow
      Effect: Allow
      Action:
        - securityhub:BatchUpdateFindings
        - guardduty:ArchiveFindings
        - guardduty:UnarchiveFindings
        - guardduty:UpdateFindingsFeedback
        - access-analyzer:UpdateFindings
      Resource: "*"
    - Sid: ReadLogArchive
      Effect: Allow
      Action:
        - s3:GetObject
        - s3:GetObjectVersion
        - s3:ListBucket
        - s3:ListBucketVersions
        - kms:Decrypt
        - kms:DescribeKey
      Resource: "*"
    - Sid: DenyLogDeletionAndUnlock
      Effect: Deny
      Action:
        - s3:DeleteObject
        - s3:DeleteObjectVersion
        - s3:PutObjectRetention
        - s3:PutObjectLegalHold
        - s3:BypassGovernanceRetention
        - s3:PutBucketObjectLockConfiguration
        - s3:PutLifecycleConfiguration
        - s3:PutBucketPolicy
        - s3:DeleteBucketPolicy
        - s3:PutReplicationConfiguration
        - s3:DeleteBucket
      Resource: "*"
```
