| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This PR adds S3 bucket policy update support intended to safely append log-delivery statements (CloudTrail/ALB/ELB) without overwriting existing bucket policies.
Changes:
sumologic-app-utils/src/awsresource.py:1406
existing_sids = {s.get("Sid") for s in existing_policy["Statement"] if s.get("Sid")}
sumologic-app-utils/src/awsresource.py:1438
existing_policy["Statement"] = [
s for s in existing_policy["Statement"] if s.get("Sid") not in our_sids
]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was a problem hiding this comment.
Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (4)sumologic-app-utils/src/awsresource.py:532
existing_sids = {s.get("Sid") for s in existing_policy["Statement"] if s.get("Sid")}
for stmt in statements:
if stmt.get("Sid") not in existing_sids:
existing_policy["Statement"].append(stmt)
try:
sumologic-app-utils/src/awsresource.py:1411
existing_sids = {s.get("Sid") for s in existing_policy["Statement"] if s.get("Sid")}
added = []
for stmt in expected_stmts:
if stmt["Sid"] not in existing_sids:
existing_policy["Statement"].append(stmt)
added.append(stmt["Sid"])
sumologic-app-utils/src/awsresource.py:1427
verify = json.loads(s3.get_bucket_policy(Bucket=bucket_name)["Policy"])
current_sids = {s.get("Sid") for s in verify["Statement"]}
if not expected_sids.issubset(current_sids):
sumologic-app-utils/src/awsresource.py:1447
existing_policy["Statement"] = [
s for s in existing_policy["Statement"] if s.get("Sid") not in our_sids
]
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
No description provided.