Skip to content

feat: add inspector security rule packs#98

Merged
nathanhuh merged 3 commits intomainfrom
feature/90-inspector-rule-packs
Apr 13, 2026
Merged

feat: add inspector security rule packs#98
nathanhuh merged 3 commits intomainfrom
feature/90-inspector-rule-packs

Conversation

@nathanhuh
Copy link
Copy Markdown
Contributor

@nathanhuh nathanhuh commented Apr 13, 2026

Summary

This PR adds the first built-in Security Inspector rule packs with these checks:

  • Security Groups: SSH exposed to 0.0.0.0/0 or ::/0, RDP exposed to 0.0.0.0/0 or ::/0, and unrestricted all-traffic ingress from the internet
  • RDS: storage encryption disabled, public accessibility enabled, and automated backups disabled
  • IAM: stale active access keys
  • Secrets Manager: rotation disabled and rotation overdue
  • S3: public ACL grants, public bucket policies, and disabled bucket versioning

It also enriches the RDS and Secrets models plus the S3 client interface so the scanners can evaluate live AWS state, and it updates Inspector UI copy and README to reflect the shipped rule coverage.

Related Issues

Closes #90
Closes #91
Closes #92

Validation

  • GOCACHE=/tmp/unic-go-build make test
  • GOCACHE=/tmp/unic-go-build make build

Checklist

  • Scope is focused
  • Branch name follows docs/branch-naming-harness.md
  • Documentation harness reviewed (docs/documentation-harness.md)
  • README updated if user-facing behavior changed
  • Relevant docs/ pages updated if architecture, auth, config, or workflow changed
  • Tests/validation included
  • Breaking changes documented

- add built-in Security Group, RDS, IAM, Secrets Manager, and S3 inspector checks
- enrich repository models and S3 client interfaces for new scan coverage
- update Inspector UI copy and README to reflect shipped rule packs
amazon-q-developer[bot]

This comment was marked as resolved.

- use a secrets-specific high-severity threshold for overdue rotation
- add regression coverage for medium and high overdue rotation findings
@nathanhuh

This comment was marked as duplicate.

amazon-q-developer[bot]

This comment was marked as resolved.

- restore IAM access key severity to the IAM high-age constant
- restore secrets rotation severity to the secrets high-age constant
- tighten boundary tests around the domain-specific thresholds
@nathanhuh
Copy link
Copy Markdown
Contributor Author

/q review

Copy link
Copy Markdown
Contributor

@amazon-q-developer amazon-q-developer bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This PR successfully implements built-in Security Inspector rule packs for AWS resources. The implementation is well-structured with comprehensive test coverage and proper error handling throughout.

Key Changes Reviewed

  • Security scanning rules: Implemented checks for Security Groups (SSH/RDP/all-traffic exposure), RDS (encryption, public access, backups), IAM access keys (age-based alerts), Secrets Manager (rotation monitoring), and S3 buckets (public ACLs, policies, versioning)
  • Model enrichments: Added essential security-related fields to RDSInstance and Secret models
  • Interface extensions: Properly extended S3ClientAPI with required methods for security checks
  • Test coverage: Comprehensive unit tests validate all scanner logic and edge cases

Review Result

No blocking defects found. The code is production-ready with:

  • ✅ Proper error handling and nil checks
  • ✅ Well-tested with table-driven tests
  • ✅ Secure implementation of security checks
  • ✅ Appropriate severity classifications
  • ✅ Clean separation of concerns

The implementation correctly identifies security misconfigurations and provides actionable recommendations to users.


You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.

@nathanhuh nathanhuh merged commit e79881f into main Apr 13, 2026
2 checks passed
@nathanhuh nathanhuh deleted the feature/90-inspector-rule-packs branch April 13, 2026 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants