Skip to content

[comp] Production Deploy#3037

Merged
tofikwest merged 6 commits into
releasefrom
main
Jun 4, 2026
Merged

[comp] Production Deploy#3037
tofikwest merged 6 commits into
releasefrom
main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 4, 2026

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.


Summary by cubic

Fixes empty auto-remediation plans and no-op Retries across AWS, GCP, and Azure, and adds support for AWS Config’s newer recording model to prevent false positives and failed fixes. Improves plan generation, caching, and UI so users get valid plans or guided steps and can successfully retry.

  • Bug Fixes
    • AWS Config: recognize recordingStrategy.useOnly === 'ALL_SUPPORTED_RESOURCE_TYPES' as “records all”; keep EXCLUSION/INCLUSION recorders flagged. Remediation guidance and executor normalize PutConfigurationRecorder to { allSupported: true, includeGlobalResourceTypes: true } without conflicting fields.
    • Generation: retry once at higher temperature when canAutoFix=true but zero fix steps; prefer a non-auto-fixable retry to route to guided steps.
    • Caching: never cache empty or non-auto-fixable plans; execute drops stale entries so Retry regenerates (applies to AWS, GCP, and Azure).
    • Prompts: avoid S3 ACLs, use Public Access Block; clarify valid Config recorder call; manual steps reflect current console.
    • UI: disable “Apply Fix” on empty plans with a short explanation.
    • Tests: added for recorder model handling, recordingGroup normalization, and empty-plan retries; suite green.

Written for commit 512d819. Summary will update on new commits.

Review in cubic

github-actions Bot and others added 6 commits June 4, 2026 21:46
… + auto-remediation

Customer-reported: AWS auto-remediation for "AWS Config recorder not fully
active" generated empty configs, the Retry button did nothing, and applying a
generated fix failed and fell back to dated manual steps. Root cause: the
entire Config check + auto-fix assumed the legacy `recordingGroup.allSupported`
model, but the customer's recorder uses AWS's current model ("Record all
resource types with customizable overrides" = recordingStrategy /
exclusionByResourceTypes).

- config.adapter: the recorder check now treats
  recordingStrategy.useOnly === 'ALL_SUPPORTED_RESOURCE_TYPES' (and legacy
  allSupported) as "records all", eliminating false positives on the new
  model. Genuine EXCLUSION/INCLUSION recorders stay flagged.
- config.adapter: remediation guidance now produces an AWS-valid call —
  read the existing recorder, then PutConfigurationRecorder with a clean
  recordingGroup { allSupported: true, includeGlobalResourceTypes: true } and
  NO recordingStrategy/exclusionByResourceTypes/resourceTypes (those are
  mutually exclusive with allSupported and trigger a ValidationException). This
  also records the global IAM resource types the customer was missing.
- aws-command-executor: deterministic guardrail (normalizeConfigRecordingGroup)
  collapses any all-supported-intent PutConfigurationRecorder to the single
  valid shape right before the SDK call, regardless of what the AI emits.
- remediation.service: never cache an empty / non-auto-fixable plan and drop
  the stale entry on execute — this is what made "Retry" a guaranteed no-op
  (it reloaded the same dead plan). Retry now regenerates.
- ai-remediation.service: generateFixPlan retries once at a higher temperature
  when the first pass yields zero fix steps (temp 0 would reproduce it).
- prompts: discourage S3 ACL steps (cause of empty plans), reinforce the valid
  Config recorder call, and base manual steps on the current AWS Console.
- RemediationDialog: disable "Apply Fix" on an empty plan and explain why.

Tests: new config.adapter.spec, recordingGroup-normalizer and retry-on-empty
cases; full cloud-security jest suite green (288 passing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The Retry-no-op and empty-plan bugs fixed for AWS also existed in the separate
GCP and Azure remediation paths (own services + own planCache + own
generators). Bring them to parity.

GCP (gcp-remediation.service.ts):
- isUsablePlan guard: never cache an empty / non-auto-fixable plan; on execute,
  only reuse a fresh AND usable cached plan and drop the stale entry otherwise
  (was the Retry no-op — execute reloaded the same dead plan).
Azure (azure-remediation.service.ts):
- Same isUsablePlan cache guard on preview + execute.
- Delete the cached plan in the execute catch block so Retry regenerates.
- If the refined plan flips canAutoFix to false, return guided steps instead of
  a misleading auto-fix preview.
GCP + Azure generators (ai-remediation.service.ts):
- generateGcpFixPlan / generateAzureFixPlan now retry once at a higher
  temperature when the first pass yields zero fix steps (temp 0 reproduces it).

Tests: GCP/Azure empty-plan retry cases added; full cloud-security jest suite
green (292 passing). Typecheck clean for all changed files.

Note (flagged, NOT changed here — separate scope / higher risk):
- GCP/Azure scanners swallow per-adapter/per-scope errors (return [] on
  failure), so a real API/permission failure can look like "0 findings".
- GCP Cloud SQL databaseFlags is a REPLACE op with no guard that all existing
  flags are preserved; disabling public IP has no private-IP precondition check.
These are real but need their own design + tests before touching.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…y + retry selection

- ai-remediation.prompt.ts: use bare AWS SDK command names (with the service
  named separately) in the new S3 + Config guidance, matching the OUTPUT RULES
  schema — the prior "s3:PutPublicAccessBlockCommand" / "config-service:..."
  shorthand could nudge the model to emit a service-prefixed (invalid) command
  value. Add the missing "Command" suffix to GetBucketPolicy. Remove PutBucketAcl
  from the "permissions you need" chain so it no longer contradicts the new
  "never use ACLs" rule.
- ai-remediation.service.ts: the empty-plan retry now prefers a retry that is
  usable OR correctly canAutoFix=false (routes to guided steps) instead of
  discarding it and returning the original empty canAutoFix=true plan. Applied
  to AWS, GCP, and Azure generators.
- Test: retry prefers a non-auto-fixable result.

cloud-security jest suite green (293 passing); changed files typecheck clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ediation-fix

fix(cloud-security): AWS Config new recording model + GCP/Azure remediation robustness
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 4, 2026

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

Project Deployment Actions Updated (UTC)
app (staging) Building Building Jun 4, 2026 11:07pm
comp-framework-editor (staging) Ready Ready Preview, Comment Jun 4, 2026 11:07pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal (staging) Skipped Skipped Jun 4, 2026 11:07pm

Request Review

@tofikwest tofikwest merged commit 81353aa into release Jun 4, 2026
12 of 13 checks passed
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.70.4 🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants