Repository navigation
Flag security groups open to the internet on Insights - #85
Merged
Merged
Conversation
Closes #80 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md # src/analytics.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #80
Adds a read-only Security configuration section to Insights. It flags AWS security groups that open SSH or RDP to the whole internet (
0.0.0.0/0or::/0), and says plainly what it could not evaluate. It changes nothing in the cloud, and it is not a compliance check or a security score.What it does
aws-sg-public-sshandaws-sg-public-rdp, covering TCP ranges that include the port and all-traffic rules.The evaluator is pure, in
src/analytics/security.rs, and needs no new credentials or feeds.Please confirm against a real scan
The issue asks which scan paths actually expose ingress rules. I answered that by reading the pinned fork's code, not from a real scan, because I have no AWS scan to run.
On
cloudbridge-dist,AWS::EC2::SecurityGroupis a curated type, its Cloud Control identifier is derived from the ARN, and theGetResourceproperties are stored raw. CloudFormation's schema for that type includesSecurityGroupIngress, and that is the only input these rules read. Test fixtures follow that schema's shape.If real properties differ, or Cloud Control leaves the key out of its response, groups will show as Not evaluated rather than give a false result. Before relying on this, check what real security groups show after a scan.
Worth a look in review
SecurityGroupIngressis Not evaluated, as the issue requires, and I don't know whether Cloud Control omits the key for an empty list. An explicit[]reads as evaluated.Scan failedstate. The inventory records "complete" or "partial" and nothing per service, so a failed service shows through the partial-scan notice. The Insights page reports a scan that fails outright, as it already did, and the card then shows the previous inventory's results or Not scanned.mainmerged in, including Freeze a billing period as an immutable month-end snapshot #82.CHANGELOG.mdandsrc/analytics.rsmay conflict again with Export a monthly cloud cost review #84 and Land invoice reconciliation on main #86; both are adjacent additions, so keep both sides.Testing
Run locally on Windows against this branch:
cargo test: 594 passed, 2 ignored, after mergingmain. New tests cover public SSH and RDP, IPv6, ranges, all traffic, restricted ingress, absent and undecodable configuration, partial scans and deterministic output. The existing Insights tests pass unchanged.cargo clippy --all-targets -- -D warningsandcargo fmt --check: clean.cargo +nightly-2026-07-28 check --lib --target wasm32-unknown-unknown: passes. This is a type-check, not the fullbuild-web.sh.Not tested in a real window. Nothing here has been clicked. Please check on desktop, using demo data:
🤖 Generated with Claude Code