Skip to content

Conversation

@cx-ben-alvo
Copy link
Contributor

@cx-ben-alvo cx-ben-alvo commented Feb 19, 2025

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

Changed the flow of triaging from hardcoded states to dynamic states.

References

https://checkmarx.atlassian.net/browse/AST-83450
https://checkmarx.atlassian.net/browse/AST-83449

Testing

Old triaging tests are covering this functionality.
Added integration test for getStates command.
Could not add triage update test of custom state because triage api for custom states is not ready.

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

@github-actions
Copy link

github-actions bot commented Feb 19, 2025

Logo
Checkmarx One – Scan Summary & Details1a6ef1b3-6510-47ea-9819-e34ab6c25684

Great job, no security vulnerabilities found in this Pull Request

@cx-ben-alvo cx-ben-alvo changed the title Feature/benalvo/add custom states Add Custom States Support (AST-83449, AST-83450) Feb 20, 2025
.map(CustomResultState::getLabel)
.collect(Collectors.toUnmodifiableSet());

private static List<CustomStateFilter> customStateFilters;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a potential race condition with the static "customStateFilters" variable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No because the plugin is not multithread

Copy link
Contributor

@cx-elchanan-arbiv cx-elchanan-arbiv left a comment

Choose a reason for hiding this comment

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

Looks wonderful!

import static com.checkmarx.intellij.ui.utils.Xpath.*;

public class TestGeneral extends BaseUITest {
List<String> defaultState = List.of("CONFIRMED", "TO_VERIFY", "URGENT", "NOT_EXPLOITABLE", "PROPOSED_NOT_EXPLOITABLE", "IGNORED", "NOT_IGNORED");
Copy link
Contributor

Choose a reason for hiding this comment

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

we have a test to coverage for the custom states functionality?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not yet because it's not in deu

@cx-ben-alvo cx-ben-alvo merged commit 2207dc7 into main Feb 24, 2025
6 of 7 checks passed
@cx-ben-alvo cx-ben-alvo deleted the feature/benalvo/add-custom-states branch February 24, 2025 14:24
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.

3 participants