Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions infra/cfn/coderhelm-log-reader-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,16 @@ Resources:
- "ecr:BatchGetImage"
- "ecr:ListTagsForResource"
Resource: "*"
# Settings only, so a review can check a fact instead of asking: a
# bucket's default encryption, its bucket policy and whether that
# policy makes it public; a KMS key's description and key policy.
# Never an object in a bucket, never an encrypt or decrypt call.
- Sid: ReadBucketAndKeySettings
Effect: Allow
Action:
- "s3:GetEncryptionConfiguration"
- "s3:GetBucketPolicy"
- "s3:GetBucketPolicyStatus"
- "kms:DescribeKey"
- "kms:GetKeyPolicy"
Resource: "*"
18 changes: 18 additions & 0 deletions infra/cfn/coderhelm-log-reader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,24 @@ Resources:
- "ecr:BatchGetImage"
- "ecr:ListTagsForResource"
Resource: "*"
- PolicyName: BucketAndKeySettingsReadOnly
PolicyDocument:
Version: "2012-10-17"
Statement:
# Settings only, so a review can check a fact instead of asking:
# a bucket's default encryption, its bucket policy and whether
# that policy makes it public; a KMS key's description and key
# policy. Never an object in a bucket, never an encrypt or
# decrypt call.
- Sid: ReadBucketAndKeySettings
Effect: Allow
Action:
- "s3:GetEncryptionConfiguration"
- "s3:GetBucketPolicy"
- "s3:GetBucketPolicyStatus"
- "kms:DescribeKey"
- "kms:GetKeyPolicy"
Resource: "*"

Outputs:
RoleArn:
Expand Down
4 changes: 4 additions & 0 deletions services/common/src/agent_policy/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ pub const BUILTIN: &[(&str, Risk)] = &[
("opensearch_search", Risk::Read),
("opensearch_count", Risk::Read),
("aws_identity", Risk::Read),
("aws_bucket_settings", Risk::Read),
("aws_kms_key", Risk::Read),
("newrelic_accounts", Risk::Read),
("newrelic_nrql", Risk::Read),
("newrelic_entities", Risk::Read),
Expand Down Expand Up @@ -211,6 +213,8 @@ const DATA_SOURCE_TOOLS: &[(&str, &str)] = &[
("rest_get", "rest"),
("opensearch_", "opensearch"),
("aws_identity", "aws"),
("aws_bucket_settings", "aws"),
("aws_kms_key", "aws"),
("newrelic_", "newrelic"),
("confluence_", "confluence"),
("metrics_", "cloudwatch"),
Expand Down
Loading
Loading