Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scan-request type to JIRA's block allowed field types to get more data from ScanRequest object #798

Open
cx-scord opened this issue Aug 14, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@cx-scord
Copy link
Contributor

Describe the problem

Currently, there's no direct way to get (all) the information from the scan request object directly when using CxFlow in web server mode to fetch data from the ScanRequest (like, for example, the commit hash) to map it to a JIRA field.

This allows to map all the values available to the Groovy scripts into Jira fields as well.

Proposed solution

Add a scan-request to JIRA field type (jira.fields[*].type) in order to map the ScanRequest fields to any JIRA field type, it can be done using reflection to use the ScanRequest get methods using the jira.fields[*].name field.

Example:

jira:
  fields:
    - type: scan-request
      name: hash
      jira-field-name: "Commit Hash"
      jira-field-type: label

NOTE: This could also be accomplished by increasing the JIRA fields' result type (jira.fields[*].type = result) available fields listed from https://github.com/checkmarx-ltd/cx-flow/wiki/Bug-Trackers-and-Feedback-Channels#-fields by internally mapping the scan request objects to properties on that list of available result

Additional details

If not already done, using reflection to map the field name to the ScanRequest get method variable, it may (will?) require sanitization.

@cx-scord cx-scord added the enhancement New feature or request label Aug 14, 2021
@jbrotsos jbrotsos self-assigned this Aug 25, 2021
@jbrotsos jbrotsos added this to the Parking Lot milestone Sep 23, 2021
@jbrotsos jbrotsos removed this from the Parking Lot milestone Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants