Skip to content

feat(cloud-security): add Amazon Neptune as an AWS Cloud Tests service#3040

Merged
tofikwest merged 2 commits into
mainfrom
tofik/aws-neptune-cloud-tests
Jun 5, 2026
Merged

feat(cloud-security): add Amazon Neptune as an AWS Cloud Tests service#3040
tofikwest merged 2 commits into
mainfrom
tofik/aws-neptune-cloud-tests

Conversation

@tofikwest
Copy link
Copy Markdown
Contributor

@tofikwest tofikwest commented Jun 5, 2026

Summary

Adds a dedicated Amazon Neptune scanner to AWS Cloud Tests. Today, AWS has two scan modes: comp_scanners (our ~44 dedicated SDK adapters, the default) and security_hub (ingests AWS Security Hub findings). Neptune was only reachable via Security Hub mode — there was no dedicated Neptune adapter. This PR adds one, so Neptune is covered directly in the default mode too.

Requested by a customer (Jinesh) evaluating AWS who asked whether we support OpenSearch and Neptune. (OpenSearch was already supported.)

What changed

  • neptune.adapter.ts — scans Neptune DB clusters for five checks:
    1. Storage encryption at rest — manual fix (enabling it on an existing cluster requires snapshot + restore into a new encrypted cluster).
    2. Deletion protection — auto-fix via neptune:ModifyDBClusterCommand.
    3. Automated backup retention ≥ 7 days — auto-fix.
    4. IAM database authentication — auto-fix.
    5. Audit logs exported to CloudWatch Logs — auto-fix.
      Filters to Engine === 'neptune' and paginates the DescribeDBClusters Marker. (Aligned with the AWS Security Hub Neptune control set.)
  • aws-security.service.ts — register NeptuneAdapter + Cost-Explorer detection (Amazon Neptune → neptune).
  • aws-command-executor.ts — register the @aws-sdk/client-neptune SDK so the ModifyDBCluster remediations execute.
  • integration-platform AWS manifest — Neptune service catalog entry (Services tab).
  • ServiceCard.tsx — Neptune icon.
  • apps/api/package.json — add @aws-sdk/client-neptune ^3.948.0 (matches the other AWS SDK pins).

Behavior / caveats

  • Detection-gated: invisible to accounts that don't run Neptune (the Amazon Neptune Cost-Explorer line won't be present → not detected).
  • Not yet verified against a live Neptune cluster — logic + SDK field names are unit-tested and typecheck-clean, but a real cluster is the final proof.

Tests

  • neptune.adapter.spec.ts: non-compliant (all 5 checks fail, encryption is [MANUAL], others emit ModifyDBCluster), fully-compliant, non-Neptune engine filtered out, Marker pagination, and AccessDenied → []. 5 passing; changed files typecheck clean.

🤖 Generated with Claude Code


Summary by cubic

Add a dedicated Amazon Neptune scanner to AWS Cloud Tests so Neptune is covered in the default mode, not only via Security Hub. Scans Neptune clusters via the RDS API with five checks and auto-fix guidance.

  • New Features

    • New Neptune adapter scans DB clusters for: at-rest encryption, deletion protection, backup retention (>= 7 days), IAM DB auth, and audit log export to CloudWatch. Four are auto-fixable via rds:ModifyDBClusterCommand.
    • Registered the adapter and Cost Explorer mapping (“Amazon Neptune” -> neptune) for detection-gated enablement.
    • Added Neptune to the AWS manifest and service card icon.
    • Unit tests cover compliance, engine filtering, pagination, AccessDenied → []; assert rds:ModifyDBClusterCommand.
  • Dependencies

    • No new dependencies; uses @aws-sdk/client-rds for DescribeDBClusters and ModifyDBCluster.

Written for commit 64b9137. Summary will update on new commits.

Review in cubic

Adds a dedicated Neptune scanner so AWS Cloud Tests cover Neptune directly in
the default `comp_scanners` mode (previously Neptune was only reachable via the
Security Hub scan mode). Requested by a customer evaluating AWS.

- neptune.adapter.ts: scans Neptune DB clusters for five checks — storage
  encryption at rest (manual: enabling it needs snapshot+restore), deletion
  protection, automated backup retention (>= 7 days), IAM database
  authentication, and audit-log export to CloudWatch. The last four emit
  auto-fix remediation via `neptune:ModifyDBClusterCommand`. Filters to
  Engine === 'neptune' and paginates the DescribeDBClusters Marker.
- aws-security.service.ts: register the adapter + Cost-Explorer detection
  ('Amazon Neptune' -> 'neptune').
- aws-command-executor.ts: register the `@aws-sdk/client-neptune` SDK so the
  ModifyDBCluster remediations execute.
- integration-platform AWS manifest: Neptune service catalog entry.
- ServiceCard: Neptune icon.
- apps/api dep: add @aws-sdk/client-neptune ^3.948.0.
- Tests: neptune.adapter.spec.ts (non-compliant, compliant, engine filter,
  pagination, AccessDenied) — 5 passing.

Detection-gated (invisible to accounts without Neptune). Not yet verified
against a live Neptune cluster.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jun 5, 2026 3:06am
comp-framework-editor Ready Ready Preview, Comment Jun 5, 2026 3:06am
portal Ready Ready Preview, Comment Jun 5, 2026 3:06am

Request Review

…pace

Neptune's management API is part of the RDS API surface — its control-plane IAM
actions use the `rds:` prefix (rds:ModifyDBCluster, rds:DescribeDBClusters);
`neptune-db:` is data-plane only. The first cut used @aws-sdk/client-neptune and
`neptune:ModifyDBClusterCommand` remediation, which would make permission
detection suggest a non-existent `neptune:ModifyDBCluster` IAM action — so the
customer's auto-fix would keep failing even after "granting" the suggestion.

- neptune.adapter.ts: scan via @aws-sdk/client-rds DescribeDBClustersCommand
  (filter Engine === 'neptune'); remediate via rds:ModifyDBClusterCommand so
  permission detection emits the real rds:ModifyDBCluster action.
- drop the unnecessary @aws-sdk/client-neptune dependency and its executor
  registration (the existing `rds` SDK module already exposes ModifyDBCluster).
- spec: mock @aws-sdk/client-rds; assert rds:ModifyDBClusterCommand.

Full cloud-security suite green (304 passing); changed files typecheck clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@tofikwest tofikwest merged commit d608946 into main Jun 5, 2026
11 checks passed
@tofikwest tofikwest deleted the tofik/aws-neptune-cloud-tests branch June 5, 2026 03:15
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.71.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants