Skip to content

feat(ui): add syntax highlighting to finding groups remediation code#10698

Merged
Alan-TheGentleman merged 2 commits into
masterfrom
feat/ui-finding-groups-syntax-highlight
Apr 15, 2026
Merged

feat(ui): add syntax highlighting to finding groups remediation code#10698
Alan-TheGentleman merged 2 commits into
masterfrom
feat/ui-finding-groups-syntax-highlight

Conversation

@Alan-TheGentleman
Copy link
Copy Markdown
Contributor

Context

The finding groups resource detail drawer renders remediation code blocks (CLI commands, Terraform, CloudFormation, Bicep) as plain text with no syntax highlighting. This makes the code harder to read and understand.

Description

Adds syntax highlighting for remediation code blocks in the finding groups drawer with provider-aware auto-detection:

  • 5 StreamLanguage parsers added to QueryCodeEditor: Shell, HCL (with heredoc support), YAML (with CloudFormation intrinsics), Bicep (with @decorators, ${interpolation}, resource types), and plain text fallback
  • Provider-aware auto-detection for NativeIaC blocks via resolveNativeIacConfig():
    • AWS → CloudFormation (YAML)
    • Azure → Bicep
    • Kubernetes → YAML Manifest
    • Default → plain text
  • Language mapping for remediation blocks: CLI → Shell, Terraform → HCL
  • Exported QUERY_EDITOR_LANGUAGE const and QueryEditorLanguage type for reuse across features
  • All parsers reuse the existing light/dark highlight styles — no new dependencies

Steps to review

  1. Navigate to Findings → Grouped view
  2. Click on a check row to expand resources
  3. Open the resource detail drawer
  4. Scroll to the Finding Overview tab → Remediation section
  5. Verify syntax highlighting for:
    • CLI Command block → shell highlighting (keywords, flags, variables, strings)
    • Terraform block → HCL highlighting (resource blocks, heredocs, functions, strings)
    • CloudFormation block (AWS findings) → YAML highlighting (keys, comments, !Ref/!Sub tags, Fn::Sub intrinsics)
    • Bicep block (Azure findings) → Bicep highlighting (@decorators, resource types, single-quoted strings)
  6. Toggle dark/light mode and verify both themes highlight correctly

Checklist

Community Checklist
  • This feature/issue is listed in here or roadmap.prowler.com
  • Is it assigned to me, if not, request it via the issue/feature in here or Prowler Community Slack

UI (if applicable)

  • All issue/task requirements work as expected on the UI
  • Screenshots/Video - Mobile (X < 640px)
  • Screenshots/Video - Tablet (640px > X < 1024px)
  • Screenshots/Video - Desktop (X > 1024px)
  • Ensure new entries are added to ui/CHANGELOG.md

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

- Add Shell, HCL, YAML, and Bicep StreamLanguage parsers to QueryCodeEditor
- Provider-aware auto-detection for NativeIaC blocks (AWS→CloudFormation,
  Azure→Bicep, Kubernetes→YAML manifests)
- Export QUERY_EDITOR_LANGUAGE const and QueryEditorLanguage type for reuse
- Map CLI commands to shell, Terraform to HCL with heredoc support
@Alan-TheGentleman Alan-TheGentleman requested a review from a team as a code owner April 15, 2026 10:19
@github-actions
Copy link
Copy Markdown
Contributor

✅ All necessary CHANGELOG.md files have been updated.

@github-actions
Copy link
Copy Markdown
Contributor

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 2026

🔒 Container Security Scan

Image: prowler-ui:38e6b26
Last scan: 2026-04-15 10:26:08 UTC

✅ No Vulnerabilities Detected

The container image passed all security checks. No known CVEs were found.

📋 Resources:

Copy link
Copy Markdown
Member

@pedrooot pedrooot left a comment

Choose a reason for hiding this comment

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

🥇

@Alan-TheGentleman Alan-TheGentleman merged commit d5354e8 into master Apr 15, 2026
37 checks passed
@Alan-TheGentleman Alan-TheGentleman deleted the feat/ui-finding-groups-syntax-highlight branch April 15, 2026 10:58
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