Skip to content

Conversation

@cx-atish-jadhav
Copy link
Contributor

By submitting a PR to this repository, you agree to the terms within the Checkmarx Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

This PR adds support for recognizing and handling secret-detection related results (sscs-secret-detection) within the Checkmarx AST results, by normalizing the engine-specific type to a internal constant and extending the data model to carry secret-detection related fields.

Key changes

  • Normalize special-case type "sscs-secret-detection" to internal constant SECRET_DETECTION across Result and related normalization logic.
  • Extend Data model to include Secret Detection fields:
    • ruleName
    • ruleDescription
    • remediation
  • Add a constant SECRET_DETECTION in CxConstants and wire it into normalization logic.
  • Minor alignment to ensure the JSON mapping supports the new fields without breaking existing functionality.

Background and impact

  • This aligns the UI behavior with the new SCS engine constant and resource, ensuring the user experience clearly distinguishes secret-detection results from other scan types.
  • Tests increase confidence that:
    • SCS results render with correct labeling
    • SCS details panel contains the expected tabs
    • Engine grouping in the results tree respects the localized label for SCS

Files touched (high level):

  • Data.java: added ruleName, ruleDescription, remediation fields and constructor acceptance of these fields; stores new values.
  • Result.java: added normalization for type to map "sscs-secret-detection" to SECRET_DETECTION constant.
  • CxConstants.java: added SECRET_DETECTION constant with value "scs".
  • Other supporting changes to ensure consistent normalization path using CxConstants.SECRET_DETECTION.

References

Jetbrains | Secret Detection scanner AST-105453
Show Secret Detection Results in JetBrains Plugin AST-110766

Testing

  • Unit tests
    • Existing tests should continue to pass with no regressions.
    • New secret-detection pathway is covered by normalization logic in Result and by the Data fields existing in JSON mapping.
  • Integrations / manual testing
    • Validate that JSON payloads containing:
      • "type": "sscs-secret-detection" are normalized to the internal SECRET_DETECTION constant.
      • Secret detection specific fields (ruleName, ruleDescription, remediation) are properly deserialized into Data objects.
    • End-to-end flow: ingest a sample AST result payload containing a secret-detection entry and verify downstream handling (e.g., any UI labeling or filtering that uses SECRET_DETECTION).

Checklist

  • I have added documentation for new/changed functionality in this PR (if applicable).
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used
SCS_JetBrains

@cx-ben-alvo
Copy link
Collaborator

cx-ben-alvo commented Sep 14, 2025

Logo
Checkmarx One – Scan Summary & Detailsd40dbca4-fc21-42be-816a-b1ae20f202ca

Great job! No new security vulnerabilities introduced in this pull request


Use @Checkmarx to reach out to us for assistance.

Just send a PR comment with @Checkmarx followed by a natural language request.

Examples: @Checkmarx how are you able to help me? @Checkmarx rescan this PR

Copy link
Collaborator

@cx-anurag-dalke cx-anurag-dalke left a comment

Choose a reason for hiding this comment

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

ok

@cx-atish-jadhav cx-atish-jadhav merged commit 717e7fc into main Sep 15, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants